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.
Already a Subscriber?Sign In
Supplemental Material
References
- }}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 Scholar
- }}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 Scholar
- }}Arthur Charguéraud. Technical appendix to the current paper. http://arthur.chargueraud.org/research/2010/cfml/, April 2010.Google Scholar
- }}Adam Chlipala, Gregory Malecha, Greg Morrisett, Avraham Shinnar, and Ryan Wisnesky. Effective interactive proofs for higher-order imperative programs. In ICFP, September 2009. Google Scholar
- }}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 Scholar
- }}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 Scholar
- }}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 Scholar
- }}Cormac Flanagan, Amr Sabry, Bruce F. Duba, and Matthias Felleisen. The essence of compiling with continuations. In PLDI, pages 237--247, 1993. Google Scholar
- }}G. A. Gorelick. A complete axiomatic system for proving assertions about recursive and non-recursive programs. Technical Report 75, University of Toronto, 1975.Google Scholar
- }}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 Scholar
- }}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 Scholar
- }}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 Scholar
- }}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 Scholar
- }}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 Scholar
- }}Conor McBride and James McKinna. The view from the left. JFP, 14(1):69--111, 2004. Google Scholar
- }}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 Scholar
- }}R. Milner. Communication and Concurrency. Prentice-Hall, 1989. Google Scholar
- }}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 Scholar
- }}Aleksandar Nanevski, J. Gregory Morrisett, and Lars Birkedal. Hoare type theory, polymorphism and separation. JFP, 18(5-6):865--911, 2008. Google Scholar
- }}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 Scholar
- }}Zhaozhong Ni and Zhong Shao. Certified assembly programming with embedded code pointers. In POPL, 2006. Google Scholar
- }}Chris Okasaki. Purely Functional Data Structures. Cambridge University Press, 1999. Google Scholar
- }}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 Scholar
- }}Yann Régis-Gianas and François Pottier. A Hoare logic for call-by-value functional programs. In MPC, July 2008. Google Scholar
- }}Matthieu Sozeau. Program-ing finger trees in coq. SIGPLAN Not., 42(9):13--24, 2007. Google Scholar
- }}Karen Zee, Viktor Kuncak, and Martin Rinard. An integrated proof language for imperative programs. In PLDI, 2009. Google Scholar
Index Terms
Program verification through characteristic formulae





Comments