## A Metalanguage for Programming with Bound Names Modulo Renaming (2000)

Venue: | Mathematics of Program Construction, volume 1837 of Lecture Notes in Computer Science |

Citations: | 88 - 15 self |

### BibTeX

@INPROCEEDINGS{Pitts00ametalanguage,

author = {Andrew M. Pitts and Murdoch J. Gabbay},

title = {A Metalanguage for Programming with Bound Names Modulo Renaming},

booktitle = {Mathematics of Program Construction, volume 1837 of Lecture Notes in Computer Science},

year = {2000},

pages = {230--255},

publisher = {Springer-Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

This paper describes work in progress on the design of an ML-style metalanguage FreshML for programming with recursively defined functions on user-defined, concrete data types whose constructors may involve variable binding. Up to operational equivalence, values of such FreshML data types can faithfully encode terms modulo alpha-conversion for a wide range of object languages in a straightforward fashion. The design of FreshML is `semantically driven', in that it arises from the model of variable binding in set theory with atoms given by the authors in [7]. The language has a type constructor for abstractions over names ( = atoms) and facilities for declaring locally fresh names. Moreover, recursive definitions can use a form of pattern-matching on bound names in abstractions. The crucial point is that the FreshML type system ensures that these features can only be used in well-typed programs in ways that are insensitive to renaming of bound names.

### Citations

604 |
The Definition of Standard ML (Revised
- Milner, Tofte, et al.
- 1997
(Show Context)
Citation Context ... of free identiers in exp. 2 It will be seen from these declarations that the syntax of function declarations (and case expressions) in FreshML is more like that of CAML [3] than that of Standard ML [=-=12]-=-. A Metalanguage for Programming with Bound Names 233 (* Lambda terms, modulo alpha conversion. *) datatype lam = Var of atm | App of lam * lam | Lam of [atm]lam; (* Encoding of a couple of familiar c... |

303 |
Higher-order abstract syntax
- Pfenning, Elliott
- 1988
(Show Context)
Citation Context ...the one in FreshML (Plotkin, private communication). Miller [10] proposed tackling the problems motivating the work in this paper by incorporating the techniques of higher order abstract syntax, HOAS =-=[16-=-], into an ML-like programming language, ML , with intentional function types ty => ty 0 . Compared with HOAS, the approach in [7] and [5] is less ambitious in what it seeks to lift to the metalevel:... |

292 |
Abstract types have existential types
- Mitchell, Plotkin
- 1985
(Show Context)
Citation Context ...identier of type atm and exp an expression of type ty . Such atom abstraction expressions behave like pairs in which thesrst component is hidden, in a way comparable to hiding in abstract data types [=-=13]-=-. The operations for accessing the second component are discussed in Sects 4 and 5. We claim that two such expressions, a.exp and a 0 .exp 0 , are contextually equivalent (i.e. are interchangeable in ... |

163 |
Isabelle: A Generic Theorem Prover, volume 828 of LNCS
- Paulson
- 1994
(Show Context)
Citation Context ...ural recursion and induction for the algebraic data type ltree'. This approach has been adopted for a number of large systems written in ML involving syntax manipulation (such as HOL [8] and Isabelle =-=[14]-=-, for example). However, it does have some drawbacks. Firstly, nameless terms are hard for humans to understand and they need translation and display functions relating them to the usual syntax with n... |

154 |
de Bruijn. Lambda-calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser theorem
- G
- 1972
(Show Context)
Citation Context ...ect languages, or large programs. A common way round this problem is to introduce a new version of the object language that eliminates variable binding constructs through the use of de Bruijn indices =-=[4-=-]. For example, `nameless' lambda terms are given by t 0 ::= n j t 0 t 0 j t 0 (3) and a corresponding ML data type by datatype ltree' = Vr' of nat | Ap' of ltree' * ltree' | Lm' of ltree' (4) where ... |

145 | A new approach to abstract syntax involving binders
- Gabbay, Pitts
- 1999
(Show Context)
Citation Context ...of object languages in a straightforward fashion. The design of FreshML is `semantically driven', in that it arises from the model of variable binding in set theory with atoms given by the authors in =-=[7-=-]. The language has a type constructor for abstractions over names ( = atoms) and facilities for declaring locally fresh names. Moreover, recursive denitions can use a form of pattern-matching on boun... |

142 |
Abstract Syntax and Variable Binding
- Fiore, Plotkin, et al.
- 1999
(Show Context)
Citation Context ...sions (together with standard case-expressions and function declaration) . Example 4.1. One of the semantic properties of the atom abstraction setformer in the model in [7] (and the related models in =-=[5]-=-) which distinguish it from function abstraction is that it commutes with disjoint unions up to natural bijection. We can easily code this bijection in FreshML as follows. (* A type constructor for di... |

104 | Introduction to HOL - Gordon, Melham - 1993 |

99 | Communicating and Mobile Systems: the -Calculus - Milner - 1999 |

96 | Semantical analysis of higher-order abstract syntax
- Hofmann
- 1999
(Show Context)
Citation Context ...work The model presented in [7] was one of three works on the metamathematics of syntax with binders using categories of (pre)sheaves which appeared simultaneously in 1999|the other two being [5] and =-=[-=-9]. The starting point for these works is a discovery, made independently by several of the authors, which can be stated roughly as follows. The quotient by -equivalence of an inductively dened set of... |

63 |
editors. Report on the programming language Haskell (Version 1.2
- Hudak, Jones, et al.
- 1992
(Show Context)
Citation Context ...f distinct sorts of atoms (for example, to more easily encode distinct sorts of names in an object language). Indeed, it might be a good idea to allow atom polymorphism via Haskell-style type classes =-=[15]-=-, with a type class for `types of atoms'. But even with a single sort of atoms, there is good reason to consider notions of abstraction in which the data to the left of the `abstraction dot' is struct... |

60 |
An experimental applicative language
- HOPE
- 1980
(Show Context)
Citation Context ...dened data types, with pattern matching in denitions of functions on these data types. 1 For object 1 As far as we know, this feature was introduced into functional programming by Rod Burstall: see [2=-=, 1-=-]. A Metalanguage for Programming with Bound Names 231 languages without variable binding, this reduces the work involved in designing representations to a mere act of declaration: a specication of th... |

48 |
A Functional Approach to Programming
- Cousineau, Mauny
- 1998
(Show Context)
Citation Context ...rite fv(exp) for thesnite set of free identiers in exp. 2 It will be seen from these declarations that the syntax of function declarations (and case expressions) in FreshML is more like that of CAML [=-=3]-=- than that of Standard ML [12]. A Metalanguage for Programming with Bound Names 233 (* Lambda terms, modulo alpha conversion. *) datatype lam = Var of atm | App of lam * lam | Lam of [atm]lam; (* Enco... |

36 | An extension to ML to handle bound variables in data structures
- Miller
- 1990
(Show Context)
Citation Context ...ions of support (or `stage') than does the FM-sets model, it seems that they too can model languages with notions of abstraction similar to the one in FreshML (Plotkin, private communication). Miller =-=[10-=-] proposed tackling the problems motivating the work in this paper by incorporating the techniques of higher order abstract syntax, HOAS [16], into an ML-like programming language, ML , with intentio... |

12 |
Design considerations for a functional programming language. In The software revolution: state-of-the art conference, Pergamon
- Burstall
- 1977
(Show Context)
Citation Context ...dened data types, with pattern matching in denitions of functions on these data types. 1 For object 1 As far as we know, this feature was introduced into functional programming by Rod Burstall: see [2=-=, 1-=-]. A Metalanguage for Programming with Bound Names 231 languages without variable binding, this reduces the work involved in designing representations to a mere act of declaration: a specication of th... |

1 |
A Theory of Inductive De with -Conversion: Semantics, Implementation, and Meta-Language
- Gabbay
(Show Context)
Citation Context ...ta types. More generally, the ` N -quantier' introduced in [7] should feature in an LCF-style program logic for FreshML. Some of the details will appear in the second author's forthcoming PhD thesis [=-=6]-=-. At this stage, just as important as proving such properties is accumulating experience with programming in FreshML, to see if the idiom it provides for metaprogramming with bound names modulo renami... |