Lightweight Modular Staging: A Pragmatic Approach to Runtime Code Generation and Compiled DSLs

Software engineering demands generality and abstraction, performance demands specialization and concretization. Generative programming can provide both, but the effort required to develop high-quality program generators likely offsets their benefits, even if a multi-stage programming language is used. We present lightweight modular staging, a library-based multi-stage programming approach that breaks with the tradition of syntactic quasi-quotation and instead uses only types to distinguish between binding times. Through extensive use of component technology, lightweight modular staging makes an optimizing compiler framework available at the library level, allowing programmers to tightly integrate domain-specific abstractions and optimizations into the generation process. We argue that lightweight modular staging enables a form of language virtualization, i.e. allows to go from a pure-library embedded language to one that is practically equivalent to a stand-alone implementation with only modest effort.

Published in:
Acm Sigplan Notices, 46, 127-136
Presented at:
GPCE, Eindhoven, The Netherlands, October 10-13, 2010

Note: The status of this file is: Anyone

 Record created 2010-08-11, last modified 2020-07-30

Download fulltext

Rate this document:

Rate this document:
(Not yet reviewed)