C and tcc: a language and compiler for dynamic code generation
ACM Transactions on Programming Languages and Systems (TOPLAS)
POPL '03 Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Multi-Stage Programming: Axiomatization and Type Safety
ICALP '98 Proceedings of the 25th International Colloquium on Automata, Languages and Programming
Jumbo: run-time code generation for Java and its applications
Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization
Automatic program specialization for Java
ACM Transactions on Programming Languages and Systems (TOPLAS)
Implementing multi-stage languages using ASTs, Gensym, and reflection
Proceedings of the 2nd international conference on Generative programming and component engineering
Compiling for template-based run-time code generation
Journal of Functional Programming
A polymorphic modal type system for lisp-like multi-staged languages
Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Reflective program generation with patterns
Proceedings of the 5th international conference on Generative programming and component engineering
The java module system: core design and semantic definition
Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications
Closing the stage: from staged code to typed closures
PEPM '08 Proceedings of the 2008 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Expressive and safe static reflection with MorphJ
Proceedings of the 2008 ACM SIGPLAN conference on Programming language design and implementation
Shifting the stage: staging with delimited control
Proceedings of the 2009 ACM SIGPLAN workshop on Partial evaluation and program manipulation
Statically safe program generation with safegen
GPCE'05 Proceedings of the 4th international conference on Generative Programming and Component Engineering
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
MetaFJig: a meta-circular composition language for Java-like classes
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
Static analysis of multi-staged programs via unstaging translation
Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Program logics for homogeneous meta-programming
LPAR'10 Proceedings of the 16th international conference on Logic for programming, artificial intelligence, and reasoning
Backstage Java: making a difference in metaprogramming
Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
DrHJ: a lightweight pedagogic IDE for Habanero Java
Proceedings of the 9th International Conference on Principles and Practice of Programming in Java
Streams that compose using macros that oblige
PEPM '12 Proceedings of the ACM SIGPLAN 2012 workshop on Partial evaluation and program manipulation
Polymorphic multi-stage language with control effects
APLAS'11 Proceedings of the 9th Asian conference on Programming Languages and Systems
Proceedings of the 27th Annual ACM Symposium on Applied Computing
Reasoning about multi-stage programs
ESOP'12 Proceedings of the 21st European conference on Programming Languages and Systems
Staged computation with staged lexical scope
ESOP'12 Proceedings of the 21st European conference on Programming Languages and Systems
Marco: safe, expressive macros for any language
ECOOP'12 Proceedings of the 26th European conference on Object-Oriented Programming
A meta-circular language for active libraries
PEPM '13 Proceedings of the ACM SIGPLAN 2013 workshop on Partial evaluation and program manipulation
Self model-driven engineering through metaprograms
Proceedings of the 17th Panhellenic Conference on Informatics
Combinators for impure yet hygienic code generation
Proceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation
Hi-index | 0.02 |
Multi-stage programming (MSP) provides a disciplined approach to run-time code generation. In the purely functional setting, it has been shown how MSP can be used to reduce the overhead of abstractions, allowing clean, maintainable code without paying performance penalties. Unfortunately, MSP is difficult to combine with imperative features, which are prevalent in mainstream languages. The central difficulty is scope extrusion, wherein free variables can inadvertently be moved outside the scopes of their binders. This paper proposes a new approach to combining MSP with imperative features that occupies a "sweet spot" in the design space in terms of how well useful MSP applications can be expressed and how easy it is for programmers to understand. The key insight is that escapes (or "anti-quotes") must be weakly separable from the rest of the code, i.e. the computational effects occurring inside an escape that are visible outside the escape are guaranteed to not contain code. To demonstrate the feasibility of this approach, we formalize a type system based on Lightweight Java which we prove sound, and we also provide an implementation, called Mint, to validate both the expressivity of the type system and the effect of staging on the performance of Java programs.