## Fresh O’Caml: Nominal abstract syntax for the masses (2005)

Venue: | In ACM Workshop on ML |

Citations: | 4 - 1 self |

### BibTeX

@INPROCEEDINGS{Shinwell05fresho’caml:,

author = {Mark R. Shinwell},

title = {Fresh O’Caml: Nominal abstract syntax for the masses},

booktitle = {In ACM Workshop on ML},

year = {2005},

pages = {53--76}

}

### OpenURL

### Abstract

Nominal abstract syntax, as pioneered by the ‘FreshML ’ series of metalanguages, provides first-order tools for the representation and manipulation of syntax involving bound names, binding operations and α-equivalence. Fresh O’Caml fuses nominal abstract syntax with the full Objective Caml language to yield a functional programming language with powerful facilities for representing and manipulating syntax. In this paper, we first provide an examples-driven overview of the language and its functionality. Then we proceed to comment on some of the difficult issues involved in implementing nominal abstract syntax and explain how they have been addressed in the latest version of the compiler.

### Citations

1184 |
The Lambda Calculus: Its Syntax and Semantics
- Barendregt
- 1984
(Show Context)
Citation Context ...hey package up a value in binding position together with the corresponding value for the body, and may only be deconstructed in a manner so as to preserve the so-called Barendregt variable convention =-=[5]-=-. In particular, the particular value currently being used to represent the part in binding position is completely hidden by the system 8 so as to maintain the ‘anonymity’ afforded by an α-equivalence... |

410 | Explicit substitutions
- Abadi, Cardelli, et al.
- 1991
(Show Context)
Citation Context ...of the size of the value being matched, we could adopt a scheme of delayed permutations such as that previously described by the author [20, §7.1.1]. This works in the style of explicit substitutions =-=[2]-=- and would be much more satisfactory: the act of pattern-matching against an abstraction node is reduced to a constant time operation. Unfortunately, our previous efforts to incorporate such a scheme ... |

311 |
Higher-order abstract syntax
- Pfenning, Elliott
(Show Context)
Citation Context ...ier’s Cαml [18] and Cheney’s Haskell library known as FreshLib [8]. In common with these tools, but unlike alternative approaches such as those based on the use of higher-order abstract syntax (HOAS) =-=[15,13]-=-, Fresh O’Caml does not use the function abstraction constructs of the metalanguage to represent binding operations. From the point of view of a functional programming language, this is convenient as ... |

226 | A new approach to abstract syntax with variable binding
- Gabbay, Pitts
(Show Context)
Citation Context ... metaprogramming tasks. Fresh O’Caml 2 uses the technique of nominal abstract syntax pioneered by the ‘FreshML’ language designs [17,21], which in turn were based on original work by Pitts and Gabbay =-=[12,11]-=- in the setting of FM-sets. This theory in itself has given rise to a number of interesting avenues of research: for example, work on nominal logic [16] and logic programming [9]; denotational models ... |

218 | Type systems
- Cardelli
- 1996
(Show Context)
Citation Context ...age overview In this section we use examples to show how the terms of some object language may be manipulated in the Fresh O’Caml metalanguage. As an example object language we adopt a version of F<: =-=[7]-=- with records and pattern-matching as used in the PoplMark challenge [4]; the reader is referred to that liter2sShinwell ature for a more comprehensive description than we have space to give here. Ter... |

176 | Nominal logic, a first order theory of names and binding
- Pitts
(Show Context)
Citation Context ...e based on original work by Pitts and Gabbay [12,11] in the setting of FM-sets. This theory in itself has given rise to a number of interesting avenues of research: for example, work on nominal logic =-=[16]-=- and logic programming [9]; denotational models involving the use of continuation monads to model dynamic allocation [20,6]; and fully-abstract models based on game semantics [3]. It has also lead to ... |

145 | Mechanized Metatheory for the Masses: The PoplMark Challenge
- Aydemir, Bohannon, et al.
- 2005
(Show Context)
Citation Context ...me object language may be manipulated in the Fresh O’Caml metalanguage. As an example object language we adopt a version of F<: [7] with records and pattern-matching as used in the PoplMark challenge =-=[4]-=-; the reader is referred to that liter2sShinwell ature for a more comprehensive description than we have space to give here. Terms of the language, which are largely self-explanatory, are generated by... |

100 | Semantical analysis of higher-order abstract syntax
- Hofmann
- 1999
(Show Context)
Citation Context ...ier’s Cαml [18] and Cheney’s Haskell library known as FreshLib [8]. In common with these tools, but unlike alternative approaches such as those based on the use of higher-order abstract syntax (HOAS) =-=[15,13]-=-, Fresh O’Caml does not use the function abstraction constructs of the metalanguage to represent binding operations. From the point of view of a functional programming language, this is convenient as ... |

95 | A metalanguage for programming with bound names modulo renaming
- Pitts, Gabbay
- 2000
(Show Context)
Citation Context ...e Caml programming language [1] which provides inbuilt support for such metaprogramming tasks. Fresh O’Caml 2 uses the technique of nominal abstract syntax pioneered by the ‘FreshML’ language designs =-=[17,21]-=-, which in turn were based on original work by Pitts and Gabbay [12,11] in the setting of FM-sets. This theory in itself has given rise to a number of interesting avenues of research: for example, wor... |

