Results 1 -
6 of
6
Toward a Verified Relational Database Management System
, 2010
"... We report on our experience implementing a lightweight, fully verified relational database management system (RDBMS). The functional specification of RDBMS behavior, RDBMS implementation, and proof that the implementation meets the specification are all written and verified in Coq. Our contributions ..."
Abstract
-
Cited by 27 (3 self)
- Add to MetaCart
(Show Context)
We report on our experience implementing a lightweight, fully verified relational database management system (RDBMS). The functional specification of RDBMS behavior, RDBMS implementation, and proof that the implementation meets the specification are all written and verified in Coq. Our contributions include: (1) a complete specification of the relational algebra in Coq; (2) an efficient realization of that model (B+ trees) implemented with the Ynot extension to Coq; and (3) a set of simple query optimizations proven to respect both semantics and run-time cost. In addition to describing the design and implementation of these artifacts, we highlight the challenges we encountered formalizing them, including the choice of representation for finite relations of typed tuples and the challenges of reasoning about data structures with complex sharing. Our experience shows that though many challenges remain, building fully-verified systems software in Coq is within reach.
Algebra of programming using dependent types
, 2008
"... Abstract. Dependent type theory is rich enough to express that a pro-gram satisfies an input/output relational specification, but it could be hard to construct the proof term. On the other hand, squiggolists know very well how to show that one relation is included in another by alge-braic reasoning. ..."
Abstract
-
Cited by 3 (1 self)
- Add to MetaCart
Abstract. Dependent type theory is rich enough to express that a pro-gram satisfies an input/output relational specification, but it could be hard to construct the proof term. On the other hand, squiggolists know very well how to show that one relation is included in another by alge-braic reasoning. We demonstrate how to encode functional and relational derivations in a dependently typed programming language. A program is coupled with an algebraic derivation from a specification, whose cor-rectness is guaranteed by the type system. 1
Embedding a logical theory . . .
, 2009
"... We propose a new way to reason about general recursive functional programs in the dependently typed programming language Agda, which is based on Martin-Löf’s intuitionistic type theory. We show how to embed an external programming logic, Aczel’s Logical Theory of Constructions (LTC) inside Agda. To ..."
Abstract
- Add to MetaCart
We propose a new way to reason about general recursive functional programs in the dependently typed programming language Agda, which is based on Martin-Löf’s intuitionistic type theory. We show how to embed an external programming logic, Aczel’s Logical Theory of Constructions (LTC) inside Agda. To this end we postulate the existence of a domain of untyped functional programs and the conversion rules for these programs. Furthermore, we represent the inductive notions in LTC (intuitionistic predicate logic and totality predicates) as inductive notions in Agda. To illustrate our approach we specify an LTC-style logic for PCF, and show how to prove the termination and correctness of a general recursive algorithm for computing the greatest common divisor of two numbers.
Under consideration for publication in J. Functional Programming 1 Algebra of Programming in Agda Dependent Types for Relational Program Derivation
, 2009
"... Relational program derivation is the technique of stepwise refining a relational specification to a program by algebraic rules. The program thus obtained is correct by construction. Meanwhile, dependent type theory is rich enough to express various correctness properties to be verified by the type c ..."
Abstract
- Add to MetaCart
(Show Context)
Relational program derivation is the technique of stepwise refining a relational specification to a program by algebraic rules. The program thus obtained is correct by construction. Meanwhile, dependent type theory is rich enough to express various correctness properties to be verified by the type checker. We have developed a library, AoPA, to encode relational derivations in the dependently typed programming language Agda. A program is coupled with an algebraic derivation whose correctness is guaranteed by the type system. Two non-trivial examples are presented: an optimisation problem, and a derivation of quicksort where well-founded recursion is used to model terminating hylomorphisms in a language with inductive types. 1
Relational Optimizations for the Monad Comprehension Calculus
"... The Monad Comprehension Calculus (MCC) is a highly expressive query language equal in expressive power to a subset of the Haskell programming language. This expressivity allows the MCC to subsume a variety of user-facing query languages, from nested relational algebra to OQL. The MCC possess a numbe ..."
Abstract
- Add to MetaCart
(Show Context)
The Monad Comprehension Calculus (MCC) is a highly expressive query language equal in expressive power to a subset of the Haskell programming language. This expressivity allows the MCC to subsume a variety of user-facing query languages, from nested relational algebra to OQL. The MCC possess a number of highlydesirable properties, including a normal form for queries that eliminates treatment of collection types. Within the last decade sophisticated SQL/OQL optimization techniques based on semantic optimization have been applied to the MCC’s SQL/OQL fragment. In this paper we begin to apply relational optimizations to the entirety of the MCC. We do not approach the level of sophistication possible in the SQL/OQL fragment, and our optimizations are simple rewrites based on intra-relation functional dependencies. Still, by exploiting the so-called algebra of programming, the fledgling point-free functional dependency theory, and a translation from a subset of the MCC to nested relational algebra, we are able to reason about relational optimizations in the broader context of the MCC in an equational, compositional, and easily mechanizable way. We demonstrate how to optimize functional programs by exploiting knowledge about their functional dependencies, and how to optimize relational queries translated into MCC based on the underlying, rich algebraic structure of the MCC. 1.
A Coq Formalization of the Relational Data Model?
"... Abstract. In this article, we propose a Coq formalization of the re-lational data model which underlies relational database systems. More precisely, we present and formalize the data definition part of the model including integrity constraints. We model two different query language formalisms: relat ..."
Abstract
- Add to MetaCart
(Show Context)
Abstract. In this article, we propose a Coq formalization of the re-lational data model which underlies relational database systems. More precisely, we present and formalize the data definition part of the model including integrity constraints. We model two different query language formalisms: relational algebra and conjunctive queries. We also present logical query optimization and prove the main “database theorems”: al-gebraic equivalences, the homomorphism theorem and conjunctive query minimization. 1