skip to main content
research-article

Program verification through characteristic formulae

Published:27 September 2010Publication History
Skip Abstract Section

Abstract

This paper describes CFML, the first program verification tool based on characteristic formulae. Given the source code of a pure Caml program, this tool generates a logical formula that implies any valid post-condition for that program. One can then prove that the program satisfies a given specification by reasoning interactively about the characteristic formula using a proof assistant such as Coq. Our characteristic formulae improve over Honda et al's total characteristic assertion pairs in that they are expressible in standard higher-order logic, allowing to exploit them in practice to verify programs using existing proof assistants. Our technique has been applied to formally verify more than half of the content of Okasaki's Purely Functional Data Structures reference book

Skip Supplemental Material Section

Supplemental Material

icfp-weds-1520-chargueraud.mov

References

  1. }}Mike Barnett, Rob DeLine, Manuel Fähndrich, K. Rustan M. Leino, and Wolfram Schulte. Verification of object-oriented programs with invariants. JOT, 3(6), 2004.Google ScholarGoogle Scholar
  2. }}Arthur Charguéraud. Verification of call-by-value functional programs through a deep embedding. Unpublished. http://arthur.chargueraud.org/research/2009/deep/, March 2009.Google ScholarGoogle Scholar
  3. }}Arthur Charguéraud. Technical appendix to the current paper. http://arthur.chargueraud.org/research/2010/cfml/, April 2010.Google ScholarGoogle Scholar
  4. }}Adam Chlipala, Gregory Malecha, Greg Morrisett, Avraham Shinnar, and Ryan Wisnesky. Effective interactive proofs for higher-order imperative programs. In ICFP, September 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. }}Thierry Coquand. Alfa/agda. In Freek Wiedijk, editor, The Seventeen Provers of the World, volume 3600 of Lecture Notes in Computer Science, pages 50--54. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}Xinyu Feng, Zhong Shao, Alexander Vaynberg, Sen Xiang, and Zhaozhong Ni. Modular verification of assembly code with stack-based control abstractions. In M. Schwartzbach and T. Ball, editors, PLDI. ACM, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. }}Jean-Christophe Filliâtre and Claude Marché. Multi-prover verification of C programs. In Formal Methods and Software Engineering, 6th ICFEM 2004, volume 3308 of LNCS, pages 15--29. Springer-Verlag, 2004.Google ScholarGoogle Scholar
  8. }}Cormac Flanagan, Amr Sabry, Bruce F. Duba, and Matthias Felleisen. The essence of compiling with continuations. In PLDI, pages 237--247, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. }}G. A. Gorelick. A complete axiomatic system for proving assertions about recursive and non-recursive programs. Technical Report 75, University of Toronto, 1975.Google ScholarGoogle Scholar
  10. }}Kohei Honda, Martin Berger, and Nobuko Yoshida. Descriptive and relative completeness of logics for higher-order functions. In M. Bugliesi, B. Preneel, V. Sassone, and I. Wegener, editors, ICALP (2), volume 4052 of LNCS. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}Johannes Kanig and Jean-Christophe Filliâtre. Who: a verifier for effectful higher-order programs. In ML'09: Proceedings of the 2009 ACM SIGPLAN workshop on ML, pages 39--48, New York, NY, USA, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. }}Henri Korver. Computing distinguishing formulas for branching bisimulation. In Kim Guldstrand Larsen and Arne Skou, editors, CAV, volume 575 of LNCS, pages 13--23. Springer, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}Xavier Leroy. Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In POPL, pages 42--54, January 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. }}Claude Marché, Christine Paulin Mohring, and Xavier Urbain. The Krakatoa tool for certification of Java\slash JavaCard programs annotated in JML. JLAP, 58(1-2):89--106, 2004.Google ScholarGoogle Scholar
  15. }}Conor McBride and James McKinna. The view from the left. JFP, 14(1):69--111, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. }}Farhad Mehta and Tobias Nipkow. Proving pointer programs in higher-order logic. In Franz Baader, editor, CADE, volume 2741 of LNCS, pages 121--135. Springer, 2003.Google ScholarGoogle Scholar
  17. }}R. Milner. Communication and Concurrency. Prentice-Hall, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}Magnus O. Myreen, Michael J. C. Gordon, and Konrad Slind. Machine-code verification for multiple architectures: an application of decompilation into logic. In FMCAD, pages 1--8, Piscataway, NJ, USA, 2008. IEEE Press. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. }}Aleksandar Nanevski, J. Gregory Morrisett, and Lars Birkedal. Hoare type theory, polymorphism and separation. JFP, 18(5-6):865--911, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. }}Aleksandar Nanevski, Viktor Vafeiadis, and Josh Berdine. Structuring the verification of heap-manipulating programs. In Manuel V. Hermenegildo and Jens Palsberg, editors, POPL, pages 261--274. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. }}Zhaozhong Ni and Zhong Shao. Certified assembly programming with embedded code pointers. In POPL, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. }}Chris Okasaki. Purely Functional Data Structures. Cambridge University Press, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. }}David Park. Concurrency and automata on infinite sequences. In Peter Deussen, editor, Theoretical Computer Science: 5th GI-Conference, Karlsruhe, volume 104 of LNCS, pages 167--183, Berlin, Heidelberg, and New York, March 1981. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. }}Yann Régis-Gianas and François Pottier. A Hoare logic for call-by-value functional programs. In MPC, July 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. }}Matthieu Sozeau. Program-ing finger trees in coq. SIGPLAN Not., 42(9):13--24, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. }}Karen Zee, Viktor Kuncak, and Martin Rinard. An integrated proof language for imperative programs. In PLDI, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Program verification through characteristic formulae

      Recommendations

      Reviews

      Rosziati Ibrahim

      Charguéraud presents a tool for the verification of purely functional programs consisting of two parts. The first part is used to generate characteristic formulas, and the second part is used to formulate a set of lemmas, notations, and tactics for the verification of the characteristic formulas. The characteristic formulas are generated from the source codes of the functional program by extracting the post-condition and the abstraction of the program. The characteristic formulas are then used for the verification of the functional program. Soundness and a completeness proof are used for verification purposes. The main contribution of this paper is in the area of formalization of data abstraction. Note that the proposed tool can only be used for a purely functional program. Online Computing Reviews Service

      Access critical reviews of Computing literature here

      Become a reviewer for Computing Reviews.

      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 45, Issue 9
        ICFP '10
        September 2010
        382 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1932681
        Issue’s Table of Contents
        • cover image ACM Conferences
          ICFP '10: Proceedings of the 15th ACM SIGPLAN international conference on Functional programming
          September 2010
          398 pages
          ISBN:9781605587943
          DOI:10.1145/1863543

        Copyright © 2010 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 27 September 2010

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      ePub

      View this article in ePub.

      View ePub
      About Cookies On This Site

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

      Learn more

      Got it!