skip to main content
10.1145/1706299.1706329acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Toward a verified relational database management system

Published:17 January 2010Publication History

ABSTRACT

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.

References

  1. Serge Abiteboul, Richard Hull, and Victor Vianu. Database Foundations. Addison-Wesley, 1995.Google ScholarGoogle Scholar
  2. Yves Bertot and Pierre Castéran. Interactive Theorem Proving and Program Development. Coq'Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science. Springer Verlag, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. R. Bornat, C. Calcagno, and P. OHearn. Local Reasoning, Separation and Aliasing. Proc. SPACE, volume 4, 2004.Google ScholarGoogle Scholar
  4. Stephen Brookes. A semantics for concurrent separation logic. Theor. Comput. Sci., 375(1--3):227--270, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Adam Chlipala, Gregory Malecha, Greg Morrisett, Avraham Shinnar, and Ryan Wisnesky. Effective interactive proofs for higher-order imperative programs. In Proc. ICFP, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. J. Date. Introduction to Database Systems. Addison-Wesley Longman Publishing Co., Inc., 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Ramez Elmasri and Shamkant B. Navathe. Fundamentals of Database Systems (5th Edition). Addison Wesley, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Parke Godfrey, Jarek Gryz, and Calisto Zuzarte. Exploiting constraint-like data characterizations in query optimization. In Proc. SIGMOD, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Carlos Gonzalia. Relations in Dependent Type Theory. PhD Thesis, Chalmers University of Technology, 2006.Google ScholarGoogle Scholar
  10. Conor Mcbride. Elimination with a motive. In Proc. TYPES, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Conor McBride and James McKinna. The view from the left. J. Functional Programming, 14(1):69--111, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. James Mckinna and Joel Wright. A type-correct, stack-safe, provably correct expression compiler in epigram. In J. Functional Programming, 2006.Google ScholarGoogle Scholar
  13. Aleksandar Nanevski, Paul Govereau, and Greg Morrisett. Towards type-theoretic semantics for transactional concurrency. In Proc. TLDI, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Aleksandar Nanevski, Greg Morrisett, and Lars Birkedal. Polymorphism and separation in hoare type theory. In Proc. ICFP, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Aleksandar Nanevski, Greg Morrisett, Avraham Shinnar, Paul Govereau, and Lars Birkedal. Ynot: Dependent types for imperative programs. In Proc. ICFP, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Ulf Norell. Towards a Practical Programming Language Based on Dependent Type Theory. PhD thesis, Chalmers University of Technology, 2007.Google ScholarGoogle Scholar
  17. Peter W. O'Hearn. Resources, concurrency, and local reasoning. Theor. Comput. Sci., 375(1--3):271--307, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Peter W. O'Hearn, John C. Reynolds, and Hongseok Yang. Local reasoning about programs that alter data structures. In Proc. CSL, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Nicolas Oury and Wouter Swierstra. The power of pi. Proc. ICFP, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Sharon E. Perl and Margo Seltzer. Data management for internet-scale single-sign-on. In Proc. WORLDS, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. P. Rajagopalan and C. P. Tsang. A generic algebra for data collections based on constructive logic. In Algebraic Methodology and Software Technology, volume 936 of LNCS, pages 546--560. Springer Berlin / Heidelberg, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. John C. Reynolds. Separation logic: A logic for shared mutable data structures. In Proc. LICS, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Alan Sexton and Hayo Thielecke. Reasoning about b+ trees with operational semantics and separation logic. Electron. Notes Theor. Comput. Sci., 218:355--369, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Alan Sexton and Hayo Thielecke. Reasoning about b+ trees with operational semantics and separation logic. Electron. Notes Theor. Comput. Sci., 218:355--369, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Carsten Sinz. System description: Ara - an automatic theorem prover for relation algebras. In Proc. CADE-17, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Matthieu Sozeau. Program-ing finger trees in coq. In Proc. ICFP, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Matthieu Sozeau and Nicolas Oury. First-class type classes. In Proc. TPHOLs, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Toward a verified relational database management system

                        Recommendations

                        Comments

                        Login options

                        Check if you have access through your login credentials or your institution to get full access on this article.

                        Sign in
                        • Published in

                          cover image ACM Conferences
                          POPL '10: Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
                          January 2010
                          520 pages
                          ISBN:9781605584799
                          DOI:10.1145/1706299
                          • cover image ACM SIGPLAN Notices
                            ACM SIGPLAN Notices  Volume 45, Issue 1
                            POPL '10
                            January 2010
                            500 pages
                            ISSN:0362-1340
                            EISSN:1558-1160
                            DOI:10.1145/1707801
                            Issue’s Table of Contents

                          Copyright © 2010 ACM

                          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                          Publisher

                          Association for Computing Machinery

                          New York, NY, United States

                          Publication History

                          • Published: 17 January 2010

                          Permissions

                          Request permissions about this article.

                          Request Permissions

                          Check for updates

                          Qualifiers

                          • research-article

                          Acceptance Rates

                          Overall Acceptance Rate824of4,130submissions,20%

                          Upcoming Conference

                          POPL '25

                        PDF Format

                        View or Download as a PDF file.

                        PDF

                        eReader

                        View online with eReader.

                        eReader