Title
Mint: Java multi-stage programming using weak separability
Abstract
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.
Year
DOI
Venue
2010
10.1145/1806596.1806642
PLDI '02 Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation
Keywords
Field
DocType
technology,java,type system
Metaprogramming,Programming language,Abstraction,Partial evaluation,Computer science,Free variables and bound variables,Type theory,Real-time computing,Code generation,Multi-stage programming,Java
Conference
Volume
Issue
ISSN
45
6
0362-1340
Citations 
PageRank 
References 
23
0.95
14
Authors
6
Name
Order
Citations
PageRank
Edwin Westbrook1927.24
Mathias Ricken2404.60
Jun Inoue3544.55
Yilong Yao4230.95
Tamer Abdelatif5230.95
Walid Taha6102070.41