## Programming with proofs and explicit contexts

### Cached

### Download Links

- [www.cs.mcgill.ca]
- [www.cs.mcgill.ca]
- [complogic.cs.mcgill.ca]
- [www.cs.cmu.edu]
- [web.cs.cmu.edu]
- [www.cs.cmu.edu]
- DBLP

### Other Repositories/Bibliography

Venue: | In Symposium on Principles and Practice of Declarative Programming, 2008. François Pottier and Nadji |

Citations: | 23 - 8 self |

### BibTeX

@INPROCEEDINGS{Pientka_programmingwith,

author = {Brigitte Pientka},

title = {Programming with proofs and explicit contexts},

booktitle = {In Symposium on Principles and Practice of Declarative Programming, 2008. François Pottier and Nadji},

year = {}

}

### OpenURL

### Abstract

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.

### Citations

725 | A framework for defining logics
- Harper, Honsell, et al.
- 1987
(Show Context)
Citation Context ...we explore a new point in the design space of functional programming with dependent types where we can analyze and manipulate dependently-typed higher-order data described in the logical framework LF =-=[9]-=-. LF provides a rich meta-language for describing formal systems defined by axioms and inference Permission to make digital or hard copies of all or part of this work for personal or classroom use is ... |

331 | System description: Twelf — a meta-logical framework for deductive systems
- Pfenning, Schürmann
- 1999
(Show Context)
Citation Context ...typed open data. At this point, the only missing piece is to verify that a given function terminates—we leave this for a separate paper. As such, our work may be thought of as an alternative to Twelf =-=[19]-=-, an implementation of the logical framework LF [9] in which proofs about formal systems are encoded via relations, and to Delphin [23] (which, like our system, implements proofs via functions). 2. MO... |

303 | Dependent types in practical programming
- Xi, Pfenning
- 1999
(Show Context)
Citation Context ...meworks 1. INTRODUCTION Various forms of dependent types have found their way into mainstream functional programming languages to allow programmers to express stronger properties about their programs =-=[2, 16, 26, 29]-=-. In this paper, we explore a new point in the design space of functional programming with dependent types where we can analyze and manipulate dependently-typed higher-order data described in the logi... |

297 | A logic programming language with lambda-abstraction, function variables, and simple unification
- Miller
- 1991
(Show Context)
Citation Context ...e application of an index argument to an expression. The contextual variables in branches b, declared in ∆, are instantiated using higher-order pattern matching. We only consider patterns à la Miller =-=[14]-=- where meta-variables that are subject to instantiation must be ap-plied to a distinct set of bound variables. In our setting, this means all contextual variables must be associated with a substituti... |

225 | Cayenne—A language with dependent types
- Augustsson
- 1998
(Show Context)
Citation Context ...s A and A ′ is simply syntactic equality. Hence, equality between two computation-level types is also just syntactic equality. This is in stark contrast to dependently-typed languages such as Cayenne =-=[1]-=- and Epigram [11] that allow computations within the index objects of dependent types. In these systems, we cannot simply compare two types syntactically, but must evaluate the index arguments first, ... |

219 | The Practice of Logical Frameworks
- Pfenning
- 1996
(Show Context)
Citation Context ...ation of natural deduction proofs to Hilbert-style proofs. For this discussion we concentrate on the fragment consisting of implications. This example has been extensively discussed in the literature =-=[18, 23]-=- and so highlights the differences between approaches. This example again uses explicit context variables and parameter variables. The Hilbert-style axiomatization can be formalized as follows: hil : ... |

172 | Simple unification-based type inference for gadts
- Jones, Vytiniotis, et al.
- 2006
(Show Context)
Citation Context ... various forms of dependent types have found their way into mainstream functional programming to allow programmers to express stronger properties about their programs. Generalized algebraic datatypes =-=[2, 16, 26]-=- can index types by other types and have entered mainstream languages such as Haskell. The Dependent ML approach [29] uses indexed types with a fixed set of constraint domains, such as integers with l... |

167 |
The view from the left
- McBride, McKinna
(Show Context)
Citation Context ...imply syntactic equality. Hence, equality between two computation-level types is also just syntactic equality. This is in stark contrast to dependently-typed languages such as Cayenne [1] and Epigram =-=[11]-=- that allow computations within the index objects of dependent types. In these systems, we cannot simply compare two types syntactically, but must evaluate the index arguments first, before comparing ... |

