Deriving Compilers and Virtual Machines for a Multi-Level Language

By Atsushi Igarashi and Masashi Iwaki. In Proceedings of the 5th Asian Symposium on Programming Languages and Systems, volume 4087 of Lecture Notes in Computer Science, pages 206-221, Singapore, November/December 2007. Springer-Verlag

Abstract

We develop virtual machines and compilers for a multi-level language, which supports multi-stage specialization by composing program fragments with quotation mechanisms. We consider two styles of virtual machines---ones equipped with special instructions for code generation and ones without---and show that the latter kind can deal with, more easily, low-level code generation, which avoids the overhead of (run-time) compilation by manipulating instruction sequences, rather than source-level terms, as data. The virtual machines and accompanying compilers are derived by program transformation, which extends Ager et al.'s derivation of virtual machines from evaluators.

File(s)