## An Idealized MetaML: Simpler, and More Expressive (1999)

### Cached

### Download Links

- [www.disi.unige.it]
- [www.cse.ogi.edu]
- [www-internal.cse.ogi.edu]
- [pdf.aminer.org]
- [www.disi.unige.it]
- DBLP

### Other Repositories/Bibliography

Citations: | 34 - 13 self |

### BibTeX

@MISC{Moggi99anidealized,

author = {Eugenio Moggi and Walid Taha and Zine El-abidine Benaissa and Tim Sheard},

title = {An Idealized MetaML: Simpler, and More Expressive},

year = {1999}

}

### Years of Citing Articles

### OpenURL

### Abstract

MetaML is a multi-stage functional programming language featuring three constructs that can be viewed as statically-typed refinements of the back-quote, comma, and eval of Scheme. Thus it provides special support for writing code generators and serves as a semantically sound basis for systems involving multiple interdependent computational stages. In previous work, we reported on an implementation of MetaML, and on a small-step semantics and type-system for MetaML. In this paper, we present An Idealized MetaML (AIM) that is the result of our study of a categorical model for MetaML. An important outstanding problem is finding a type system that provides the user with a means for manipulating both open and closed code. This problem has eluded efforts by us and other researchers for over three years. AIM solves the issue by providing two type constructors, one classifies closed code and the other open code, and describing how they interact.

### Citations

257 | Multi-stage programming with explicit annotations
- Taha, Sheard
- 1997
(Show Context)
Citation Context ... . This is the expected substitution property, that is, a variable x can be replaced by a term e1, provided e1 meets the type requirements on x. 3 Big-Step Semantics The big-step semantics for MetaML =-=[11]-=- re ects the existing implementation: it is complex, and hence not very suitable for formal reasoning. Figure 2 presents a concise big-step semantics for AIM, which is presented at the same level of a... |

209 | Continuation-based partial evaluation
- Lawall, Danvy
- 1994
(Show Context)
Citation Context ...es. This development is crucial for a call-by-name semantics. Such a semantics seems to play an important role in the formal theory of Normalization by Evaluation and Type Directed Partial Evaluation =-=[2]-=-; 3. The big-step semantics is de ned in the style in which was de ned [3], and does not make explicit use of a stateful renaming function; 4. Terms have no explicit level annotations. Furthermore, it... |

199 | A modal analysis of staged computation
- Davies, Pfenning
(Show Context)
Citation Context ... section shows that other languages for staging computations can be translated into AIM, and that the embedding respects the typing and evaluation. The languages we consider are [3], MetaML [10], and =-=[4]-=-.s4.1 Embedding of The embedding of into AIM is straightforward. In essence, corresponds to the Open fragment of AIM: t 2 TOpen::=b j t1 !t2 jhti e2EOpen::=c j x j e1 e2 j x:e jheij~e The translation ... |

95 | A partial evaluator for the untyped lambda calculus
- Gomard, Jones
- 1991
(Show Context)
Citation Context ...e and closed code have di erent properties, which we explain in the following section. Open and Closed Code Typed languages for manipulating code fragments either have atype constructor for open code =-=[9, 6, 3, 11]-=-, or a type constructor for closed code [4, 13]. Languages with open code types are useful in the study of partial evaluation. Typically, they provide constructs for building and combining code fragme... |

84 | A temporal-logic approach to binding-time analysis
- Davies
- 1996
(Show Context)
Citation Context ...e and closed code have di erent properties, which we explain in the following section. Open and Closed Code Typed languages for manipulating code fragments either have atype constructor for open code =-=[9, 6, 3, 11]-=-, or a type constructor for closed code [4, 13]. Languages with open code types are useful in the study of partial evaluation. Typically, they provide constructs for building and combining code fragme... |

57 |
An inverse of the evaluation functional for typed λ–calculus
- Berger, Schwichtenberg
- 1991
(Show Context)
Citation Context ...just for the cases restricted to values. This development is crucial for a call-by-name semantics. Such a semantics seems to play an important role in the formal theory of Normalization by Evaluation =-=[1]-=- and Type Directed Partial Evaluation [2]; 3. The big-step semantics is defined in the style in which λ ○ was defined [3], and does not make explicit use of a stateful renaming function; 4. Terms have... |

