Results 1 - 10
of
33
FreshML: Programming with Binders Made Simple
, 2003
"... FreshML extends ML with elegant and practical constructs for declaring and manipulating syntactical data involving binding operations. User-declared FreshML datatypes involving binders are concrete, in the sense that values of these types can be deconstructed by matching against patterns naming boun ..."
Abstract
-
Cited by 68 (22 self)
- Add to MetaCart
FreshML extends ML with elegant and practical constructs for declaring and manipulating syntactical data involving binding operations. User-declared FreshML datatypes involving binders are concrete, in the sense that values of these types can be deconstructed by matching against patterns naming bound variables explicitly. Such matching may have a computational effect in which bound names get swapped with freshly generated names. Previous work on FreshML used a complicated static type system inferring information about the `freshness' of names for expressions in order to tame such effects. The main contribution of this paper is to show (perhaps surprisingly) that a much simpler type system without freshness inference, coupled with name swapping and a conventional treatment of fresh name generation, suffices for FreshML's crucial correctness property---namely that values of datatypes involving binders are operationally equivalent if and only if they represent #-equivalent pieces of object-level syntax. This correctness result is established via a novel denotational semantics. FreshML without static freshness inference is no more impure than ML and our experiences programming in it show that it supports a programming style pleasingly close to informal practice when it comes to dealing with syntax modulo #-equivalence.
A Compiled Implementation of Strong Reduction
"... Motivated by applications to proof assistants based on dependent types, we develop and prove correct a strong reducer and b- equivalence checker for the l-calculus with products, sums, and guarded fixpoints. Our approach is based on compilation to the bytecode of an abstract machine performing weak ..."
Abstract
-
Cited by 57 (5 self)
- Add to MetaCart
Motivated by applications to proof assistants based on dependent types, we develop and prove correct a strong reducer and b- equivalence checker for the l-calculus with products, sums, and guarded fixpoints. Our approach is based on compilation to the bytecode of an abstract machine performing weak reductions on non-closed terms, derived with minimal modifications from the ZAM machine used in the Objective Caml bytecode interpreter, and complemented by a recursive "read back" procedure. An implementation in the Coq proof assistant demonstrates important speedups compared with the original interpreter-based implementation of strong reduction in Coq.
Program extraction from normalization proofs
- Typed Lambda Calculi and Applications, number 664 in Lecture Notes in Computer Science
, 1993
"... This paper describes formalizations of Tait’s normalization proof for the simply typed λ-calculus in the proof assistants Minlog, Coq and Isabelle/HOL. From the formal proofs programs are machine-extracted that implement variants of the well-known normalization-by-evaluation algorithm. The case stud ..."
Abstract
-
Cited by 54 (3 self)
- Add to MetaCart
This paper describes formalizations of Tait’s normalization proof for the simply typed λ-calculus in the proof assistants Minlog, Coq and Isabelle/HOL. From the formal proofs programs are machine-extracted that implement variants of the well-known normalization-by-evaluation algorithm. The case study is used to test and compare the program extraction machineries of the three proof assistants in a non-trivial setting. 1
Alpha-structural recursion and induction
- Journal of the ACM
, 2006
"... The nominal approach to abstract syntax deals with the issues of bound names and α-equivalence by considering constructions and properties that are invariant with respect to permuting names. The use of permutations gives rise to an attractively simple formalisation of common, but often technically i ..."
Abstract
-
Cited by 38 (6 self)
- Add to MetaCart
The nominal approach to abstract syntax deals with the issues of bound names and α-equivalence by considering constructions and properties that are invariant with respect to permuting names. The use of permutations gives rise to an attractively simple formalisation of common, but often technically incorrect uses of structural recursion and induction for abstract syntax modulo α-equivalence. At the heart of this approach is the notion of finitely supported mathematical objects. This paper explains the idea in as concrete a way as possible and gives a new derivation within higher-order logic of principles of α-structural recursion and induction for α-equivalence classes from the ordinary versions of these principles for abstract syntax trees.
An Idealized MetaML: Simpler, and More Expressive
, 1999
"... 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 involv ..."
Abstract
-
Cited by 29 (13 self)
- Add to MetaCart
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.
Normalization by evaluation for Martin-Löf type theory with one universe
- IN 23RD CONFERENCE ON THE MATHEMATICAL FOUNDATIONS OF PROGRAMMING SEMANTICS, MFPS XXIII, ELECTRONIC NOTES IN THEORETICAL COMPUTER SCIENCE
, 2007
"... ..."
A Universe of Binding and Computation
"... We construct a logical framework supporting datatypes that mix binding and computation, implemented as a universe in the dependently typed programming language Agda 2. We represent binding pronominally, using well-scoped de Bruijn indices, so that types can be used to reason about the scoping of var ..."
Abstract
-
Cited by 15 (5 self)
- Add to MetaCart
We construct a logical framework supporting datatypes that mix binding and computation, implemented as a universe in the dependently typed programming language Agda 2. We represent binding pronominally, using well-scoped de Bruijn indices, so that types can be used to reason about the scoping of variables. We equip our universe with datatype-generic implementations of weakening, substitution, exchange, contraction, and subordination-based strengthening, so that programmers need not reimplement these operations for each individual language they define. In our mixed, pronominal setting, weakening and substitution hold only under some conditions on types, but we show that these conditions can be discharged automatically in many cases. Finally, we program a variety of standard difficult test cases from the literature, such as normalization-by-evaluation for the untyped λ-calculus, demonstrating that we can express detailed invariants about variable usage in a program’s type while still writing clean and clear code.
Memoization in type-directed partial evaluation
- Proceedings of the 2002 ACM SIGPLAN/SIGSOFT Conference on Generative Programming and Component Engineering, number 2487 in Lecture Notes in Computer Science
, 2002
"... Abstract. We use a code generator—type-directed partial evaluation— to verify conversions between isomorphic types, or more precisely to verify that a composite function is the identity function at some complicated type. A typed functional language such as ML provides a natural support to express th ..."
Abstract
-
Cited by 14 (6 self)
- Add to MetaCart
Abstract. We use a code generator—type-directed partial evaluation— to verify conversions between isomorphic types, or more precisely to verify that a composite function is the identity function at some complicated type. A typed functional language such as ML provides a natural support to express the functions and type-directed partial evaluation provides a convenient setting to obtain the normal form of their composition. However, off-the-shelf type-directed partial evaluation turns out to yield gigantic normal forms. We identify that this gigantism is due to redundancies, and that these redundancies originate in the handling of sums, which uses delimited continuations. We successfully eliminate these redundancies by extending type-directed partial evaluation with memoization capabilities. The result only works for pure functional programs, but it provides an unexpected use of code generation and it yields orders-of-magnitude improvements both in time and in space for type isomorphisms. 1
Normalization and partial evaluation
- Applied Semantics, number 2395 in LNCS
, 2002
"... Abstract. We give an introduction to normalization by evaluation and type-directed partial evaluation. We first present normalization by evaluation for a combinatory version of Gödel System T. Then we show normalization by evaluation for typed lambda calculus with β and η conversion. Finally, we int ..."
Abstract
-
Cited by 14 (0 self)
- Add to MetaCart
Abstract. We give an introduction to normalization by evaluation and type-directed partial evaluation. We first present normalization by evaluation for a combinatory version of Gödel System T. Then we show normalization by evaluation for typed lambda calculus with β and η conversion. Finally, we introduce the notion of binding time, and explain the method of type-directed partial evaluation for a small PCF-style functional programming language. We give algorithms for both call-by-name and call-by-value versions of this language.

