Publications:Implicitly Heterogeneous Multi-Stage Programming

Jump to: navigation, search

Do not edit this section

Keep all hand-made modifications below

Title Implicitly Heterogeneous Multi-Stage Programming
Author Jason Eckhardt and Roumen Kaiabachev and Emir Pasalic and Kedar Swadi and Walid Taha
Year 2005
PublicationType Conference Paper
HostPublication Generative Programming and Component Engineering : 4th International Conference, GPCE 2005, Tallinn, Estonia, September 29 - October 1, 2005. Proceedings
Conference 4th International Conference on Generative Programming and Component Engineering (GPCE), Utrecht Univ, Tallinn, ESTONIA, SEP 29-OCT 01, 2005
Diva url
Abstract Previous work on semantics-based multi-stage programming(MSP) language design focused on homogeneous designs, where the generating and the generated languages are the same. Homogeneous designssimply add a hygienic quasi-quotation and evaluation mechanism to abase language. An apparent disadvantage of this approach is that theprogrammer is bound to both the expressivity and performance characteristics of the base language. This paper proposes a practical means toavoid this by providing specialized translations from subsets of the baselanguage to different target languages. This approach preserves the homogeneous “look” of multi-stage programs, and, more importantly, thestatic guarantees about the generated code. In addition, compared to anexplicitly heterogeneous approach, it promotes reuse of generator sourcecode and systematic exploration of the performance characteristics of thetarget languages.To illustrate the proposed approach, we design and implement a translation to a subset of C suitable for numerical computation, and show thatit preserves static typing. The translation is implemented, and evaluatedwith several benchmarks. The implementation is available in the onlinedistribution of MetaOCaml.