Results 1  10
of
15
Efficient Multilevel Generating Extensions for Program Specialization
, 1995
"... . Multiple program specialization can stage a computation into several computation phases. This paper presents an effective solution for multiple program specialization by generalizing conventional offline partial evaluation and integrating the "cogen approach" with a multilevel binding ..."
Abstract

Cited by 64 (5 self)
 Add to MetaCart
. Multiple program specialization can stage a computation into several computation phases. This paper presents an effective solution for multiple program specialization by generalizing conventional offline partial evaluation and integrating the "cogen approach" with a multilevel bindingtime analysis. This novel "multicogen approach" solves two fundamental problems of selfapplicable partial evaluation: the generationtime problem and the generatorsize problem. The multilevel program generator has been implemented for a higherorder subset of Scheme. Experimental results show a remarkable reduction of generation time and generator size compared to previous attempts of multiple selfapplication. 1 Introduction Stages of computation arise naturally in many programs, depending on the availability of data or the frequency with which the input changes. Code for later stages can be optimized based on values available in earlier stages. Partial evaluation has received much attention beca...
The essence of etaexpansion in partial evaluation
 LISP AND SYMBOLIC COMPUTATION
, 1995
"... Selective etaexpansion is a powerful "bindingtime improvement", i.e., a sourceprogram modification that makes a partial evaluator yield better results. But like most bindingtime improvements, the exact problem it solves and the reason why have not been formalized and are only understoo ..."
Abstract

Cited by 34 (11 self)
 Add to MetaCart
Selective etaexpansion is a powerful "bindingtime improvement", i.e., a sourceprogram modification that makes a partial evaluator yield better results. But like most bindingtime improvements, the exact problem it solves and the reason why have not been formalized and are only understood by few. In this paper, we describe the problem and the effect of etaredexes in terms of monovariant bindingtime propagation: etaredexes preserve the static data ow of a source program by interfacing static higherorder values in dynamic contexts and dynamic higherorder values in static contexts. They contribute to two distinct bindingtime improvements. We present two extensions of Gomard's monovariant bindingtime analysis for the purecalculus. Our extensions annotate and etaexpandterms. The rst one etaexpands static higherorder values in dynamic contexts. The second also etaexpands dynamic higherorder values in static contexts. As a significant application, we show that our first bindingtime analysis suffices to reformulate the traditional formulation of a CPS transformation into a modern onepass CPS transformer. This bindingtime improvement is known, but it is still left unexplained in contemporary literature, e.g., about "cpsbased" partial evaluation. We also outline the counterpart of etaexpansion for partially static data structures.
Cogen in Six Lines
 Proc. International Conference on Functional Programming
, 1996
"... We have designed and implemented a programgenerator generator (PGG) for an untyped higherorder functional programming language. The program generators perform continuationbased multilevel offline specialization and thus combine the most powerful and general offline partial evaluation techniques. ..."
Abstract

Cited by 31 (11 self)
 Add to MetaCart
We have designed and implemented a programgenerator generator (PGG) for an untyped higherorder functional programming language. The program generators perform continuationbased multilevel 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 multilevel specializer. Our PGG is extremely simple to implement due to the use of multilevel techniques and higherorder abstract syntax. Keywords: partial evaluation, multilevel 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 pgen 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. JpgenK inp ...
An Automatic Program Generator for MultiLevel Specialization
 LISP AND SYMBOLIC COMPUTATION
, 1997
"... Program specialization can divide a computation into several computation stages. This paper investigates the theoretical limitations and practical problems of standard specialization tools, presents multilevel specialization, and demonstrates that, in combination with the cogen approach, it is far ..."
Abstract

Cited by 28 (4 self)
 Add to MetaCart
Program specialization can divide a computation into several computation stages. This paper investigates the theoretical limitations and practical problems of standard specialization tools, presents multilevel specialization, and demonstrates that, in combination with the cogen approach, it is far more practical than previously supposed. The program generator which we designed and implemented for a higherorder functional language converts programs into very compact multilevel generating extensions that guarantee fast successive specialization. Experimental results show a remarkable reduction of generation time and generator size compared to previous attempts of multilevel specialization by selfapplication. Our approach to multilevel specialization seems wellsuited for applications where generation time and program size are critical.
Sound Specialization in the Presence of Computational Effects
 In Theoretical Aspects of Computer Software
