Results 11 - 20
of
33
Semantics-Based Compiling: A Case Study in Type-Directed Partial Evaluation
- Eighth International Symposium on Programming Language Implementation and Logic Programming
"... . We illustrate a simple and e#ective solution to semantics-based compiling. Our solution is based on "type-directed partial evaluation", and -- our compiler generator is expressed in a few lines, and is e#cient; -- its input is a well-typed, purely functional definitional interpreter in the sty ..."
Abstract
-
Cited by 21 (8 self)
- Add to MetaCart
. We illustrate a simple and e#ective solution to semantics-based compiling. Our solution is based on "type-directed partial evaluation", and -- our compiler generator is expressed in a few lines, and is e#cient; -- its input is a well-typed, purely functional definitional interpreter in the style of denotational semantics; -- the output of the generated compiler is e#ectively three-address code, in the fashion and e#ciency of the Dragon Book; -- the generated compiler processes several hundred lines of source code per second. The source language considered in this case study is imperative, blockstructured, higher-order, call-by-value, allows subtyping, and obeys stack discipline. It is bigger than what is usually reported in the literature on semantics-based compiling and partial evaluation. Our compiling technique uses the first Futamura projection, i.e., we compile programs by specializing a definitional interpreter with respect to the program. Specialization is carri...
Thunks and the λ-calculus
- IN THE JOURNAL OF FUNCTIONAL PROGRAMMING. RS-97-6 OLIVIER DANVY AND ULRIK
, 1997
"... Plotkin, in his seminal article Call-by-name, call-by-value and the λ-calculus, formalized evaluation strategies and simulations using operational semantics and continuations. In particular, he showed how call-by-name evaluation could be simulated under call-by-value evaluation and vice versa. Si ..."
Abstract
-
Cited by 21 (9 self)
- Add to MetaCart
Plotkin, in his seminal article Call-by-name, call-by-value and the λ-calculus, formalized evaluation strategies and simulations using operational semantics and continuations. In particular, he showed how call-by-name evaluation could be simulated under call-by-value evaluation and vice versa. Since Algol 60, however, call-by-name is both implemented and simulated with thunks rather than with continuations. We recast
A Declarative Approach to Run-Time Code Generation
- In Workshop on Compiler Support for System Software (WCSSS
, 1996
"... Introduction Run-time code generation promises to improve the performance and reliability of current and future systems. Optimizations performed at run time make use of values and invariants that cannot be exploited at compile time, yielding code that is often superior to statically optimal code. F ..."
Abstract
-
Cited by 18 (2 self)
- Add to MetaCart
Introduction Run-time code generation promises to improve the performance and reliability of current and future systems. Optimizations performed at run time make use of values and invariants that cannot be exploited at compile time, yielding code that is often superior to statically optimal code. Furthermore, run-time code generation encourages better structuring of systems: in our experience, the performance of special-purpose code can, in some cases, be matched or exceeded by automatically customized general-purpose code. Run-time code generation also promotes the use of advanced languages because it amortizes the cost of dynamic safety checks and optimizes across abstraction boundaries. Most previous approaches to run-time code generation have been imperative, relying on the programmer to: ffl specify the code to be optimized at run time, usually as a "template" of machine code or as code that builds an abstract syntax tree, ffl s
Principals in Programming Languages: A Syntactic Proof Technique
- In Proc. ICFP, Paris
, 1999
"... Programs are often structured around the idea that different pieces of code comprise distinct principals, each with a view of its environment. Typical examples include the modules of a large program, a host and its clients, or a collection of interactive agents. In this paper, we formalize this not ..."
Abstract
-
Cited by 16 (1 self)
- Add to MetaCart
Programs are often structured around the idea that different pieces of code comprise distinct principals, each with a view of its environment. Typical examples include the modules of a large program, a host and its clients, or a collection of interactive agents. In this paper, we formalize this notion of principal in the programming language itself. The result is a language in which intuitive statements such as, "the client must call open to obtain a file handle," can be phrased and proven formally. We add principals to variants of the simply-typed - calculus and show how we can track the code corresponding to each principal throughout evaluation. This multiagent calculus yields syntactic proofs of some type abstraction properties that traditionally require semantic arguments. 1 Introduction Programmers often have a notion of principal in mind when designing the structure of a program. Examples of such principals include modules of a large system, a host and its clients, and, in th...
On the Transformation between Direct and Continuation Semantics
- Proceedings of the 9th Conference on Mathematical Foundations of Programming Semantics, number 802 in Lecture Notes in Computer Science
, 1993
"... . Proving the congruence between a direct semantics and a continuation semantics is often surprisingly complicated considering that direct-style -terms can be transformed into continuation style automatically. However, transforming the representation of a direct-style semantics into continuation sty ..."
Abstract
-
Cited by 13 (10 self)
- Add to MetaCart
. Proving the congruence between a direct semantics and a continuation semantics is often surprisingly complicated considering that direct-style -terms can be transformed into continuation style automatically. However, transforming the representation of a direct-style semantics into continuation style usually does not yield the expected representation of a continuation-style semantics (i.e., one written by hand). The goal of our work is to automate the transformation between textual representations of direct semantics and of continuation semantics. Essentially, we identify properties of a direct-style representation (e.g., totality), and we generalize the transformation into continuation style accordingly. As a result, we can produce the expected representation of a continuation semantics, automatically. It is important to understand the transformation between representations of direct and of continuation semantics because it is these representations that get processed in any kind of ...
ML partial evaluation using set-based analysis
- Record of the 1994 ACM SIGPLAN Workshop on ML and its Applications, Rapport de recherche N o 2265, INRIA
, 1994
"... 8313, issued by ESD/AVS under Contract No. F19628-91-C-0168. It was also partially sponsored ..."
Abstract
-
Cited by 10 (4 self)
- Add to MetaCart
8313, issued by ESD/AVS under Contract No. F19628-91-C-0168. It was also partially sponsored
Constrained Types for Object-Oriented Languages
"... Abstract. X10 is a modern object-oriented language designed for productivity and performance in concurrent and distributed systems. In this setting, dependent types offer significant opportunities for detecting design errors statically, documenting design decisions, eliminating costly runtime checks ..."
Abstract
-
Cited by 9 (0 self)
- Add to MetaCart
Abstract. X10 is a modern object-oriented language designed for productivity and performance in concurrent and distributed systems. In this setting, dependent types offer significant opportunities for detecting design errors statically, documenting design decisions, eliminating costly runtime checks (e.g., for array bounds, null values), and improving the quality of generated code. We present the design and implementation of constrained types, a natural, simple, clean, and expressive extension to object-oriented programming: A type C(:c) names a class or interface C and a constraint c on the immutable state of C and in-scope final variables. Constraints may also be associated with class definitions (representing class invariants) and with method and constructor definitions (representing preconditions). Dynamic casting is permitted. The system is parametric on the underlying constraint system: the compiler supports a simple equalitybased constraint system but, in addition, supports extension with new constraint systems using compiler plugins. 1
On a Modal \lambda-Calculus for S4*
- Proceedings of the Eleventh Conference on Mathematical Foundations of Programming Sematics
, 1995
"... We present !2 , a concise formulation of a proof term calculus for the intuitionistic modal logic S4 that is well-suited for practical applications. We show that, with respect to provability, it is equivalent to other formulations in the literature, sketch a simple type checking algorithm, and pr ..."
Abstract
-
Cited by 7 (0 self)
- Add to MetaCart
We present !2 , a concise formulation of a proof term calculus for the intuitionistic modal logic S4 that is well-suited for practical applications. We show that, with respect to provability, it is equivalent to other formulations in the literature, sketch a simple type checking algorithm, and prove subject reduction and the existence of canonical forms for well-typed terms. Applications include a new formulation of natural deduction for intuitionistic linear logic, modal logical frameworks, and a logical analysis of staged computation and binding-time analysis for functional languages [6]. 1 Introduction Modal operators familiar from traditional logic have received renewed attention in computer science through their importance in linear logic. Typically, they are described axiomatically in the style of Hilbert or via sequent calculi. However, the Curry-Howard isomorphism between proofs and -terms is most poignant for natural deduction, so natural deduction formulations of modal and...
A Study in Higher-Order Programming Languages
, 1997
"... : This thesis describes some interplays between the specification and the implementation of higher-order programming languages. We first investigate a traditional implementation of Scheme (compiler, run-time machine). We then turn to Action Semantics. And finally we cross-fertilize these two approac ..."
Abstract
-
Cited by 6 (2 self)
- Add to MetaCart
: This thesis describes some interplays between the specification and the implementation of higher-order programming languages. We first investigate a traditional implementation of Scheme (compiler, run-time machine). We then turn to Action Semantics. And finally we cross-fertilize these two approaches using both syntax-directed and type-directed partial evaluation and introducing an alternative representation of data structures. December 1997 To my late father Acknowledgments First of all I thank my supervisor, Olivier Danvy, from whom I learn every day. I appreciate his technical expertise and his knowledge of how to work scientifically. His insight in computer science and his will to share this insight with his students exceeds what I have otherwise been exposed to. Peter D. Mosses's course at DAIMI in the spring of 1997 was an inspiring tour of Action Semantics. Rene Vestergaard gave useful comments on a draft of this thesis of both syntactic and semantic nature. He pointed ou...
A Transformational Approach which Combines Size Inference and Program Optimization
- Semantics, Applications, and Implementation of Program Generation (SAIG’01), Lecture Notes in Computer Science 2196
, 2001
"... If functional programs are to be used for high-performance computing, efficient data representations and operations must be provided. Our contribution is a calculus for the analysis of the lengths of (nested) lists and a transformation into a form which is liberated from the chain of cons-operations ..."
Abstract
-
Cited by 6 (0 self)
- Add to MetaCart
If functional programs are to be used for high-performance computing, efficient data representations and operations must be provided. Our contribution is a calculus for the analysis of the lengths of (nested) lists and a transformation into a form which is liberated from the chain of cons-operations and which sometimes permits array implementations even if the length depends on run-time values. A major advantage of functional programs vs. imperative programs is that dependence analysis is much easier, due to the absence of reassignments. One severe disadvantage of functional programs as of yet is that efficient, machine-oriented data structures (like the array) absolutely necessary for high-performance computing play a minor role in many language implementations since they do not harmonize with functional evaluation schemata (like graph reduction), which are at a higher level of abstraction. We propose to construct programs by composition of skeletons, i.e., functi...

