Proceedings Article10.1145/1806596.1806642
Mint: Java multi-stage programming using weak separability
Edwin Westbrook,Mathias Ricken,Jun Inoue,Yilong Yao,Tamer Abdelatif,Walid Taha +5 more
- 05 Jun 2010
- Vol. 45, Iss: 6, pp 400-411
58
TL;DR: 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 is proposed.
read more
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.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
Static analysis of multi-staged programs via unstaging translation
Wontae Choi,Barış Aktemur,Kwangkeun Yi,Makoto Tatsuta +3 more
- 26 Jan 2011
TL;DR: A semantic-preserving translation of multi-staged call-by-value programs into unstaged programs and a static analysis framework based on this translation, which handles staging constructs that have been evolved to be useful in practice.
A Survey of Metaprogramming Languages
Yannis Lilis,Anthony Savidis +1 more
TL;DR: The concept of metaprogramming is the process of writing computer programs that treat programs as data, enabling them to analyze or transform existing programs or generate new ones.
30
•Journal Article
ML-like inference for classifiers
TL;DR: This paper starts with the observation that inference for the full classifier-based system fails, and identifies a subset of the original system for which inference is possible, which uses implicit classifiers and retains significant expressivity.
29
Combinators for impure yet hygienic code generation
Yukiyoshi Kameyama,Oleg Kiselyov,Chung-chieh Shan +2 more
- 11 Jan 2014
TL;DR: This work presents a code-combinator framework that lets us express arbitrary monadic effects, including mutable references and delimited control, that move open code across generated binders, and demonstrates statically safe and well-scoped loop exchange and constant factoring from arbitrarily nested loops.
Reasoning about multi-stage programs
Jun Inoue,Walid Taha +1 more
- 24 Mar 2012
TL;DR: A sound and complete notion of applicative bisimulation is provided, which establishes such facts or, in principle, any valid program equivalence in multi-stage functional programs.
References
The university of Florida sparse matrix collection
Timothy A. Davis,Yifan Hu +1 more
TL;DR: The University of Florida Sparse Matrix Collection, a large and actively growing set of sparse matrices that arise in real applications, is described and a new multilevel coarsening scheme is proposed to facilitate this task.
4.3K
C and tcc: a language and compiler for dynamic code generation
TL;DR: The article presents many examples of how 'C can be used to solve practical problems; in some aplications, it is most important to generate code quickly, while in others code quality matters more than compilation speed.
Environment classifiers
Walid Taha,Michael Florentin Nielsen +1 more
- 15 Jan 2003
TL;DR: This paper proposes and develops the basic theory for a new approach to typing multi-stage languages based a notion of environment classifiers, and proposes an approach to integrating the two, and proves type preservation in this setting.
124
The habanero multicore software research project
Rajkishore Barik,Zoran Budimlić,Vincent Cavé,Sanjay Chatterjee,Yi Guo,David M. Peixotto,Raghavan Raman,Jun Shirako,Sagnak Tasirlar,Yonghong Yan,Yisheng Zhao,Vivek Sarkar +11 more
- 25 Oct 2009
TL;DR: The main components of Rice University's Habanero Multicore Software Research Project are described, which proposes a new approach to multicore software enablement based on a two-level programming model consisting of a higher-level coordination language for domain experts and a lower-level parallel language for programming experts.
90
Generating AspectJ Programs with Meta-AspectJ
David Zook,Shan Shan Huang,Yannis Smaragdakis +2 more
- 24 Oct 2004
TL;DR: Meta-AspectJ is a language tool for generating AspectJ programs using code templates that minimizes the number of meta-programming (quote/unquote) operators and uses type inference to reduce the need to remember type names for syntactic entities.
71
Related Papers (5)
Tim Sheard,Simon Jones +1 more
- 03 Oct 2002
Walid Taha,Michael Florentin Nielsen +1 more
- 15 Jan 2003
Yukiyoshi Kameyama,Oleg Kiselyov,Chung-chieh Shan +2 more
- 19 Jan 2009
Walid Taha,Tim Sheard +1 more
- 01 Dec 1997