51 | An inverse of the evaluation functional for typed {calculus - Berger, Schwichtenberg - 1991 |

35 | MultiStage Programming: Axiomatization and Type Safety (Extended Abstract
- Taha, Benaissa, et al.
- 1998
(Show Context)
Citation Context ...almost as simple as an interpreter for the source language (especially if back-quote and comma are utilized), but would incur almost none of the overhead associated with an interpreter. MetaML MetaML =-=[11,10]-=- provides three constructs for manipulating open code and executing it: Brackets h i, Escape ~ and Run run . An expression hei defers the computation of e; ~e splices the deferred expression obtained ... |

33 | Run-time code generation and modal-ML
- Wickline, Lee, et al.
- 1998
(Show Context)
Citation Context ...explain in the following section. Open and Closed Code Typed languages for manipulating code fragments either have atype constructor for open code [9, 6, 3, 11], or a type constructor for closed code =-=[4, 13]-=-. Languages with open code types are useful in the study of partial evaluation. Typically, they provide constructs for building and combining code fragments with free variables, but do not allow for e... |

28 | An automatic program generator for multi-level specialization
- Gluck, Jrgensen
- 1997
(Show Context)
Citation Context ...guage is the basis for many binding-time analyses. Gluck and J rgensen study partial evaluation in the generalized context where inputs can arrive at an arbitrary number of times rather than just two =-=[5]-=-, and demonstrate that binding-time analysis in a multi-level setting can be done with e ciency comparable to that of two-level binding time analysis. Davies extends the Curry-Howard isomorphism to a ... |

18 | A categorical account of two-level languages - Moggi - 1997 |

17 | Microlanguages for Operating System Specialization
- Pu, Black, et al.
- 1997
(Show Context)
Citation Context ...v ′ �∅ 0 such that e v �∅ . ↩→ v ′ and v ′ ∗ −→boxs5 Related Work Multi-stage programming techniques have been used in a wide variety of settings [12], including run-time specialization of C programs =-=[10]-=-. Nielson and Nielson present a seminal detailed study into a two-level functional programming language [9]. This language was developed for studying code generation. Davies and Pfenning show that a g... |

10 | A categorical analysis of multi-level languages (extended abstract
- Benaissa, Moggi, et al.
- 1998
(Show Context)
Citation Context ... being based on a standard logical system [13]. This paper describes the type system and operational semantics of An Idealized MetaML (AIM), whose design is inspired by a categorical model for MetaML =-=[1]-=-. AIM is strictly more expressive than any known typed multi-level language, and features:s1. An open code type hti, which corresponds to t of [3] and hti of MetaML; 2. A closed code type [t], which c... |

10 |
An idealized MetaML: Simpler, and more expressive (includes proofs
- Moggi, Taha, et al.
- 1998
(Show Context)
Citation Context ...ore, we can simultaneously increment the level of an arbitrary subset of the variables in the environment. In this paper, proofs are omitted for brevity (Please see technical report for proof details =-=[8]-=-). Demotion on e at n, written e#n, lowers the level of e from level n +1 down to level n, and is well-de ned on all terms, unlike demotion for MetaML [10]. De nition 1 (Demotion). e#n is de ned by in... |

6 |
A categorical account oftwo-level languages
- Moggi
- 1997
(Show Context)
Citation Context ...iency comparable to that of two-level binding time analysis. Davies extends the Curry-Howard isomorphism to a relation between temporal logic and the type system for a multi-level language [3]. Moggi =-=[7]-=- advocates a categorical approach totwo-level languages based on indexed categories, and stresses formal analogies with a categorical account of phase distinction and module languages. Acknowledgments... |

2 |
and Hanne Rijs Nielson. Two-Level Functional Languages. Number 34
- Nielson
- 1992
(Show Context)
Citation Context ...e and closed code have di erent properties, which we explain in the following section. Open and Closed Code Typed languages for manipulating code fragments either have atype constructor for open code =-=[9, 6, 3, 11]-=-, or a type constructor for closed code [4, 13]. Languages with open code types are useful in the study of partial evaluation. Typically, they provide constructs for building and combining code fragme... |