Book Chapter10.1007/978-3-540-30175-2_9
Metaphor: A Multi-stage, Object-Oriented Programming Language
Gregory Neverov,Paul Roe +1 more
- 24 Oct 2004
- pp 168-185
28
TL;DR: The paper presents the language, gives a formal description of its type system and discusses a prototype implementation of the language as a compiler targeting the .NET Common Language Runtime.
read more
Abstract: This paper presents a language (called Metaphor) for expressing staged programs in a strongly-typed, imperative, object-oriented environment. The language is based on a subset of C# or Java; it is multi-stage and provides static type checking of later stage code. Object-oriented frameworks usually offer a type introspection or reflection capability to discover information about types at run-time. Metaphor allows this reflection system to be incorporated into the language’s staging constructs, thus allowing the generation of code based on the structure of types – a common application for code generation in these environments. The paper presents the language, gives a formal description of its type system and discusses a prototype implementation of the language as a compiler targeting the .NET Common Language Runtime.
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
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
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.
58
First-class runtime generation of high-performance types using exotypes
Zachary DeVito,Daniel Ritchie,Matthew Fisher,Alex Aiken,Pat Hanrahan +4 more
- 09 Jun 2014
TL;DR: This work uses staged programming to define the behavior of an exotype during a runtime compilation step and implements exotypes in Terra, a low-level staged programming language to implement high-performance libraries for serialization, dynamic assembly, automatic differentiation, and probabilistic programming.
•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
BuildIt: a type-based multi-stage programming framework for code generation in C++
Ajay Brahmakshatriya,Saman Amarasinghe +1 more
- 27 Feb 2021
TL;DR: BuildIt as discussed by the authors is a type-based multi-stage execution framework that extracts all control flow operators like if-then-else conditionals and for and while loops using a pure library approach.
12
Experiences with an object-oriented, multi-stage language
Gregory Neverov,Paul Roe +1 more
TL;DR: Some issues faced when applying multi-stage language design concepts to an imperative base language and run-time environment are discussed.
6
References
Featherweight Java: a minimal core calculus for Java and GJ
TL;DR: This work extends Featherweight Java with generic classes in the style of GJ and gives a detailed proof of type safety, which formalizes for the first time some of the key features ofGJ.
Template meta-programming for Haskell
Tim Sheard,Simon Jones +1 more
- 03 Oct 2002
TL;DR: A new extension to the purely functional programming language Haskell that supports compile-time meta-programming and the ability to generate code at compile time allows the programmer to implement such features as polytypic programs, macro-like expansion, user directed optimization, and the generation of supporting data structures and functions from existing data structure and functions.
Multi-stage programming with explicit annotations
Walid Taha,Tim Sheard +1 more
- 01 Dec 1997
TL;DR: A thesis of this paper is that multi-stage languages are useful as programming languages in their own right, and should support features that make it possible for programmers to write staged computations without significantly changing their normal programming style.
365
PolyP—a polytypic programming language extension
Patrik Jansson,Johan Jeuring +1 more
- 01 Jan 1997
TL;DR: This paper extends a functional language with a construct for writing polytypic functions, and infers the types of all other expressions using an extension of Jones' theories of qualified types and higher-order polymorphism.
267
''C: A Language for High-Level, Efficient, and Machine-independant Dynamic Code Generation
D. R. Engler,W. C. Hsieh,M. F. Kaashoek +2 more
- 01 Jun 1995
TL;DR: Dynamic code generation as discussed by the authors allows specialized code sequences to be crafted using runtime information, which is by definition not available statically, and can achieve performance inherently beyond that of static code generation.
172
Related Papers (5)
Walid Taha,Tim Sheard +1 more
- 01 Dec 1997
Shan Shan Huang,David Zook,Yannis Smaragdakis +2 more
- 29 Sep 2005
David Zook,Shan Shan Huang,Yannis Smaragdakis +2 more
- 24 Oct 2004