Eager Evaluation Isn't Eager Enough A Transformation Based Approach to Semantics-Directed Code Generation
Arthur Nunes-Harwitt · 2014
An interpreter is a concise definition of the semantics of a programming language and is easily implemented. A compiler is more difficult to construct, but the code that it generates runs faster than interpreted code. This paper introduces rules for staging an interpreter so that it generates a compiler. An extended example suggests the utility of the technique. The rules are described formally and correctness is discussed. Finally, this technique is compared to staging and partial evaluation.