Results 1  10
of
19
Primitive Recursion for HigherOrder Abstract Syntax
 Theoretical Computer Science
, 1997
"... ..."
Engineering formal metatheory
 In ACM SIGPLANSIGACT Symposium on Principles of Programming Languages
, 2008
"... Machinechecked proofs of properties of programming languages have become a critical need, both for increased confidence in large and complex designs and as a foundation for technologies such as proofcarrying code. However, constructing these proofs remains a black art, involving many choices in th ..."
Abstract

Cited by 83 (9 self)
 Add to MetaCart
Machinechecked proofs of properties of programming languages have become a critical need, both for increased confidence in large and complex designs and as a foundation for technologies such as proofcarrying code. However, constructing these proofs remains a black art, involving many choices in the formulation of definitions and theorems that make a huge cumulative difference in the difficulty of carrying out large formal developments. The representation and manipulation of terms with variable binding is a key issue. We propose a novel style for formalizing metatheory, combining locally nameless representation of terms and cofinite quantification of free variable names in inductive definitions of relations on terms (typing, reduction,...). The key technical insight is that our use of cofinite quantification obviates the need for reasoning about equivariance (the fact that free names can be renamed in derivations); in particular, the structural induction principles of relations
AlphaProlog: A Logic Programming Language with Names, Binding, and AlphaEquivalence
, 2004
"... There are two wellknown approaches to programming with names, binding, and equivalence up to consistent renaming: representing names and bindings as concrete identifiers in a firstorder language (such as Prolog), or encoding names and bindings as variables and abstractions in a higherorder langua ..."
Abstract

Cited by 35 (9 self)
 Add to MetaCart
There are two wellknown approaches to programming with names, binding, and equivalence up to consistent renaming: representing names and bindings as concrete identifiers in a firstorder language (such as Prolog), or encoding names and bindings as variables and abstractions in a higherorder language (such as LambdaProlog). However, both approaches have drawbacks: the former often involves stateful namegeneration and requires manual definitions for alphaequivalence and captureavoiding substitution, and the latter is semantically very complicated, so reasoning about programs written using either approach can be very di#cult. Gabbay and Pitts have developed a new approach to encoding abstract syntax with binding based on primitive operations of nameswapping and freshness. This paper presents AlphaProlog, a logic programming language that uses this approach, along with several illustrative example programs and an operational semantics.
A Definitional Approach to Primitive Recursion over Higher Order Abstract Syntax
 In Proceedings of the 2003 workshop on Mechanized
, 2003
"... Syntax S. J. Ambler (S.Ambler@mcs.le.ac.uk) R. L. Crole (R.Crole@mcs.le.ac.uk) & A. Momigliano (A.Momigliano@mcs.le.ac.uk) Department of Mathematics and Computer Science, University of Leicester, Leicester, LE1 7RH, U.K. ..."
Abstract

Cited by 22 (5 self)
 Add to MetaCart
Syntax S. J. Ambler (S.Ambler@mcs.le.ac.uk) R. L. Crole (R.Crole@mcs.le.ac.uk) & A. Momigliano (A.Momigliano@mcs.le.ac.uk) Department of Mathematics and Computer Science, University of Leicester, Leicester, LE1 7RH, U.K.
Parametric HigherOrder Abstract Syntax for Mechanized Semantics
"... We present parametric higherorder abstract syntax (PHOAS), a new approach to formalizing the syntax of programming languages in computer proof assistants based on type theory. Like higherorder abstract syntax (HOAS), PHOAS uses the meta language’s binding constructs to represent the object language ..."
Abstract

Cited by 20 (2 self)
 Add to MetaCart
