No assembly required: compiling standard ML to C
ACM Letters on Programming Languages and Systems (LOPLAS)
Multi-stage programming with explicit annotations
PEPM '97 Proceedings of the 1997 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
PEPM '00 Proceedings of the 2000 ACM SIGPLAN workshop on Partial evaluation and semantics-based program manipulation
Tagless staged interpreters for typed languages
Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
POPL '03 Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
SAIG '00 Proceedings of the International Workshop on Semantics, Applications, and Implementation of Program Generation
Lightweight and Generative Components I: Source-Level Components
GCSE '99 Proceedings of the First International Symposium on Generative and Component-Based Software Engineering
Multi-Level Specialization (Extended Abstract)
Partial Evaluation - Practice and Theory, DIKU 1998 International Summer School
SAIG '00 Proceedings of the International Workshop on Semantics, Applications, and Implementation of Program Generation
Multistage programming: its theory and applications
Multistage programming: its theory and applications
Towards a fully-reflective meta-programming language
ACSC '05 Proceedings of the Twenty-eighth Australasian conference on Computer Science - Volume 38
A monadic approach for avoiding code duplication when staging memoized functions
Proceedings of the 2006 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Proceedings of the 2006 workshop on ML
In search of a program generator to implement generic transformations for high-performance computing
Science of Computer Programming - Special issue on the first MetaOCaml workshop 2004
Assimilating MetaBorg:: embedding language tools in languages
Proceedings of the 5th international conference on Generative programming and component engineering
A verified staged interpreter is a verified compiler
Proceedings of the 5th international conference on Generative programming and component engineering
Implicitly heterogeneous multi-stage programming
New Generation Computing
Shifting the stage: staging with delimited control
Proceedings of the 2009 ACM SIGPLAN workshop on Partial evaluation and program manipulation
Lightweight modular staging: a pragmatic approach to runtime code generation and compiled DSLs
GPCE '10 Proceedings of the ninth international conference on Generative programming and component engineering
Multi-stage programming with functors and monads: Eliminating abstraction overhead from generic code
Science of Computer Programming
Shifting the stage: Staging with delimited control
Journal of Functional Programming
Hi-index | 0.00 |
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 designs simply add a hygienic quasi-quotation and evaluation mechanism to a base language. An apparent disadvantage of this approach is that the programmer is bound to both the expressivity and performance characteristics of the base language. This paper proposes a practical means to avoid this by providing specialized translations from subsets of the base language to different target languages. This approach preserves the homogeneous “look” of multi-stage programs, and, more importantly, the static guarantees about the generated code. In addition, compared to an explicitly heterogeneous approach, it promotes reuse of generator source code and systematic exploration of the performance characteristics of the target languages. To illustrate the proposed approach, we design and implement a translation to a subset of C suitable for numerical computation, and show that it preserves static typing. The translation is implemented, and evaluated with several benchmarks. The implementation is available in the online distribution of MetaOCaml.