Results 1 - 10
of
11
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 source-to-source program transformation technique for specializing program ..."
Abstract
-
Cited by 230 (60 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 source-to-source 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 interpreter-like pieces. These pieces contain both compile-time and run-time constructs. Partial evaluation identifies and eliminates the compile-time 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...
Opportunities for Online Partial Evaluation
, 1992
"... Partial evaluators can be separated into two classes: offline specializers, which make all of their reduce/residualize decisions before specialization, and online specializers, which make such decisions during specialization. The choice of which method to use is driven by a tradeoff between the effi ..."
Abstract
-
Cited by 87 (4 self)
- Add to MetaCart
Partial evaluators can be separated into two classes: offline specializers, which make all of their reduce/residualize decisions before specialization, and online specializers, which make such decisions during specialization. The choice of which method to use is driven by a tradeoff between the efficiency of the specializer and the quality of the residual programs that it produces. Existing research describes some of the inefficiencies of online specializers, and how these are avoided using offline methods, but fails to address the price paid in specialization quality. This paper motivates research in online specialization by describing two fundamental limitations of the offline approach, and explains why the online approach does not encounter the same difficulties.
Efficient Multi-level 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 off-line partial evaluation and integrating the "cogen approach" with a multi-level binding-time analy ..."
Abstract
-
Cited by 54 (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 off-line partial evaluation and integrating the "cogen approach" with a multi-level binding-time analysis. This novel "multi-cogen approach" solves two fundamental problems of self-applicable partial evaluation: the generation-time problem and the generator-size problem. The multilevel program generator has been implemented for a higher-order subset of Scheme. Experimental results show a remarkable reduction of generation time and generator size compared to previous attempts of multiple self-application. 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...
A Roadmap to Metacomputation by Supercompilation
, 1996
"... This paper gives a gentle introduction to Turchin's supercompilation and its applications in metacomputation with an emphasis on recent developments. First, a complete supercompiler, including positive driving and generalization, is defined for a functional language and illustrated with examples. Th ..."
Abstract
-
Cited by 33 (4 self)
- Add to MetaCart
This paper gives a gentle introduction to Turchin's supercompilation and its applications in metacomputation with an emphasis on recent developments. First, a complete supercompiler, including positive driving and generalization, is defined for a functional language and illustrated with examples. Then a taxonomy of related transformers is given and compared to the supercompiler. Finally, we put supercompilation into the larger perspective of metacomputation and consider three metacomputation tasks: specialization, composition, and inversion.
An Automatic Program Generator for Multi-Level 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 multi-level specialization, and demonstrates that, in combination with the cogen approach, it is far ..."
Abstract
-
Cited by 27 (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 multi-level 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 higher-order functional language converts programs into very compact multi-level generating extensions that guarantee fast successive specialization. Experimental results show a remarkable reduction of generation time and generator size compared to previous attempts of multi-level specialization by self-application. Our approach to multi-level specialization seems well-suited for applications where generation time and program size are critical.
Finiteness Analysis in Polynomial Time
, 2002
"... To achieve the termination of offline partial evaluation, it is necessary to ensure that static variables assume boundedly many values during specialization. Various works have addressed the analysis of variable boundedness, also called finiteness analysis, in the context of specializing first-order ..."
Abstract
-
Cited by 18 (6 self)
- Add to MetaCart
To achieve the termination of offline partial evaluation, it is necessary to ensure that static variables assume boundedly many values during specialization. Various works have addressed the analysis of variable boundedness, also called finiteness analysis, in the context of specializing first-order functional programs. The underlying reasoning is always: Observing arbitrarily many increases in a static variable during specialization must be impossible, if that would imply observing arbitrarily long sequences of size decreases among some bounded-variable values. Static analysis is used...
A Self-Applicable Supercompiler
- In Partial Evaluation. Proceedings
, 1996
"... A supercompiler is a program which can perform a deep transformation of programs using a principle which is similar to partial evaluation, and can be referred to as metacomputation. Supercompilers that have been in existence up to now (see [12], [13]) were not self-applicable: this is a more di cult ..."
Abstract
-
Cited by 13 (1 self)
- Add to MetaCart
A supercompiler is a program which can perform a deep transformation of programs using a principle which is similar to partial evaluation, and can be referred to as metacomputation. Supercompilers that have been in existence up to now (see [12], [13]) were not self-applicable: this is a more di cult problem than self-application of a partial evaluator, because of the more intricate logic of supercompilation. In the present paper we describe the rst self-applicable model of a supercompiler and present some tests. Three features distinguish it from the previous models and make self-application possible: (1) The input language is a subset of Refal which we refer to as at Refal. (2) The process of driving is performed as a transformation of pattern-matching graphs. (3) Metasystem jumps are implemented, which allows the supercompiler to avoid interpretation whenever direct computation is possible.
On the Specialization of Online Program Specializers
- Journal of Functional Programming
, 1992
"... Program specializers improve the speed of programs by performing some of the programs' reductions at specialization time rather than at runtime. This specialization process can be time-consuming; one common technique for improving the speed of the specialization of a particular program is to special ..."
Abstract
-
Cited by 12 (2 self)
- Add to MetaCart
Program specializers improve the speed of programs by performing some of the programs' reductions at specialization time rather than at runtime. This specialization process can be time-consuming; one common technique for improving the speed of the specialization of a particular program is to specialize the specializer itself on that program, creating a custom specializer, or program generator, for that particular program.
Program Transformation with Metasystem Transitions: Experiments with a Supercompiler
- PERSPECTIVES OF SYSTEM INFORMATICS. PROCEEDINGS, LNCS 1181
, 1996
"... Turchin's supercompilation is a program transformation technique for functional languages. A supercompiler is a program which can perform a deep transformation of programs using a principle which is similar to partial evaluation. In the present paper we use a supercompiler, which V.F. Turchin and w ..."
Abstract
-
Cited by 5 (0 self)
- Add to MetaCart
Turchin's supercompilation is a program transformation technique for functional languages. A supercompiler is a program which can perform a deep transformation of programs using a principle which is similar to partial evaluation. In the present paper we use a supercompiler, which V.F. Turchin and we have described in [22], [23]. The aim of our investigation has been to show, what deep changes ( w.r.t. run time ) in the programs can be achieved by supercompilation. In [21] V.F. Turchin presented a method to improve the transformational power of supercompilation without modifying the transformation system. We use this idea to show both the power of the method and abilities of our supercompiler. Our examples include a generation of both one-step unfolding and instantiations, lazy evaluation, inverse evaluation. Keywords: program transformation, optimization, recursion, supercompilation, metacomputation, metasystem transition, Refal. 1 Introduction Turchin's supercompilation is a progr...
Reasoning about Hierarchies of Online Program Specialization Systems
- In Danvy et
"... . We present the language S-Graph-n --- the core of a multilevel metaprogramming environment for exploring foundational issues of self-applicable online program specialization. We illustrate how special-purpose S-Graph-n primitives can be used to obtain an efficient and conceptually simple encoding ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
. We present the language S-Graph-n --- the core of a multilevel metaprogramming environment for exploring foundational issues of self-applicable online program specialization. We illustrate how special-purpose S-Graph-n primitives can be used to obtain an efficient and conceptually simple encoding of programs as data objects. The key feature of the encoding scheme is the use of numerical indices which indicate the number of times that a program piece has been encoded. Evaluation of S-Graph-n is formalized via an operational semantics. This semantics is used to justify the fundamental operations on metavariables --- special-purpose tags for tracking unknown values in self-applicable online specialization systems. We show how metavariables can be used to construct biased generating extensions without relying on a separate binding-time analysis phase. 1 Introduction Metasystem hierarchies have been used for more than a decade to generate compilers and other program generators. A metasy...

