Results 1 - 10
of
17
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...
Representing control: a study of the CPS transformation
, 1992
"... This paper investigates the transformation of v -terms into continuation-passing style (CPS). We show that by appropriate j-expansion of Fischer and Plotkin's two-pass equational specification of the CPS transform, we can obtain a static and context-free separation of the result terms into "esse ..."
Abstract
-
Cited by 69 (6 self)
- Add to MetaCart
This paper investigates the transformation of v -terms into continuation-passing style (CPS). We show that by appropriate j-expansion of Fischer and Plotkin's two-pass equational specification of the CPS transform, we can obtain a static and context-free separation of the result terms into "essential" and "administrative" constructs. Interpreting the former as syntax builders and the latter as directly executable code, we obtain a simple and efficient one-pass transformation algorithm, easily extended to conditional expressions, recursive definitions, and similar constructs. This new transformation algorithm leads to a simpler proof of Plotkin's simulation and indifference results. Further we show how CPS-based control operators similar to but more general than Scheme's call/cc can be naturally accommodated by the new transformation algorithm. To demonstrate the expressive power of these operators, we use them to present an equivalent but even more concise formulation of t...
A Tour of Schism: A Partial Evaluation System For Higher-Order Applicative Languages
- Proceedings of the Second ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation
, 1993
"... ion Parameters Expr)) (b) Standard Syntax Figure 5: Abstract Syntax (define (spec ae env prog cache) (caseType ae [(Id e) (specId e cache)] [(Ev e) (specEv e env prog cache)] [(AType tn) (specType tn cache)] [(ParLookup n) (dParLookup n env cache)] [(ParLookupFreeze n) (dParLookupFreeze n env cache) ..."
Abstract
-
Cited by 68 (12 self)
- Add to MetaCart
ion Parameters Expr)) (b) Standard Syntax Figure 5: Abstract Syntax (define (spec ae env prog cache) (caseType ae [(Id e) (specId e cache)] [(Ev e) (specEv e env prog cache)] [(AType tn) (specType tn cache)] [(ParLookup n) (dParLookup n env cache)] [(ParLookupFreeze n) (dParLookupFreeze n env cache)] [(IfReduce ae1 ae2 ae3) (dIfReduce ae1 ae2 ae3 env prog cache)] [(IfRecons ae1 ae2 ae3) (dIfRecons ae1 ae2 ae3 env prog cache)] [(IfFreeze ae1 ae2 ae3) (dIfFreeze ae1 ae2 ae3 env prog cache)] [(OpSelect idValue) (dOpSelect idValue prog cache)] [(AbsSelect absId statFreeVars liftFreeVars) (dAbsSelect absId statFreeVars liftFreeVars env prog cache)] [(AbsFreeze absId) (dAbsFreeze absId env prog cache)] [(Appl instPat propPat sbtPat ae aes) (dAppl instPat propPat sbtPat ae aes env prog cache)] [(AppFreeze instPat propPat sbtPat ae aes) (dAppFreeze instPat propPat sbtPat ae aes env prog cache)] [(AppRecons ae aes) (dAppRecons ae aes env prog cache)])) Figure 6: Main Specialization Function F...
The essence of eta-expansion in partial evaluation
- LISP AND SYMBOLIC COMPUTATION
, 1995
"... Selective eta-expansion is a powerful "binding-time improvement", i.e., a source-program modification that makes a partial evaluator yield better results. But like most binding-time improvements, the exact problem it solves and the reason why have not been formalized and are only understood by few. ..."
Abstract
-
Cited by 32 (11 self)
- Add to MetaCart
Selective eta-expansion is a powerful "binding-time improvement", i.e., a source-program modification that makes a partial evaluator yield better results. But like most binding-time 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 eta-redexes in terms of monovariant binding-time propagation: eta-redexes preserve the static data ow of a source program by interfacing static higher-order values in dynamic contexts and dynamic higher-order values in static contexts. They contribute to two distinct binding-time improvements. We present two extensions of Gomard's monovariant binding-time analysis for the pure-calculus. Our extensions annotate and eta-expand-terms. The rst one eta-expands static higher-order values in dynamic contexts. The second also eta-expands dynamic higher-order values in static contexts. As a significant application, we show that our first binding-time analysis suffices to reformulate the traditional formulation of a CPS transformation into a modern onepass CPS transformer. This binding-time improvement is known, but it is still left unexplained in contemporary literature, e.g., about "cps-based" partial evaluation. We also outline the counterpart of eta-expansion for partially static data structures.
Eta-Expansion does the Trick
- ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS
, 1996
"... Partial-evaluation folklore has it that massaging one's source programs can make them specialize better. In Jones, Gomard, and Sestoft's recent textbook, a whole chapter is dedicated to listing such "binding-time improvements": nonstandard use of continuationpassing style, eta-expansion, and a popul ..."
Abstract
-
Cited by 22 (6 self)
- Add to MetaCart
Partial-evaluation folklore has it that massaging one's source programs can make them specialize better. In Jones, Gomard, and Sestoft's recent textbook, a whole chapter is dedicated to listing such "binding-time improvements": nonstandard use of continuationpassing style, eta-expansion, and a popular transformation called "The Trick". We provide a unified view of these binding-time improvements, from a typing perspective. Just as a
Fixpoint Computation for Polyvariant Static Analyses of Higher-Order Applicative Programs
- ACM Transactions on Programming Languages and Systems
, 1994
"... interpretation [Abramsky and Hankin 1987; Cousot 1981; Jones and Nielson 1990] has been used to formulate a wide variety of static analyses aimed at optimizing programs in practical programming languages. Research in the area has been focusing on the conceptual and formal aspects of the topic. Speci ..."
Abstract
-
Cited by 11 (5 self)
- Add to MetaCart
interpretation [Abramsky and Hankin 1987; Cousot 1981; Jones and Nielson 1990] has been used to formulate a wide variety of static analyses aimed at optimizing programs in practical programming languages. Research in the area has been focusing on the conceptual and formal aspects of the topic. Special emphasis has been put on such issues as accuracy, termination, and relating non-standard and standard semantic definitions. However, the practical aspects involved in implementing an abstract interpreter have not received as much attention. This situation is even more pronounced for analyses of languages with higher-order functions. A static analysis includes a critical phase that consists of finding a fixpoint to a set of (possibly) recursive abstract functions derived from the analyzed program. To be of any practical use, an analysis should include an efficient and accurate fixpoint algorithm. The efficiency depends mostly on this accuracy. For example, some analyses only determine one ...
ML partial evaluation using set-based analysis
- Record of the 1994 ACM SIGPLAN Workshop on ML and its Applications, Rapport de recherche N o 2265, INRIA
, 1994
"... 8313, issued by ESD/AVS under Contract No. F19628-91-C-0168. It was also partially sponsored ..."
Abstract
-
Cited by 10 (4 self)
- Add to MetaCart
8313, issued by ESD/AVS under Contract No. F19628-91-C-0168. It was also partially sponsored
On-line Off-line Partial Evaluation: Semantic Specifications and Correctness Proofs
- Yale University
, 1993
"... This paper presents semantic specifications and correctness proofs for both on-line and offline partial evaluation of strict first-order functional programs. To do so, our strategy consists of defining a core semantics as a basis for the specification of three non-standard evaluations: instrumented ..."
Abstract
-
Cited by 9 (1 self)
- Add to MetaCart
This paper presents semantic specifications and correctness proofs for both on-line and offline partial evaluation of strict first-order functional programs. To do so, our strategy consists of defining a core semantics as a basis for the specification of three non-standard evaluations: instrumented evaluation, on-line and off-line partial evaluation. We then use the technique of logical relations to prove the correctness of both on-line and off-line partial evaluation semantics. The contributions of this work are as follows. 1. We provide a uniform framework to defining and proving correct both on-line and off-line partial evaluation. 2. This work required a formal specification of on-line partial evaluation with polyvariant specialization. We define criteria for its correctness with respect to an instrumented standard semantics. As a byproduct, on-line partial evaluation appears to be based on a fixpoint iteration process, just like binding-time analysis. 3. We show that binding-time...

