39 research outputs found
Formal verification of a theory of packages
Over the years, open source distributions have become increasingly largeand complex—as an example, the latest Debian distribution contains almost 30 000packages.Consequently, the tools that deal with these distribution have also become more andmore complex. Furthermore, to deal with increasing distribution sizes optimisationhas become more important as well.To make sure that correctness is not sacrificed for complexity and optimisation, it isimportant to verify the underlying assumptions formally.In this paper, we present an example of such a verification: a formalisation in Coqof a theory of packages and their interdependencies
Termination Casts: A Flexible Approach to Termination with General Recursion
This paper proposes a type-and-effect system called Teqt, which distinguishes
terminating terms and total functions from possibly diverging terms and partial
functions, for a lambda calculus with general recursion and equality types. The
central idea is to include a primitive type-form "Terminates t", expressing
that term t is terminating; and then allow terms t to be coerced from possibly
diverging to total, using a proof of Terminates t. We call such coercions
termination casts, and show how to implement terminating recursion using them.
For the meta-theory of the system, we describe a translation from Teqt to a
logical theory of termination for general recursive, simply typed functions.
Every typing judgment of Teqt is translated to a theorem expressing the
appropriate termination property of the computational part of the Teqt term.Comment: In Proceedings PAR 2010, arXiv:1012.455
On the strength of proof-irrelevant type theories
We present a type theory with some proof-irrelevance built into the
conversion rule. We argue that this feature is useful when type theory is used
as the logical formalism underlying a theorem prover. We also show a close
relation with the subset types of the theory of PVS. We show that in these
theories, because of the additional extentionality, the axiom of choice implies
the decidability of equality, that is, almost classical logic. Finally we
describe a simple set-theoretic semantics.Comment: 20 pages, Logical Methods in Computer Science, Long version of IJCAR
2006 pape
Gradual Certified Programming in Coq
Expressive static typing disciplines are a powerful way to achieve
high-quality software. However, the adoption cost of such techniques should not
be under-estimated. Just like gradual typing allows for a smooth transition
from dynamically-typed to statically-typed programs, it seems desirable to
support a gradual path to certified programming. We explore gradual certified
programming in Coq, providing the possibility to postpone the proofs of
selected properties, and to check "at runtime" whether the properties actually
hold. Casts can be integrated with the implicit coercion mechanism of Coq to
support implicit cast insertion a la gradual typing. Additionally, when
extracting Coq functions to mainstream languages, our encoding of casts
supports lifting assumed properties into runtime checks. Much to our surprise,
it is not necessary to extend Coq in any way to support gradual certified
programming. A simple mix of type classes and axioms makes it possible to bring
gradual certified programming to Coq in a straightforward manner.Comment: DLS'15 final version, Proceedings of the ACM Dynamic Languages
Symposium (DLS 2015
The Implicit Calculus of Constructions as a Programming Language with Dependent Types
International audienceIn this paper, we show how Miquel's Implicit Calculus of Constructions (ICC) can be used as a programming language featuring dependent types. Since this system has an undecidable type-checking, we introduce a more verbose variant, called ICC* which fixes this issue. Datatypes and program specifications are enriched with logical assertions (such as preconditions, postconditions, invariants) and programs are decorated with proofs of those assertions. The point of using ICC* rather than the Calculus of Constructions (the core formalism of the Coq proof assistant) is that all of the static information (types and proof objects) is transparent, in the sense that it does not affect the computational behavior. This is concretized by a built-in extraction procedure that removes this static information. We also illustrate the main features of ICC* on classical examples of dependently typed programs
A New Elimination Rule for the Calculus of Inductive Constructions
Published in the post-proceedings of TYPES but actually not presented orally to the conferenceInternational audienceIn Type Theory, definition by dependently-typed case analysis can be expressed by means of a set of equations — the semantic approach — or by an explicit pattern-matching construction — the syntactic approach. We aim at putting together the best of both approaches by extending the pattern-matching construction found in the Coq proof assistant in order to obtain the expressivity and flexibility of equation-based case analysis while remaining in a syntax-based setting, thus making dependently-typed programming more tractable in the Coq system. We provide a new rule that permits the omission of impossible cases, handles the propagation of inversion constraints, and allows to derive Streicher's K axiom. We show that subject reduction holds, and sketch a proof of relative consistency
(Nearest) Neighbors You Can Rely On: Formally Verified k-d Tree Construction and Search in Coq
The k-d tree is a classic binary space-partitioning tree used to organize
points in k-dimensional space. While used in computational geometry and
graphics, the data structure has a long history of application in nearest
neighbor search. The objective of the nearest neighbor search problem is to
efficiently find the closest point(s) to a given query point, and is the basis,
in turn, of common machine learning techniques. We present in this paper a case
study in the certified implementation, using the Coq proof assistant, of k-d
tree construction from a set of data and the accompanying K-nearest neighbors
search algorithm. Our experience demonstrates an intuitive method for
specifying properties of these algorithms using the notion of list
permutations
Encoding of Predicate Subtyping with Proof Irrelevance in the ??-Calculus Modulo Theory
The ??-calculus modulo theory is a logical framework in which various logics and type systems can be encoded, thus helping the cross-verification and interoperability of proof systems based on those logics and type systems. In this paper, we show how to encode predicate subtyping and proof irrelevance, two important features of the PVS proof assistant. We prove that this encoding is correct and that encoded proofs can be mechanically checked by Dedukti, a type checker for the ??-calculus modulo theory using rewriting
Implementing and reasoning about hash-consed data structures in Coq
We report on four different approaches to implementing hash-consing in Coq
programs. The use cases include execution inside Coq, or execution of the
extracted OCaml code. We explore the different trade-offs between faithful use
of pristine extracted code, and code that is fine-tuned to make use of OCaml
programming constructs not available in Coq. We discuss the possible
consequences in terms of performances and guarantees. We use the running
example of binary decision diagrams and then demonstrate the generality of our
solutions by applying them to other examples of hash-consed data structures