Results 1 - 10
of
33
Programming with proofs and explicit contexts
- In Symposium on Principles and Practice of Declarative Programming, 2008. François Pottier and Nadji
"... This paper explores a new point in the design space of functional programming: functional programming with dependently-typed higher-order data structures described in the logical framework LF. This allows us to program with proofs as higher-order data. We present a decidable bidirectional type syste ..."
Abstract
-
Cited by 30 (10 self)
- Add to MetaCart
(Show Context)
This paper explores a new point in the design space of functional programming: functional programming with dependently-typed higher-order data structures described in the logical framework LF. This allows us to program with proofs as higher-order data. We present a decidable bidirectional type system that distinguishes between dependentlytyped data and computations. To support reasoning about open data, our foundation makes contexts explicit. This provides us with a concise characterization of open data, which is crucial to elegantly describe proofs. In addition, we present an operational semantics for this language based on higher-order pattern matching for dependently typed objects. Based on this development, we prove progress and preservation.
A Definitional Two-Level Approach to Reasoning with Higher-Order Abstract Syntax
- Journal of Automated Reasoning
, 2010
"... Abstract. Combining higher-order 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 23 (4 self)
- Add to MetaCart
(Show Context)
Abstract. Combining higher-order 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 multi-level reasoning fashion, similar in spirit to other meta-logics 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 non-stratifiable 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 continuation-machine 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
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 21 (5 self)
- Add to MetaCart
(Show Context)
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.
System Description: Delphin – A Functional Programming Language for Deductive Systems
"... Abstract. Delphin is a functional programming language [PS08] utilizing dependent higher-order datatypes. Delphin is a two level system, which cleanly separates data from computation. The data level is LF [HHP93], which allows for the specification of deductive systems following the judgments-as-typ ..."
Abstract
-
Cited by 16 (0 self)
- Add to MetaCart
(Show Context)
Abstract. Delphin is a functional programming language [PS08] utilizing dependent higher-order datatypes. Delphin is a two level system, which cleanly separates data from computation. The data level is LF [HHP93], which allows for the specification of deductive systems following the judgments-as-types methodology utilizing higher-order abstract syntax (HOAS). The computation level facilitates the manipulation of such encodings by providing a newness constructor to create parameters (fresh constants) and the ability to write functions over parameters, which we also call parameter functions. A wealth of documentation and examples are available online at
Case analysis of higher-order data
"... Abstract. We discuss coverage checking for data that is dependently typed and is defined using higher-order abstract syntax. Unlike previous work on coverage checking that required objects to be closed, we consider open data objects, i.e. objects that may depend on some context. Our work may therefo ..."
Abstract
-
Cited by 16 (14 self)
- Add to MetaCart
Abstract. We discuss coverage checking for data that is dependently typed and is defined using higher-order abstract syntax. Unlike previous work on coverage checking that required objects to be closed, we consider open data objects, i.e. objects that may depend on some context. Our work may therefore provide insights into coverage checking in Twelf, and serve as a basis for coverage checking in functional languages such as Delphin and Beluga. More generally, our work is a foundation for proofs by case analysis in systems that reason about higher-order abstract syntax. 1
Simple nominal type theory
"... Abstract. Nominal logic is an extension of first-order logic with features useful for reasoning about abstract syntax with bound names. For computational applications such as programming and formal reasoning, it is desirable to develop constructive type theories for nominal logic which extend standa ..."
Abstract
-
Cited by 14 (2 self)
- Add to MetaCart
(Show Context)
Abstract. Nominal logic is an extension of first-order logic with features useful for reasoning about abstract syntax with bound names. For computational applications such as programming and formal reasoning, it is desirable to develop constructive type theories for nominal logic which extend standard type theories for propositional, first- or higher-order logic. This has proven difficult, largely because of complex interactions between nominal logic’s name-abstraction operation and ordinary functional abstraction. This difficulty already arises in the case of propositional logic and simple type theory. In this paper we show how this difficulty can be overcome, and present a simple nominal type theory which enjoys properties such as type soundness and strong normalization, and which can be soundly interpreted using existing nominal set models of nominal logic. We also sketch how recursion combinators for languages with binding structure can be provided. This is an important first step towards understanding the constructive content of nominal logic and incorporating it into existing logics and type theories. 1
Nominal System T
, 2010
"... This paper introduces a new recursion principle for inductive data modulo ..."
Abstract
-
Cited by 14 (1 self)
- Add to MetaCart
(Show Context)
This paper introduces a new recursion principle for inductive data modulo
Structural Recursion with Locally Scoped Names
"... This paper introduces a new recursion principle for inductively defined data modulo α-equivalence of bound names that makes use of Odersky-style local names when recursing over bound names. It is formulated in simply typed λ-calculus extended with names that can be restricted to a lexical scope, tes ..."
Abstract
-
Cited by 13 (2 self)
- Add to MetaCart
(Show Context)
This paper introduces a new recursion principle for inductively defined data modulo α-equivalence of bound names that makes use of Odersky-style local names when recursing over bound names. It is formulated in simply typed λ-calculus extended with names that can be restricted to a lexical scope, tested for equality, explicitly swapped and abstracted. The new recursion principle is motivated by the nominal sets notion of “α-structural recursion”, whose use of names and associated freshness side-conditions in recursive definitions formalizes common practice with binders. The new calculus has a simple interpretation in nominal sets equipped with name restriction operations. It is shown to adequately represent α-structural recursion while avoiding the need to verify freshness side-conditions in definitions and computations. The paper is a revised and expanded version of (Pitts, 2010). 1
A fresh look at programming with names and binders
"... A wide range of computer programs, including compilers and theorem provers, manipulate data structures that involve names and binding. However, the design of programming idioms which allow performing these manipulations in a safe and natural style has, to a large extent, remained elusive. In this pa ..."
Abstract
-
Cited by 12 (3 self)
- Add to MetaCart
(Show Context)
A wide range of computer programs, including compilers and theorem provers, manipulate data structures that involve names and binding. However, the design of programming idioms which allow performing these manipulations in a safe and natural style has, to a large extent, remained elusive. In this paper, we present a novel approach to the problem. Our proposal can be viewed either as a programming language design or as a library: in fact, it is currently implemented within Agda. enough to support multiple concrete implementations: we present one in nominal style and one in de Bruijn style. We use logical relations to prove that “well-typed programs do not mix names with different scope”. We exhibit an adequate encoding of Pitts-style nominal terms into our system. Keywords: names, binders, meta-programming, name abstraction, higher-order abstract syntax
VeriML: Typed computation of logical terms inside a language with effects
, 2010
"... Modern proof assistants such as Coq and Isabelle provide high degrees of expressiveness and assurance because they support formal reasoning in higher-order logic and supply explicit machine-checkable proof objects. Unfortunately, large scale proof development in these proof assistants is still an ex ..."
Abstract
-
Cited by 12 (1 self)
- Add to MetaCart
Modern proof assistants such as Coq and Isabelle provide high degrees of expressiveness and assurance because they support formal reasoning in higher-order logic and supply explicit machine-checkable proof objects. Unfortunately, large scale proof development in these proof assistants is still an extremely difficult and time-consuming task. One major weakness of these proof assistants is the lack of a single language where users can develop complex tactics and decision procedures using a rich programming model and in a typeful manner. This limits the scalability of the proof development process, as users avoid developing domain-specific tactics and decision procedures. In this paper, we present VeriML—a novel language design that couples a type-safe effectful computational language with first-class support for manipulating logical terms such as propositions and proofs. The main idea behind our design is to integrate a rich logical framework—similar to the one supported by Coq—inside a computational language inspired by ML. The language design is such that the added features are orthogonal to the rest of the computational language, and also do not require significant additions to the logic language, so soundness is guaranteed. We have built a prototype implementation of VeriML including both its type-checker and an interpreter. We demonstrate the effectiveness of our design by showing a number of type-safe tactics and decision procedures written in VeriML.