154 | A New Approach to Abstract Syntax Involving Binders
- Gabbay, Pitts
- 1999
(Show Context)
Citation Context ...t variables and parameter variables to describe generic base cases is unique to our work. Comparison and explicit pattern matching for variables are features typically associated with nominal systems =-=[7, 27]-=-. However, unlike nominal systems, variable names here are not global, but local and subject to α-renaming. In Twelf [19], one can write a relation that counts variable occurrences, but there is no ge... |

125 | 1997], Primitive recursion for higher-order abstract syntax
- Despeyroux, Pfenning, et al.
(Show Context)
Citation Context ...s themselves can refer to types and the structure of types can be observed. Programming with HOAS has recently received widespread attention, although most work has focused on the simplytyped setting =-=[5, 10, 21, 25]-=-. Only a few approaches have been considered in the dependently-typed setting. Despeyroux and Leleu [3, 4] extended previous work by Despeyroux et al. [5] which provided a type-theoretic foundation fo... |

107 | First-class phantom types
- Cheney, Hinze
- 2003
(Show Context)
Citation Context ...meworks 1. INTRODUCTION Various forms of dependent types have found their way into mainstream functional programming languages to allow programmers to express stronger properties about their programs =-=[2, 16, 26, 29]-=-. In this paper, we explore a new point in the design space of functional programming with dependent types where we can analyze and manipulate dependently-typed higher-order data described in the logi... |

85 | Automating the Meta-Theory of Deductive Systems
- Schürmann
- 2000
(Show Context)
Citation Context ...w arbitrary mixing of Σ and Π. This restriction makes it easier to describe thepossible terms of this type, which is a crucial step towards ensuring coverage [6]. Schemas resemble Schürmann’s worlds =-=[24]-=-, but while similar in spirit, we use dependent pairs to express the relationship between multiple objects in a context. While worlds impose a similar ΣΠ-structure, schemas differ from worlds in the s... |

82 | FreshML: Programming with binders made simple
- Shinwell, Pitts, et al.
- 2003
(Show Context)
Citation Context ...t variables and parameter variables to describe generic base cases is unique to our work. Comparison and explicit pattern matching for variables are features typically associated with nominal systems =-=[7, 27]-=-. However, unlike nominal systems, variable names here are not global, but local and subject to α-renaming. In Twelf [19], one can write a relation that counts variable occurrences, but there is no ge... |

80 | A Concurrent Logical Framework I: Judgments and Properties
- Watkins, Cervesato, et al.
- 2002
(Show Context)
Citation Context ...decidable type system for dependentlytyped open data. Our presentation only admits data objects in canonical form because only those represent meaningful data. This follows the ideas of Watkins et al.=-=[28]-=- and Nanevski et al.[15]. By cleanly separating the data language from the computation language, exotic terms that do not represent legal data objects are prevented. Our framework supports explicit co... |

64 |
Contextual modal type theory
- Nanevski, Pfenning, et al.
(Show Context)
Citation Context ... to these approaches, extending the first author’s previous work on programming with HOAS encodings in the simply-typed setting [21] to dependent types. As in that work, we use contextual modal types =-=[15]-=- to separate HOAS data from computations about them. Open data M is characterized by the contextual modal type A[Ψ] where M has type A in the context Ψ. The object M is closed with respect to the cont... |

64 | Unification and anti-unification in the calculus of constructions
- Pfenning
- 1991
(Show Context)
Citation Context ... implicit data objects that occur in a dependent type and may be kept implicit in the actual source program, and explicit data objects that are recursively analyzed with higher-order pattern matching =-=[13, 17]-=- and are explicit in the source program. Intuitively, implicit data arguments are the index objects that are reconstructed when translating a source language to this internal language. In addition, ou... |

56 | Uni of simply typed lambda-terms as logic programming
- Miller
- 1991
(Show Context)
Citation Context ... implicit data objects that occur in a dependent type and may be kept implicit in the actual source program, and explicit data objects that are recursively analyzed with higher-order pattern matching =-=[13, 17]-=- and are explicit in the source program. Intuitively, implicit data arguments are the index objects that are reconstructed when translating a source language to this internal language. In addition, ou... |

30 | Tabling for higher-order logic programming - Pientka - 2005 |

28 | Practical programming with higher-order encodings and dependent types
- Poswolsky, Schürmann
- 2008
(Show Context)
Citation Context ...ped setting. Despeyroux and Leleu [3, 4] extended previous work by Despeyroux et al. [5] which provided a type-theoretic foundation for primitive recursive programming with HOAS. The Delphin language =-=[23]-=- extends these ideas to provide general recursion over HOAS encodings as well as dependent types. In this paper, we present an alternative to these approaches, extending the first author’s previous wo... |