, 1997
"... Moggi's computational lambda calculus c is a wellestablished model of computation. We define a twolevel 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 twolevel lam ..."
Abstract

Cited by 15 (5 self)
 Add to MetaCart
Moggi's computational lambda calculus c is a wellestablished model of computation. We define a twolevel 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 twolevel lambda calculus via a continuationpassing style transformation. This transformation is sound and complete with respect to c ; it forms a reflection in the twolevel 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 continuationbased 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 ...
A selfapplicable 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 fixedpoint 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 12 (3 self)
 Add to MetaCart
(Show Context)
This paper (essentially [12, Chapter 8]) describes partial evaluation for the lambda calculus, augmented with an explicit fixedpoint 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 higherorder facilities. The requirements on bindingtime analysis are formulated via a type system and an ecient bindingtime analysis via constraint solving is outlined. The partial evaluator is proven correct.
Online Partial Evaluation for Shift and Reset
, 2002
"... This paper presents an online partial evaluator for the lambdacalculus with the delimited continuation constructs shift and reset. We first give the semantics of the delimited continuation constructs in two ways: one by writing a continuation passing style (CPS) interpreter and the other by transfo ..."
Abstract

Cited by 10 (1 self)
 Add to MetaCart
This paper presents an online partial evaluator for the lambdacalculus with the delimited continuation constructs shift and reset. We first give the semantics of the delimited continuation constructs in two ways: one by writing a continuation passing style (CPS) interpreter and the other by transforming them into CPS. We then combine them to obtain a partial evaluator written in CPS which produces the result in CPS. By transforming this partial evaluator back into a direct style (DS) in two steps, we obtain a DS to DS partial evaluator written in DS. The correctness of the partial evaluator is not yet formally proven. The difficulty comes from the fact that the partial evaluator is written using shift and reset. The method for reasoning about such programs is not yet established. However, the development of the partial evaluator is detailed in the paper to give a degree of confidence that it behaves as we expect.
The Second Futamura Projection for TypeDirected Partial Evaluation
 HIGHERORDER AND SYMBOLIC COMPUTATION
, 1999
"... A generating extension of a program specializes it with respect to some specified part of the input. A generating extension of a program can be formed trivially by applying a partial evaluator to the program; the second Futamura projection describes the automatic generation of nontrivial genera ..."
Abstract

Cited by 9 (2 self)
 Add to MetaCart
A generating extension of a program specializes it with respect to some specified part of the input. A generating extension of a program can be formed trivially by applying a partial evaluator to the program; the second Futamura projection describes the automatic generation of nontrivial generating extensions by applying a partial evaluator to itself with respect to the programs. We derive
Multistage programming with functors and monads: eliminating abstraction overhead from generic code
, 2008
"... ..."
CallByName CPSTranslation as a BindingTime Improvement
 STATIC ANALYSIS, NUMBER 983 IN LECTURE NOTES IN COMPUTER SCIENCE
, 1995
"... Much attention has been given to the callbyvalue continuation passing style (CBV CPS) translation as a tool in partial evaluation, but the callbyname (CBN) CPS translation has not been investigated. We undertake a systematic investigation of the effect of CBN CPS in connection with partial evalu ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
Much attention has been given to the callbyvalue continuation passing style (CBV CPS) translation as a tool in partial evaluation, but the callbyname (CBN) CPS translation has not been investigated. We undertake a systematic investigation of the effect of CBN CPS in connection with partial evaluation and deforestation. First, we give an example where CBN CPS translation acts as a binding time improvement to achieve the effects of deforestation using partial evaluation. The same effect cannot be achieved with CBV CPS. Second, we prove formally that the CBN CPS translation together with partial evaluation has the power to achieve all the effects of deforestation. The consequence of these results is a practical tool (the CBN CPS) for improving the results of partial evaluation, as well as an improved understanding of the relation between partial evaluation and deforestation.