Semantics-Based Compiling: A Case Study in Type-Directed Partial Evaluation (0)
| Venue: | Eighth International Symposium on Programming Language Implementation and Logic Programming |
| Citations: | 21 - 8 self |
BibTeX
@INPROCEEDINGS{Danvy_semantics-basedcompiling:,
author = {Olivier Danvy and René Vestergaard},
title = {Semantics-Based Compiling: A Case Study in Type-Directed Partial Evaluation},
booktitle = {Eighth International Symposium on Programming Language Implementation and Logic Programming},
year = {},
pages = {182--197}
}
OpenURL
Abstract
. We illustrate a simple and e#ective solution to semantics-based compiling. Our solution is based on "type-directed partial evaluation", and -- our compiler generator is expressed in a few lines, and is e#cient; -- its input is a well-typed, purely functional definitional interpreter in the style of denotational semantics; -- the output of the generated compiler is e#ectively three-address code, in the fashion and e#ciency of the Dragon Book; -- the generated compiler processes several hundred lines of source code per second. The source language considered in this case study is imperative, blockstructured, higher-order, call-by-value, allows subtyping, and obeys stack discipline. It is bigger than what is usually reported in the literature on semantics-based compiling and partial evaluation. Our compiling technique uses the first Futamura projection, i.e., we compile programs by specializing a definitional interpreter with respect to the program. Specialization is carri...







