REALISTIC COMPILATION BY PARTIAL EVALUATION

Citation
M. Sperber et P. Thiemann, REALISTIC COMPILATION BY PARTIAL EVALUATION, ACM SIGPLAN NOTICES, 31(5), 1996, pp. 206-214
Citations number
46
Categorie Soggetti
Computer Sciences","Computer Science Software Graphycs Programming
Journal title
Volume
31
Issue
5
Year of publication
1996
Pages
206 - 214
Database
ISI
SICI code
Abstract
Two key steps in the compilation of strict functional languages are th e conversion of higher-order functions to data structures (closures) a nd the transformation to tail-recursive style. We show how to perform both steps at once by applying first-order offline partial evaluation to a suitable interpreter. The resulting code is easy to transliterate to low-level C or native code. We have implemented the compilation to C; it yields a performance comparable to that of other modern Scheme- to-C compilers. In addition, we have integrated various optimizations such as constant propagation, higher-order removal and arity raising s imply by modifying the underlying interpreter. Purely first-order meth ods suffice to achieve the transformations. Our approach is an instanc e of semantics-directed compiler generation.