Implicitly Heterogeneous Multi-Stage ProgrammingShow others and affiliations
2005 (English)In: Generative Programming and Component Engineering: 4th International Conference, GPCE 2005, Tallinn, Estonia, September 29 - October 1, 2005. Proceedings / [ed] Robert Glück, Michael Lowry, Heidelberg: Springer, 2005, p. 275-292Conference paper, Published paper (Refereed)
Abstract [en]
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.
Place, publisher, year, edition, pages
Heidelberg: Springer, 2005. p. 275-292
Series
Lecture Notes in Computer Science, ISSN 0302-9743 ; 3676
Keywords [en]
Benchmarking, Codes (symbols), Formal languages, Numerical analysis, Online systems
National Category
Computer Systems
Identifiers
URN: urn:nbn:se:hh:diva-21100DOI: 10.1007/11561347_19ISI: 000233551600019Scopus ID: 2-s2.0-33646129674ISBN: 3540291385 ISBN: 9783540291381 OAI: oai:DiVA.org:hh-21100DiVA, id: diva2:588270
Conference
4th International Conference on Generative Programming and Component Engineering (GPCE), Utrecht Univ, Tallinn, ESTONIA, SEP 29-OCT 01, 2005
2013-01-152013-01-152021-05-11Bibliographically approved