10.1145/1863543.1863590acmconferencesArticle/Chapter ViewAccess DenialPublication PagesicfpConference Proceedingsconference-collections
research-article

Program verification through characteristic formulae

Online:27 September 2010Publication History

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

Get full access to this Publication

Purchase, subscribe or recommend this publication to your librarian.

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 Scholar
  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 Scholar
  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 Scholar
  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 Scholar
  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 Scholar
  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 Scholar
  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 Scholar
  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 Scholar
  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 Scholar
  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 Scholar
  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 Scholar
  19. }}Aleksandar Nanevski, J. Gregory Morrisett, and Lars Birkedal. Hoare type theory, polymorphism and separation. JFP, 18(5-6):865--911, 2008. Google ScholarGoogle Scholar
  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 Scholar
  21. }}Zhaozhong Ni and Zhong Shao. Certified assembly programming with embedded code pointers. In POPL, 2006. Google ScholarGoogle Scholar
  22. }}Chris Okasaki. Purely Functional Data Structures. Cambridge University Press, 1999. Google ScholarGoogle Scholar
  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 Scholar
  24. }}Yann Régis-Gianas and François Pottier. A Hoare logic for call-by-value functional programs. In MPC, July 2008. Google ScholarGoogle Scholar
  25. }}Matthieu Sozeau. Program-ing finger trees in coq. SIGPLAN Not., 42(9):13--24, 2007. Google ScholarGoogle Scholar
  26. }}Karen Zee, Viktor Kuncak, and Martin Rinard. An integrated proof language for imperative programs. In PLDI, 2009. Google ScholarGoogle Scholar

Index Terms

  1. Program verification through characteristic formulae

      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

        ACM Conferences cover image
        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

        Qualifiers

        • research-article

      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!