Results 1  10
of
19
Tutorial Notes on Partial Evaluation
 Proceedings of the Twentieth Annual ACM Symposium on Principles of Programming Languages
, 1993
"... The last years have witnessed a flurry of new results in the area of partial evaluation. These tutorial notes survey the field and present a critical assessment of the state of the art. 1 Introduction Partial evaluation is a sourcetosource program transformation technique for specializing program ..."
Abstract

Cited by 237 (62 self)
 Add to MetaCart
The last years have witnessed a flurry of new results in the area of partial evaluation. These tutorial notes survey the field and present a critical assessment of the state of the art. 1 Introduction Partial evaluation is a sourcetosource program transformation technique for specializing programs with respect to parts of their input. In essence, partial evaluation removes layers of interpretation. In the most general sense, an interpreter can be defined as a program whose control flow is determined by its input data. As Abelson points out, [43, Foreword], even programs that are not themselves interpreters have important interpreterlike pieces. These pieces contain both compiletime and runtime constructs. Partial evaluation identifies and eliminates the compiletime constructs. 1.1 A complete example We consider a function producing formatted text. Such functions exist in most programming languages (e.g., format in Lisp and printf in C). Figure 1 displays a formatting functio...
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 bindingtime analy ..."
Abstract

Cited by 59 (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...
For a Better Support of Static Data Flow
 Functional Programming Languages and Computer Architecture
"... . This paper identifies and solves a class of problems that arise in binding time analysis and more generally in partial evaluation of programs: the approximation and loss of static information due to dynamic expressions with static subexpressions. Solving this class of problems yields substantial b ..."
Abstract

Cited by 59 (16 self)
 Add to MetaCart
. This paper identifies and solves a class of problems that arise in binding time analysis and more generally in partial evaluation of programs: the approximation and loss of static information due to dynamic expressions with static subexpressions. Solving this class of problems yields substantial binding time improvements and thus dramatically better results not only in the case of partial evaluation but also for static analyses of programs  this last point actually is related to a theoretical result obtained by Nielson. Our work can also be interpreted as providing a solution to the problem of conditionally static data, the dual of partially static data. We point out which changes in the control flow of a source program may improve its static data flow. Unfortunately they require one to iterate earlier phases of partial evaluation. We show how these changes are subsumed by transforming the source program into continuationpassing style (CPS). The transformed programs get specializ...
Program specialization via program slicing
 Proceedings of the Dagstuhl Seminar on Partial Evaluation, volume 1110 of Lecture Notes in Computer Science
, 1996
"... This paper concerns the use of program slicing to perform a certain kind of programspecialization operation. The specialization operation that slicing performs is different from the specialization operations performed by algorithms for partial evaluation, supercompilation, bifurcation, and deforest ..."
Abstract

Cited by 55 (4 self)
 Add to MetaCart
This paper concerns the use of program slicing to perform a certain kind of programspecialization operation. The specialization operation that slicing performs is different from the specialization operations performed by algorithms for partial evaluation, supercompilation, bifurcation, and deforestation. In particular, we present an example in which the specialized program that we create via slicing could not be created as the result of applying partial evaluation, supercompilation, bifurcation, or deforestation to the original unspecialized program. Specialization via slicing also possesses an interesting property that partial evaluation, supercompilation, and bifurcation do not possess: The latter operations are somewhat limited in the sense that they support tailoring of existing software only according to the ways in which parameters of functions and procedures are used in a program. Because parameters to functions and procedures represent the range of usage patterns that the designer of a piece of software has anticipated, partial evaluation, supercompilation, and bifurcation support specialization only in ways that have already been “foreseen ” by the software’s author. In contrast, the specialization operation that slicing supports permits programs to be specialized in ways
Efficient analyses for realistic offline partial evaluation
 Journal of Functional Programming
, 1993
"... Based on Henglein’s efficient bindingtime analysis for the lambda calculus (with constants and “fix”) [Hen91], we develop four efficient analyses for use in the preprocessing phase of Similix, a selfapplicable partial evaluator for a higherorder subset of Scheme. The analyses developed in this pa ..."
Abstract

Cited by 48 (1 self)
 Add to MetaCart
Based on Henglein’s efficient bindingtime analysis for the lambda calculus (with constants and “fix”) [Hen91], we develop four efficient analyses for use in the preprocessing phase of Similix, a selfapplicable partial evaluator for a higherorder subset of Scheme. The analyses developed in this paper are almostlinear in the size of the analysed program. (1) A flow analysis determines possible value flow between lambdaabstractions and function applications and between constructor applications and selector/predicate applications. The flow analysis is not particularly biased towards partial evaluation; the analysis corresponds to the closure analysis of [Bon91b]. (2) A (monovariant) bindingtime analysis distinguishes static from dynamic values; the analysis treats both higherorder functions and partially static data structures. (3) A new isused analysis, not present in [Bon91b], finds a nonminimal bindingtime annotation which is “safe ” in a certain way: a firstorder value may only become static if its result is “needed ” during specialization; this “poor man’s generalization ” [Hol88] increases termination of specialization. (4) Finally, an evaluationorder dependency analysis ensures that the order of sideeffects is preserved in the residual program. The four analyses are performed
Generating Transformers for Deforestation and Supercompilation
 Static Analysis, volume 864 of Lecture Notes in Computer Science
, 1994
"... . Our aim is to study how the interpretive approach  inserting an interpreter between a source program and a program specializer  can be used to improve the transformation of programs and to automatically generate program transformers by selfapplication of a program specializer. We show ..."
Abstract

Cited by 26 (7 self)
 Add to MetaCart
. Our aim is to study how the interpretive approach  inserting an interpreter between a source program and a program specializer  can be used to improve the transformation of programs and to automatically generate program transformers by selfapplication of a program specializer. We show that a few semanticspreserving transformations applied to a straightforward interpretive definition of a firstorder, callbyname language are sufficient to generate Wadler's deforestation algorithm and a version of Turchin's supercompiler using a partial evaluator. The transformation is guided by the need to bindingtime improve the interpreters. 1 Introduction Our aim is to study the interpretive approach to improve the transformation of source programs and to automatically generate standalone transformers [Tur93, GJ94]. The essence of the interpretive approach is to insert an interpreter between a source program and a generic program specializer. As defined by the specializer pro...
Towards Unifying Partial Evaluation, Deforestation, Supercompilation, and GPC
, 1994
"... We study four transformation methodologies which are automatic instances of Burstall and Darlington's fold/unfold framework: partial evaluation, deforestation, supercompilation, and generalized partial computation (GPC). One can classify these and other fold/unfold based transformers by how much inf ..."
Abstract

Cited by 22 (0 self)
 Add to MetaCart
We study four transformation methodologies which are automatic instances of Burstall and Darlington's fold/unfold framework: partial evaluation, deforestation, supercompilation, and generalized partial computation (GPC). One can classify these and other fold/unfold based transformers by how much information they maintain during transformation. We introduce the positive supercompiler, a version of deforestation including more information propagation, to study such a classification in detail. Via the study of positive supercompilation we are able to show that partial evaluation and deforestation have simple information propagation, positive supercompilation has more information propagation, and supercompilation and GPC have even more information propagation. The amount of information propagation is significant: positive supercompilation, GPC, and supercompilation can specialize a general pattern matcher to a fixed pattern so as to obtain efficient output similar to that of the KnuthMorrisPratt algorithm. In the case of partial evaluation and deforestation, the general matcher must be rewritten to achieve this.
Towards a New Perspective on Partial Evaluation
 Yale University
, 1992
"... this paper is divided into three sections. The first presents a classification scheme for the types of divergences that partial evaluators experience and a discussion of different forms of termination (reuse) mechanisms. Next, useanalysis and its application to termination and reuse mechanisms are ..."
Abstract

Cited by 13 (1 self)
 Add to MetaCart
this paper is divided into three sections. The first presents a classification scheme for the types of divergences that partial evaluators experience and a discussion of different forms of termination (reuse) mechanisms. Next, useanalysis and its application to termination and reuse mechanisms are presented. The paper closes with our plans for future research and some conclusions.
A Constraintbased Partial Evaluator for Functional Logic Programs and its Application
, 1998
"... The aim of this work is the development and application of a partial evaluation procedure for rewritingbased functional logic programs. Functional logic programming languages unite the two main declarative programming paradigms. The rewritingbased computational model extends traditional functional ..."
Abstract

Cited by 12 (0 self)
 Add to MetaCart
The aim of this work is the development and application of a partial evaluation procedure for rewritingbased functional logic programs. Functional logic programming languages unite the two main declarative programming paradigms. The rewritingbased computational model extends traditional functional programming languages by incorporating logical features, including logical variables and builtin search, into its framework. This work is the first to address the automatic specialisation of these functional logic programs. In particular, a theoretical framework for the partial evaluation of rewritingbased functional logic programs is defined and its correctness is established. Then, an algorithm is formalised which incorporates the theoretical framework for the procedure in a fully automatic technique. Constraint solving is used to represent additional information about the terms encountered during the transformation in order to improve the efficiency and size of the residual programs. ...
Constraints to Stop HigherOrder Deforestation
 In 24th ACM Symposium on Principles of Programming Languages
, 1997
"... Wadler's deforestation algorithm eliminates intermediate data structures from functional programs. To be suitable for inclusion in a compiler, it must terminate on all programs. Several techniques to ensure termination of deforestation on all firstorder programs are known, but a technique for highe ..."
Abstract

Cited by 12 (1 self)
 Add to MetaCart
Wadler's deforestation algorithm eliminates intermediate data structures from functional programs. To be suitable for inclusion in a compiler, it must terminate on all programs. Several techniques to ensure termination of deforestation on all firstorder programs are known, but a technique for higherorder programs was only recently introduced by Hamilton, and elaborated and implemented in the Glasgow Haskell compiler by Marlow. We introduce a new technique for ensuring termination of deforestation on all higherorder programs that allows useful transformation steps prohibited in Hamilton's and Marlowe's techniques. 1 Introduction Lazy, higherorder, functional programming languages lend themselves to a certain style of programming which uses intermediate data structures [28]. Example 1 Consider the following program. letrec a = x; y:case x of [] ! y (h : t) ! h : a t y in u; v; w: a (a u v) w The term u; v; w:a (a u v) w appends the three lists u, v, and w. Appending u and v ...