Results 1 -
4 of
4
Cogen in Six Lines
- Proc. International Conference on Functional Programming
, 1996
"... We have designed and implemented a program-generator generator (PGG) for an untyped higher-order functional programming language. The program generators perform continuation-based multi-level offline specialization and thus combine the most powerful and general offline partial evaluation techniques. ..."
Abstract
-
Cited by 27 (10 self)
- Add to MetaCart
We have designed and implemented a program-generator generator (PGG) for an untyped higher-order functional programming language. The program generators perform continuation-based multi-level offline specialization and thus combine the most powerful and general offline partial evaluation techniques. The correctness of the PGG is ensured by deriving it from a multi-level specializer. Our PGG is extremely simple to implement due to the use of multi-level techniques and higher-order abstract syntax. Keywords: partial evaluation, multi-level computation, continuations. 1 Introduction An attractive feature of partial evaluation is the ability to generate generating extensions. A generating extension for a program p with two inputs inp s and inp d is a program p-gen which accepts the static input inp s of p and produces a residual program p s which accepts the dynamic input inp d and produces the same result as JpK inp s inp d , provided both p and p s terminate. Jp-genK inp ...
Two for the Price of One: Composing Partial Evaluation and Compilation
, 1997
"... One of the flagship applications of partial evaluation is compilation and compiler generation. However, partial evaluation is usually expressed as a source-to-source transformation for high-level languages, whereas realistic compilers produce object code. We close this gap by composing a partial eva ..."
Abstract
-
Cited by 20 (3 self)
- Add to MetaCart
One of the flagship applications of partial evaluation is compilation and compiler generation. However, partial evaluation is usually expressed as a source-to-source transformation for high-level languages, whereas realistic compilers produce object code. We close this gap by composing a partial evaluator with a compiler by automatic means. Our work is a successful application of several meta-computation techniques to build the system, both in theory and in practice. The composition is an application of deforestation or fusion. The result is a run-time code generation system built from existing components. Its applications are numerous. For example, it allows the language designer to perform interpreter-based experiments with a source-to-source version of the partial evaluator before building a realistic compiler which generates object code automatically.
Sound Specialization in the Presence of Computational Effects
- In Theoretical Aspects of Computer Software
, 1997
"... Moggi's computational lambda calculus c is a well-established model of computation. We define a two-level version c of the computational lambda calculus and demonstrate that it is an inevitable description for sound specialization. We implement the calculus in terms of a standard two-level lambda c ..."
Abstract
-
Cited by 14 (5 self)
- Add to MetaCart
Moggi's computational lambda calculus c is a well-established model of computation. We define a two-level version c of the computational lambda calculus and demonstrate that it is an inevitable description for sound specialization. We implement the calculus in terms of a standard two-level lambda calculus via a continuation-passing style transformation. This transformation is sound and complete with respect to c ; it forms a reflection in the two-level lambda calculus of c . As a practical ramification of this work we show that several published specialization algorithms are unsound and develop a sound specializer similar to continuation-based specializers. Keywords: lambda calculus, partial evaluation, functional programming, continuations. 1 Introduction What is a correct partial evaluator for the lambda calculus? Most of the work addressing this question has focused on the relationship between the bindingtime analysis and the specializer [20, 21, 23,30,32,38] using a variety of ...
Towards Partial Evaluation of Full Scheme
- Reflection 96
, 1996
"... We present a binding-time analysis for Scheme which enables an offline partial evaluator to successfully treat Scheme's reflective features eval, apply, and the control operator call/cc. Additionally, our analysis empowers the specializer to select the most efficient representation for each object. ..."
Abstract
-
Cited by 12 (4 self)
- Add to MetaCart
We present a binding-time analysis for Scheme which enables an offline partial evaluator to successfully treat Scheme's reflective features eval, apply, and the control operator call/cc. Additionally, our analysis empowers the specializer to select the most efficient representation for each object. This removes some limitations of previous specializers regarding the use of higher-order functions. The theoretical development is backed by an implementation. Keywords: partial evaluation of reflective language features, meta-computation The programming language Scheme [20] is an ideal vehicle for meta-computation, specifically for partial evaluation. Part of the appropriateness of Scheme for meta-computation tasks derives from its reflective features: eval [27], which reflects the external representation of, say, a procedure to a functional value, apply, which reflects lists to argument lists, and call/cc 1 , which makes the continuation of the current expression available as a proced...

