skip to main content
research-article

Fiat: Deductive Synthesis of Abstract Data Types in a Proof Assistant

Published:14 January 2015Publication History
Skip Abstract Section

Abstract

We present Fiat, a library for the Coq proof assistant supporting refinement of declarative specifications into efficient functional programs with a high degree of automation. Each refinement process leaves a proof trail, checkable by the normal Coq kernel, justifying its soundness. We focus on the synthesis of abstract data types that package methods with private data. We demonstrate the utility of our framework by applying it to the synthesis of query structures -- abstract data types with SQL-like query and insert operations. Fiat includes a library for writing specifications of query structures in SQL-inspired notation, expressing operations over relations (tables) in terms of mathematical sets. This library includes a suite of tactics for automating the refinement of specifications into efficient, correct-by-construction OCaml code. Using these tactics, a programmer can generate such an implementation completely automatically by only specifying the equivalent of SQL indexes, data structures capturing useful views of the abstract data. Throughout we speculate on the new programming modularity possibilities enabled by an automated refinement system with proved-correct rules.

Skip Supplemental Material Section

Supplemental Material

p689-sidebyside.mpg

References

  1. Don Batory, Vivek Singhal, Marty Sirkin, and Jeff Thomas. Scalable software libraries. In Proceedings of the 1st ACM SIGSOFT Symposium on Foundations of Software Engineering. ACM, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Lee Blaine and Allen Goldberg. DTRE -- a semi-automatic transformation system. In Constructing Programs from Specifications, pages 165--204. Elsevier, 1991.Google ScholarGoogle Scholar
  3. Peter Buneman, Leonid Libkin, Dan Suciu, Val Tannen, and Limsoon Wong. Comprehension syntax. SIGMOD Rec., 23(1), March 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Swarat Chaudhuri, Martin Clochard, and Armando Solar-Lezama. Bridging boolean and quantitative synthesis using smoothed proof search. In Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Cyril Cohen, Maxime Dénès, and Anders Mörtberg. Refinements for free! In Certified Programs and Proofs. Springer International Publishing, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. http://coq.inria.fr/distrib/current/refman/Reference-Manual029.html.Google ScholarGoogle Scholar
  7. Edsger W. Dijkstra. A constructive approach to the problem of program correctness. Circulated privately, August 1967.Google ScholarGoogle Scholar
  8. Peter Hawkins, Alex Aiken, Kathleen Fisher, Martin Rinard, and Mooly Sagiv. Data representation synthesis. In Proceedings of the 32nd ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J. He, C.A.R. Hoare, and J.W. Sanders. Data refinement refined. In Bernard Robinet and Reinhard Wilhelm, editors, ESOP 86, volume 213 of Lecture Notes in Computer Science, pages 187--196. Springer Berlin Heidelberg, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. C.A.R. Hoare. Proof of correctness of data representations. Acta Informatica, 1(4):271--281, 1972. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Barbara Liskov and Stephen Zilles. Programming with abstract data types. In Symposium on Very High Level Languages, New York, NY, USA, 1974. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Robert Paige and Fritz Henglein. Mechanical translation of set theoretic problem specifications into efficient RAM code -- a case study. J. Symb. Comput., 4(2):207--232, October 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Robert Paige and Shaye Koenig. Finite differencing of computable expressions. ACM Trans. Program. Lang. Syst., 4(3), July 1982. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Dusko Pavlovic, Peter Pepper, and Douglas R. Smith. Formal derivation of concurrent garbage collectors. In Mathematics of Program Construction, pages 353--376. Springer Berlin Heidelberg, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Rishabh Singh and Armando Solar-Lezama. Synthesizing data structure manipulations from storyboards. In Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Douglas R. Smith. KIDS: A semi-automatic program development system. In Client Resources on the Internet, IEEE Multimedia Systems'99, pages 302--307, 1990.Google ScholarGoogle Scholar
  17. Douglas R. Smith and Stephen J. Westfold. Synthesis of propositional satisfiability solvers, 2008.Google ScholarGoogle Scholar
  18. Armando Solar-Lezama. Program Synthesis by Sketching. PhD thesis, University of California, Berkeley, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Armando Solar-Lezama, Christopher Grant Jones, and Rastislav Bodik. Sketching concurrent data structures. In Proceedings of the 2008 ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. http://www.kestrel.edu/home/prototypes/specware.html.Google ScholarGoogle Scholar
  21. Philip Wadler. Comprehending monads. In Mathematical Structures in Computer Science, pages 61--78, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

(auto-classified)
  1. Fiat: Deductive Synthesis of Abstract Data Types in a Proof Assistant

    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

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 50, Issue 1
      POPL '15
      January 2015
      682 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2775051
      • Editor:
      • Andy Gill
      Issue’s Table of Contents
      • cover image ACM Conferences
        POPL '15: Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
        January 2015
        716 pages
        ISBN:9781450333009
        DOI:10.1145/2676726

      Copyright © 2015 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 14 January 2015

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!