81 | Freshml: Programming with binders made simple
- Shinwell, Pitts, et al.
- 2003
(Show Context)
Citation Context ...e Caml programming language [1] which provides inbuilt support for such metaprogramming tasks. Fresh O’Caml 2 uses the technique of nominal abstract syntax pioneered by the ‘FreshML’ language designs =-=[17,21]-=-, which in turn were based on original work by Pitts and Gabbay [12,11] in the setting of FM-sets. This theory in itself has given rise to a number of interesting avenues of research: for example, wor... |

60 | Acute: High-level programming language design for distributed computation
- Sewell, Leifer, et al.
- 2007
(Show Context)
Citation Context ...onvenient manner) as we have seen. Use has however been made of the swap construct in order to improve efficiency in certain situations (during implementation of an interpreter for the Acute language =-=[19]-=- in particular), and hence the operation is still provided in the standard library (as Freshness.swap and Freshness.swap multiple). Its use, however, is discouraged: in the event of future versions of... |

59 | Relational reasoning in a nominal semantics for storage
- Benton, Leperchey
- 2005
(Show Context)
Citation Context ... number of interesting avenues of research: for example, work on nominal logic [16] and logic programming [9]; denotational models involving the use of continuation monads to model dynamic allocation =-=[20,6]-=-; and fully-abstract models based on game semantics [3]. It has also lead to the development of other language tools that address the same problems as Fresh 1 Email: Mark.Shinwell@cl.cam.ac.uk 2 Avail... |

41 | Alpha-prolog: A logic programming language with names, binding and alpha-equivalence
- Cheney, Urban
- 2004
(Show Context)
Citation Context ... Pitts and Gabbay [12,11] in the setting of FM-sets. This theory in itself has given rise to a number of interesting avenues of research: for example, work on nominal logic [16] and logic programming =-=[9]-=-; denotational models involving the use of continuation monads to model dynamic allocation [20,6]; and fully-abstract models based on game semantics [3]. It has also lead to the development of other l... |

35 | Nominal games and full abstraction for the nu-calculus
- Abramsky, Ghica, et al.
- 2004
(Show Context)
Citation Context ...ork on nominal logic [16] and logic programming [9]; denotational models involving the use of continuation monads to model dynamic allocation [20,6]; and fully-abstract models based on game semantics =-=[3]-=-. It has also lead to the development of other language tools that address the same problems as Fresh 1 Email: Mark.Shinwell@cl.cam.ac.uk 2 Available for download from http://www.fresh-ocaml.org/sShin... |

24 |
An overview of Cαml
- Pottier
- 2005
(Show Context)
Citation Context ...ther language tools that address the same problems as Fresh 1 Email: Mark.Shinwell@cl.cam.ac.uk 2 Available for download from http://www.fresh-ocaml.org/sShinwell O’Caml, in particular Pottier’s Cαml =-=[18]-=- and Cheney’s Haskell library known as FreshLib [8]. In common with these tools, but unlike alternative approaches such as those based on the use of higher-order abstract syntax (HOAS) [15,13], Fresh ... |

20 |
A Theory of Inductive Definitions with α-Equivalence: Semantics, Implementation, Programming Language
- Gabbay
- 2000
(Show Context)
Citation Context ... metaprogramming tasks. Fresh O’Caml 2 uses the technique of nominal abstract syntax pioneered by the ‘FreshML’ language designs [17,21], which in turn were based on original work by Pitts and Gabbay =-=[12,11]-=- in the setting of FM-sets. This theory in itself has given rise to a number of interesting avenues of research: for example, work on nominal logic [16] and logic programming [9]; denotational models ... |

20 |
The Fresh Approach: Functional Programming with Names and Binders
- Shinwell
- 2005
(Show Context)
Citation Context ... number of interesting avenues of research: for example, work on nominal logic [16] and logic programming [9]; denotational models involving the use of continuation monads to model dynamic allocation =-=[20,6]-=-; and fully-abstract models based on game semantics [3]. It has also lead to the development of other language tools that address the same problems as Fresh 1 Email: Mark.Shinwell@cl.cam.ac.uk 2 Avail... |

7 |
The Axiom of Choice, North-Holland
- Jech
- 1973
(Show Context)
Citation Context ...rk, we now sketch a few recent thoughts on the subject of models involving ordered atoms. In order to formalise such a system, one possible approach might be to use a Mostowski linearly-ordered model =-=[14]-=-, which works with rational numbers (for the atoms) in the usual dense linear order and order-preserving permutations upon them. It appears that such permutations can express some notion of fresh rena... |

2 |
Scrap your nameplate
- Cheney
- 2005
(Show Context)
Citation Context ...s Fresh 1 Email: Mark.Shinwell@cl.cam.ac.uk 2 Available for download from http://www.fresh-ocaml.org/sShinwell O’Caml, in particular Pottier’s Cαml [18] and Cheney’s Haskell library known as FreshLib =-=[8]-=-. In common with these tools, but unlike alternative approaches such as those based on the use of higher-order abstract syntax (HOAS) [15,13], Fresh O’Caml does not use the function abstraction constr... |

1 |
Camlp4 reference manual (2004), available from http://caml.inria.fr/camlp4/index.html
- Rauglaudre
(Show Context)
Citation Context ... Mostowski-style analogue to it (in the same way that FM-sets correspond to pullback-preserving functors from an index category to sets). 7 It should be noted that whilst the interoperation of Camlp4 =-=[10]-=- and Fresh O’Caml has not yet been subject to scrutiny, the alternative form <| − |> − may be used in place of double angle brackets to avoid a syntactic clash with its quoting mechanism. 5sShinwell t... |