Results 1 -
2 of
2
From interpreting to compiling binding times
- Proceedings of the 3rd European Symposium on Programming
, 1990
"... The key to realistic self-applicable partial evaluation is to analyze binding times in the source program, i.e., whether the result of partially evaluating a source expression is static or dynamic, given a static/dynamic division of the input. Source programs are specialized with respect to the stat ..."
Abstract
-
Cited by 25 (7 self)
- Add to MetaCart
The key to realistic self-applicable partial evaluation is to analyze binding times in the source program, i.e., whether the result of partially evaluating a source expression is static or dynamic, given a static/dynamic division of the input. Source programs are specialized with respect to the static part of their input. When a source expression depends on the concrete result of specializing another expression, the binding time of this other expression is first interpreted. A safe approximation of these abstract values is computed by binding time analysis. This paper points out that this value-based information can be compiled into control-based directives driving the specializer as to what to do for each expression – instead of how to use the result of partially evaluating an expression. This compilation is achieved by a non-standard interpretation of the specialization semantics, based on the observation that a source expression is either reduced or rebuilt. The result is an action trees isomorphic to the abstract syntax tree of the source program. This approach suggests to reorganize the specializer so that it is driven first
Semantics-Directed Compilation of Non-Linear Patterns
- Information Processing Letters
, 1990
"... This paper describes the automatic derivation of compiled patterns and of a pattern compiler by partial evaluation. Compiling a pattern is achieved by specializing a pattern matching program with respect to the pattern. Generating a pattern compiler is achieved by specializing the specializer with r ..."
Abstract
-
Cited by 18 (4 self)
- Add to MetaCart
This paper describes the automatic derivation of compiled patterns and of a pattern compiler by partial evaluation. Compiling a pattern is achieved by specializing a pattern matching program with respect to the pattern. Generating a pattern compiler is achieved by specializing the specializer with respect to the pattern matching program, i.e., by self-applying the partial evaluator. The compiled patterns and the compiler are semantics-based because they are obtained using meaning-preserving transformations upon the definitional pattern matching program and the partial evaluator. The results are unexpectedly good: not only all are the operations depending on the pattern (syntax analysis, resolution of cross-references due to the non-linearity) performed at compile time, but whereas the general pattern matcher builds the substitution environment incrementally and for nothing in case of failure, compiled patterns perform all the structural and equality tests first, and build the result on...