25 | The ∇-calculus: Functional programming with higher-order encodings
- Schürmann, Poswolsky, et al.
- 2005
(Show Context)
Citation Context ...s themselves can refer to types and the structure of types can be observed. Programming with HOAS has recently received widespread attention, although most work has focused on the simplytyped setting =-=[5, 10, 21, 25]-=-. Only a few approaches have been considered in the dependently-typed setting. Despeyroux and Leleu [3, 4] extended previous work by Despeyroux et al. [5] which provided a type-theoretic foundation fo... |

23 | Focusing on binding and computation
- Licata, Zeilberger, et al.
- 2008
(Show Context)
Citation Context ...s themselves can refer to types and the structure of types can be observed. Programming with HOAS has recently received widespread attention, although most work has focused on the simplytyped setting =-=[5, 10, 21, 25]-=-. Only a few approaches have been considered in the dependently-typed setting. Despeyroux and Leleu [3, 4] extended previous work by Despeyroux et al. [5] which provided a type-theoretic foundation fo... |

19 | Combining generic judgments with recursive definitions
- Gacek, Miller, et al.
- 2008
(Show Context)
Citation Context ...ely has remained a major problem despite the seminal groundwork laid in Schürmann’s dissertation [24]. An alternative approach to proving properties about HOAS encodings is based on generic judgments =-=[8]-=- and realized in the system Abella. This approach enhances intuitionistic logic with generic judgments, which allow for recursive definitions and induction over natural numbers. Contexts are explicit,... |

16 | Recursion over objects of functional type
- Despeyroux, Leleu
(Show Context)
Citation Context ...ived widespread attention, although most work has focused on the simplytyped setting [5, 10, 21, 25]. Only a few approaches have been considered in the dependently-typed setting. Despeyroux and Leleu =-=[3, 4]-=- extended previous work by Despeyroux et al. [5] which provided a type-theoretic foundation for primitive recursive programming with HOAS. The Delphin language [23] extends these ideas to provide gene... |

16 | Meta-programming with built-in type equality
- Sheard, Pasalic
- 2004
(Show Context)
Citation Context ...meworks 1. INTRODUCTION Various forms of dependent types have found their way into mainstream functional programming languages to allow programmers to express stronger properties about their programs =-=[2, 16, 26, 29]-=-. In this paper, we explore a new point in the design space of functional programming with dependent types where we can analyze and manipulate dependently-typed higher-order data described in the logi... |

14 | Case analysis of higherorder data
- Dunfield, Pientka
(Show Context)
Citation Context ...tion for programming with proofs and explicit contexts. Our foundation ensures that contexts are well-formed according to a user-specified schema, and we have formulated a coverage checking algorithm =-=[6]-=- for dependently-typed open data. At this point, the only missing piece is to verify that a given function terminates—we leave this for a separate paper. As such, our work may be thought of as an alte... |

13 | Optimizing higher-order pattern unification
- Pientka, Pfennning
- 2003
(Show Context)
Citation Context ...igher-order pattern unification, leading to an elegant decidable algorithm. Finally, we present a small-step operational semantics based on higher-order pattern matching for dependently-typed objects =-=[17, 22]-=-, and prove progress and preservation for our language with respect to this semantics. This paper is a first important step in laying the typetheoretic foundation for programming with proofs and expli... |

7 | Primitive recursion for higher order abstract syntax with dependent types
- Despeyroux, Leleu
- 1999
(Show Context)
Citation Context ...ived widespread attention, although most work has focused on the simplytyped setting [5, 10, 21, 25]. Only a few approaches have been considered in the dependently-typed setting. Despeyroux and Leleu =-=[3, 4]-=- extended previous work by Despeyroux et al. [5] which provided a type-theoretic foundation for primitive recursive programming with HOAS. The Delphin language [23] extends these ideas to provide gene... |

5 | A meta linear logical framework
- McCreight, Schürmann
- 2003
(Show Context)
Citation Context ...in a datalevel context Ψ. Our foundation supports context variables ψ which allow us to reason abstractly with contexts. Context variables are declared in Ω. Unlike previous uses of context variables =-=[12]-=-, a context may contain at most one context variable. In the same way that types classify objects, and kinds classify types, we introduce the notion of a schema W that classifies contexts Ψ. Context v... |