Results 11 - 20
of
23
Generating Action Compilers by Partial Evaluation
- Journal of Functional Programming
, 1996
"... Compiler generation based on Mosses' action semantics has been studied by Brown, Moura, and Watt, and also by the second author. The core of each of their systems is a handwritten action compiler, producing either C or machine code. We have obtained an action compiler in a much simpler way: by parti ..."
Abstract
-
Cited by 12 (1 self)
- Add to MetaCart
Compiler generation based on Mosses' action semantics has been studied by Brown, Moura, and Watt, and also by the second author. The core of each of their systems is a handwritten action compiler, producing either C or machine code. We have obtained an action compiler in a much simpler way: by partial evaluation of an action interpreter. Even though our compiler produces Scheme code, the code runs as fast as that produced by the previous action compilers. 1 Introduction Action semantics is a framework for formal semantics of programming languages, developed by Mosses [16, 17, 18] and Watt [19, 26]. It differs from denotational semantics in using semantic entities called actions, rather than higher-order functions. Compiler generation based on action semantics has been studied by Brown, Moura, and Watt [6], and also by the second author [22, 20, 21]. Journal of Functional Programming, 6(2):269--298, 1996. Also in Proc. FPCA'93, pages 308--317. The core of each of their two action se...
A self-applicable partial evaluator for the lambda calculus
- International Conference on Computer Languages
, 1990
"... This paper (essentially [12, Chapter 8]) describes partial evaluation for the lambda calculus, augmented with an explicit fixed-point operator. The techniques used here diverge from those used in [12, Chapters 4, 5] and [11] in that they are not based on specialization of named program points. The a ..."
Abstract
-
Cited by 11 (3 self)
- Add to MetaCart
This paper (essentially [12, Chapter 8]) describes partial evaluation for the lambda calculus, augmented with an explicit fixed-point operator. The techniques used here diverge from those used in [12, Chapters 4, 5] and [11] in that they are not based on specialization of named program points. The algorithm essentially leaves some operators (applications, lambdas, etc.) untouched and reduces others as standard evaluation would do it. This simple scheme is able to handle programs that rely heavily on higher-order facilities. The requirements on binding-time analysis are formulated via a type system and an ecient binding-time analysis via constraint solving is outlined. The partial evaluator is proven correct.
More Advice on Proving a Compiler Correct: Improve a Correct Compiler
, 1994
"... This paper is a condensed version of the author's PhD thesis [19]. Besides the compiler for the im- perative language described in this paper, the thesis derives implementations of a simple functional and a simple logic programming language ..."
Abstract
-
Cited by 11 (1 self)
- Add to MetaCart
This paper is a condensed version of the author's PhD thesis [19]. Besides the compiler for the im- perative language described in this paper, the thesis derives implementations of a simple functional and a simple logic programming language
From Proof Normalization to Compiler Generation and Type-Directed Change-of-Representation
, 1997
"... The main part of this thesis is a synthesis of considerations from Type Theory, Mathematical Logic/Proof Theory, and (Denotational) Semantics to perform various automatic program transformations ranging from normalization over currying and coercion-insertion to compiler derivation. At the core of o ..."
Abstract
-
Cited by 7 (1 self)
- Add to MetaCart
The main part of this thesis is a synthesis of considerations from Type Theory, Mathematical Logic/Proof Theory, and (Denotational) Semantics to perform various automatic program transformations ranging from normalization over currying and coercion-insertion to compiler derivation. At the core of our technique we have what has been described as "An Inverse of the Evaluation Functional for Typed -calculus" [7]. It is essentially type-directed j-expansion followed by fi-reduction on certain terms. Quite independently of [7], j-expansion has been studied for its use in Partial Evaluation, where among other things it has been used to obtain a one-pass CPS-transformer [20]. It is some of the consequences of this coincidence [19] that are described in the following. Our approach will be purely syntactical and it is hoped that it marks a simplification on earlier treatments of the materiel. We have tried presenting the materiel based purely on the standard reduction properties for the simpl...
A Unified Framework for Binding-Time Analysis
- Colloquium on Formal Approaches in Software Engineering (FASE '97), volume 1214 of Lect
, 1997
"... . Binding-time analysis is a crucial part of offline partial evaluation. It is often specified as a non-standard type system. Many typebased binding-time analyses are reminiscent of simple type systems with additional features like recursive types. We make this connection explicit by expressing bind ..."
Abstract
-
Cited by 7 (3 self)
- Add to MetaCart
. Binding-time analysis is a crucial part of offline partial evaluation. It is often specified as a non-standard type system. Many typebased binding-time analyses are reminiscent of simple type systems with additional features like recursive types. We make this connection explicit by expressing binding-time analysis with annotated type systems that separate the concerns of type inference from those of binding-time annotation. The separation enables us to explore a design space for bindingtime analysis by varying the underlying type system and the annotation strategy independently. The result is a classification of different monovariant binding-time analyses which allows us to compare their relative power. Due to the systematic approach we uncover some novel analyses. A partial evaluator separates the computation of a source program into two or more stages [7, 20]. Using the (static) input of the first stage it transforms a source program into a specialized residual program. Application...
Correctness of a Region-Based Binding-Time Analysis
- Carnegie Mellon University, Elsevier Science BV
, 1997
"... A binding-time analysis is the first pass of an offline partial evaluator. It determines which parts of a program may be executed at specialization time. Region-based binding-time analysis applies to higher-order programming languages with firstclass references. The consideration of effects in the d ..."
Abstract
-
Cited by 6 (5 self)
- Add to MetaCart
A binding-time analysis is the first pass of an offline partial evaluator. It determines which parts of a program may be executed at specialization time. Region-based binding-time analysis applies to higher-order programming languages with firstclass references. The consideration of effects in the determination of binding time properties makes it possible to have a partial evaluator perform assignments at specialization time. We present such a region-based binding-time analysis and prove its correctness with respect to a continuation-style semantics for an annotated call-by-value lambda calculus with ML-style references. We provide a relative correctness proof that relies on the correctness of region inference and on the correctness of a binding-time analysis for an applied lambda calculus. The main tool in the proof is a translation from terms with explicit region annotations to an extended continuation-passing store-passing style. The analysis is monovariant/monomorphic, however, ess...
Pragmatic Aspects of Type-Directed Partial Evaluation
, 1996
"... Type-directed partial evaluation stems from the residualization of static values in dynamic contexts, given their type and the type of their free variables. Its algorithm coincides with the algorithm for coercing a subtype value into a supertype value, which itself coincides with Berger and Schw ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
Type-directed partial evaluation stems from the residualization of static values in dynamic contexts, given their type and the type of their free variables. Its algorithm coincides with the algorithm for coercing a subtype value into a supertype value, which itself coincides with Berger and Schwichtenberg's normalization algorithm for the simply typed -calculus. Type-directed partial evaluation thus can be used to specialize a compiled, closed program, given its type.
Polymorphic Specialization for ML
- ACM Transactions on Programming Languages and Systems
, 2002
"... We present a novel technique for offine partial evaluation of functional languages with an ML-style typing discipline. Our program specialization method comprises a polymorphic binding-time analysis with polymorphic recursion. Based on the region calculus of Tofte and Talpin, we develop a binding-ti ..."
Abstract
-
Cited by 4 (3 self)
- Add to MetaCart
We present a novel technique for offine partial evaluation of functional languages with an ML-style typing discipline. Our program specialization method comprises a polymorphic binding-time analysis with polymorphic recursion. Based on the region calculus of Tofte and Talpin, we develop a binding-time analysis as a constraint analysis on top of region inference. Our insight is to regard binding times as properties of regions.
A Computational Formalization for Partial Evaluation (Extended Version)
, 1996
"... We formalize a partial evaluator for Eugenio Moggi's computational metalanguage. This formalization gives an evaluation-order independent view of binding-time analysis and program specialization, including a proper treatment of call unfolding, and enables us to express the essence of "control-ba ..."
Abstract
-
Cited by 4 (0 self)
- Add to MetaCart
We formalize a partial evaluator for Eugenio Moggi's computational metalanguage. This formalization gives an evaluation-order independent view of binding-time analysis and program specialization, including a proper treatment of call unfolding, and enables us to express the essence of "control-based binding-time improvements" for let expressions. Specifically,
Two Flavors of Offline Partial Evaluation
, 1998
"... . Type-directed partial evaluation is a new approach to program specialization for functional programming languages. Its merits with respect to the traditional offline partial evaluation approach have not yet been fully explored. We present a comparison of type-directed partial evaluation with stand ..."
Abstract
-
Cited by 3 (0 self)
- Add to MetaCart
. Type-directed partial evaluation is a new approach to program specialization for functional programming languages. Its merits with respect to the traditional offline partial evaluation approach have not yet been fully explored. We present a comparison of type-directed partial evaluation with standard offline partial evaluation in both a qualitative and quantitative way. For the latter we use implementations of both approaches in Scheme. Both approaches yield equivalent results in comparable time. 1 Introduction Partial evaluation is a technique for automatically specializing programs. One approach is offline partial evaluation where specialization is entirely driven by the results of a program analysis. We consider two offline frameworks which are superficially quite different. In the traditional approach the program analysis is a binding-time analysis, an abstraction of the semantics of specialization. A binding-time analysis determines for each program point whether the specialize...