We present parametric higherorder abstract syntax (PHOAS), a new approach to formalizing the syntax of programming languages in computer proof assistants based on type theory. Like higherorder abstract syntax (HOAS), PHOAS uses the meta language’s binding constructs to represent the object language’s binding constructs. Unlike HOAS, PHOAS types are definable in generalpurpose type theories that support traditional functional programming, like Coq’s Calculus of Inductive Constructions. We walk through how Coq can be used to develop certified, executable program transformations over several staticallytyped functional programming languages formalized with PHOAS; that is, each transformation has a machinechecked proof of type preservation and semantic preservation. Our examples include CPS translation and closure conversion for simplytyped lambda calculus, CPS translation for System F, and translation from a language with MLstyle pattern matching to a simpler language with no variablearity binding constructs. By avoiding the syntactic hassle associated with firstorder representation techniques, we achieve a very high degree of proof automation. Categories and Subject Descriptors F.3.1 [Logics and meanings
A Definitional TwoLevel Approach to Reasoning with HigherOrder Abstract Syntax
 Journal of Automated Reasoning
, 2010
"... Abstract. Combining higherorder abstract syntax and (co)induction in a logical framework is well known to be problematic. Previous work [ACM02] described the implementation of a tool called Hybrid, within Isabelle HOL, syntax, and reasoned about using tactical theorem proving and principles of (co ..."
Abstract

Cited by 14 (3 self)
 Add to MetaCart
Abstract. Combining higherorder abstract syntax and (co)induction in a logical framework is well known to be problematic. Previous work [ACM02] described the implementation of a tool called Hybrid, within Isabelle HOL, syntax, and reasoned about using tactical theorem proving and principles of (co)induction. Moreover, it is definitional, which guarantees consistency within a classical type theory. The idea is to have a de Bruijn representation of syntax, while offering tools for reasoning about them at the higher level. In this paper we describe how to use it in a multilevel reasoning fashion, similar in spirit to other metalogics such as Linc and Twelf. By explicitly referencing provability in a middle layer called a specification logic, we solve the problem of reasoning by (co)induction in the presence of nonstratifiable hypothetical judgments, which allow very elegant and succinct specifications of object logic inference rules. We first demonstrate the method on a simple example, formally proving type soundness (subject reduction) for a fragment of a pure functional language, using a minimal intuitionistic logic as the specification logic. We then prove an analogous result for a continuationmachine presentation of the operational semantics of the same language, encoded this time in an ordered linear logic that serves as the specification layer. This example demonstrates the ease with which we can incorporate new specification logics, and also illustrates a significantly
Syntax for free: Representing syntax with binding using parametricity
 OF LECTURE NOTES IN COMPUTER SCIENCE
, 2009
"... We show that, in a parametric model of polymorphism, the type ∀α.((α → α) → α) → (α → α → α) → α is isomorphic to closed de Bruijn terms. That is, the type of closed higherorder abstract syntax terms is isomorphic to a concrete representation. To demonstrate the proof we have constructed a mode ..."
Abstract

Cited by 14 (5 self)
 Add to MetaCart
We show that, in a parametric model of polymorphism, the type ∀α.((α → α) → α) → (α → α → α) → α is isomorphic to closed de Bruijn terms. That is, the type of closed higherorder abstract syntax terms is isomorphic to a concrete representation. To demonstrate the proof we have constructed a model of parametric polymorphism inside the Coq proof assistant. The proof of the theorem requires parametricity over Kripke relations. We also investigate some variants of this representation.
A Computational Approach to Reflective MetaReasoning about Languages with Bindings
 In MERLIN ’05: Proceedings of the 3rd ACM SIGPLAN workshop on Mechanized
, 2005
"... We present a foundation for a computational metatheory of languages with bindings implemented in a computeraided formal reasoning environment. Our theory provides the ability to reason abstractly about operators, languages, openended languages, classes of languages, etc. The theory is based on th ..."
Abstract

Cited by 12 (2 self)
 Add to MetaCart
We present a foundation for a computational metatheory of languages with bindings implemented in a computeraided formal reasoning environment. Our theory provides the ability to reason abstractly about operators, languages, openended languages, classes of languages, etc. The theory is based on the ideas of higherorder abstract syntax, with an appropriate induction principle parameterized over the language (i.e. a set of operators) being used. In our approach, both the bound and free variables are treated uniformly and this uniform treatment extends naturally to variablelength bindings. The implementation is reflective, namely there is a natural mapping between the metalanguage of the theoremprover and the object language of our theory. The object language substitution operation is mapped to the metalanguage substitution and does not need to be defined recursively. Our approach does not require designing a custom type theory; in this paper we describe the implementation of this foundational theory within a generalpurpose type theory. This work is fully implemented in the MetaPRL theorem prover, using the preexisting NuPRLlike MartinL ofstyle computational type theory. Based on this implementation, we lay out an outline for a framework for programming language experimentation and exploration as well as a general reflective reasoning framework. This paper also includes a short survey of the existing approaches to syntactic reflection. 1
LNgen: Tool Support for Locally Nameless Representations
"... Given the complexity of the metatheoretic reasoning involved with current programming languages and their type systems, techniques for mechanical formalization and checking of the metatheory have received much recent attention. In previous work, we advocated a combination of locally nameless represe ..."
Abstract

Cited by 12 (4 self)
 Add to MetaCart
Given the complexity of the metatheoretic reasoning involved with current programming languages and their type systems, techniques for mechanical formalization and checking of the metatheory have received much recent attention. In previous work, we advocated a combination of locally nameless representation and cofinite quantification as a lightweight style for carrying out such formalizations in the Coq proof assistant. As part of the presentation of that methodology, we described a number of operations associated with variable binding and listed a number of properties, called “infrastructure lemmas, ” about those operations that needed to be shown. The proofs of these infrastructure lemmas are generally straightforward, given a specification of the binding structure of the language. In this work, we present LNgen, a prototype tool for automatically generating these definitions, lemmas, and proofs from Ottlike language specifications. Furthermore, the tool also generates a recursion scheme for defining functions over syntax, which was not available in our previous work. We also show the soundness and completeness of our tool’s output. For untyped lambda terms, we prove the adequacy of our representation with respect to a fully concrete representation, and we argue that the representation is complete—that we generate the right set of lemmas—with respect to Gordon and Melham’s “Five Axioms of AlphaConversion. ” Finally, we claim that our recursion scheme is simpler to work with than either Gordon and Melham’s recursion scheme or the recursion scheme of Nominal Logic. 1.
Primitive recursion for higher order abstract syntax
 Carnegie Mellon University
, 1996
"... Higherorder abstract syntax is a central representation technique in logical frameworks which maps variables of the object language into variables in the metalanguage. It leads to concise encodings, but is incompatible with functions defined by primitive recursion or proofs by induction. In this p ..."
Abstract

Cited by 7 (0 self)
 Add to MetaCart
Higherorder abstract syntax is a central representation technique in logical frameworks which maps variables of the object language into variables in the metalanguage. It leads to concise encodings, but is incompatible with functions defined by primitive recursion or proofs by induction. In this paper we propose an extension of the simplytyped lambdacalculus with iteration and case constructs which preserves the adequacy of higherorder abstract syntax encodings. The wellknown paradoxes are avoided through the use of a modal operator which obeys the laws of S4. In the resulting calculus many functions over higherorder representations can be expressed elegantly. Our central technical result, namely that our calculus is conservative over the simplytyped lambdacalculus, is proved by a rather complex argument using logical relations. We view our system as an important first step towards allowing the methodology of LF to be employed effectively in systems based on induction principles such as ALF, Coq, or Nuprl, leading to a synthesis of currently incompatible paradigms.