Semantics-Based Compiling: A Case Study in Type-Directed Partial
Evaluation
Olivier Danvy May 1996 |
Abstract:We illustrate a simple and effective solution to semantics-based compiling. Our solution is based on type-directed partial evaluation, where
Our compiling technique uses the first Futamura projection, i.e., we compile programs by specializing a definitional interpreter with respect to this program. Our definitional interpreter is completely straightforward, stack-based, and in direct style. In particular, it requires no clever staging technique (currying, continuations, binding-time improvements, etc.), nor does it rely on any other framework (attribute grammars, annotations, etc.) than the typed lambda-calculus. In particular, it uses no other program analysis than traditional type inference. The overall simplicity and effectiveness of the approach has encouraged us to write this paper, to illustrate this genuine solution to denotational semantics-directed compilation, in the spirit of Scott and Strachey.
Available as PostScript, PDF, DVI. |