Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2034773.2034828acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Characteristic formulae for the verification of imperative programs

Published: 19 September 2011 Publication History

Abstract

In previous work, we introduced an approach to program verification based on characteristic formulae. The approach consists of generating a higher-order logic formula from the source code of a program. This characteristic formula is constructed in such a way that it gives a sound and complete description of the semantics of that program. The formula can thus be exploited in an interactive proof assistant to formally verify that the program satisfies a particular specification.
This previous work was, however, only concerned with purely-functional programs. In the present paper, we describe the generalization of characteristic formulae to an imperative programming language. In this setting, characteristic formulae involve specifications expressed in the style of Separation Logic. They also integrate the frame rule, which enables local reasoning. We have implemented a tool based on characteristic formulae. This tool, called CFML, supports the verification of imperative Caml programs using the Coq proof assistant. Using CFML, we have formally verified nontrivial imperative algorithms, as well as CPS functions, higher-order iterators, and programs involving higher-order stores.

Supplementary Material

MP4 File (_talk13.mp4)

References

[1]
Andrew W. Appel. Tactics for separation logic. Unpublished draft, http://www.cs.princeton.edu/appel/papers/septacs.pdf, 2006.
[2]
Mike Barnett, Rob DeLine, Manuel Fähndrich, K. Rustan M. Leino, and Wolfram Schulte. Verification of object-oriented programs with invariants. Journal of Object Technology, 3(6), 2004.
[3]
Bruno Barras and Bruno Bernardo. The implicit calculus of constructions as a programming language with dependent types. In FoSSaCS, volume 4962 of LNCS, pages 365--379. Springer, 2008.
[4]
Bernhard Beckert, Reiner Hähnle, and Peter H. Schmitt. Verification of Object-Oriented Software: The KeY Approach, volume 4334 of LNCS. Springer-Verlag, Berlin, 2007.
[5]
Josh Berdine, Cristiano Calcagno, and Peter W. O'Hearn. Smallfoot: Modular automatic assertion checking with separation logic. In International Symposium on Formal Methods for Components and Objects, volume 4111 of LNCS, pages 115--137. Springer, 2005.
[6]
Martin Berger, Kohei Honda, and Nobuko Yoshida. A logical analysis of aliasing in imperative higher-order functions. In ICFP, pages 280--293, 2005.
[7]
Arthur Charguéraud. Verification of call-by-value functional programs through a deep embedding. 2009. Unpublished. http://arthur.chargueraud.org/research/2009/deep/.
[8]
Arthur Charguéraud. Characteristic Formulae for Mechanized Program Verification. PhD thesis, Université Paris-Diderot, 2010.
[9]
Arthur Charguéraud. Program verification through characteristic formulae. In ICFP, pages 321--332. ACM, 2010.
[10]
Adam Chlipala, Gregory Malecha, Greg Morrisett, Avraham Shinnar, and Ryan Wisnesky. Effective interactive proofs for higher-order imperative programs. In ICFP, 2009.
[11]
The Coq Development Team. The Coq Proof Assistant Reference Manual, Version 8.2, 2009.
[12]
Jean-Christophe Filliâtre. Verification of non-functional programs using interpretations in type theory. Journal of Functional Programming, 13(4):709--745, 2003.
[13]
Cormac Flanagan, Amr Sabry, Bruce F. Duba, and Matthias Felleisen. The essence of compiling with continuations. In PLDI, pages 237--247, 1993.
[14]
Susanne Graf and Joseph Sifakis. A modal characterization of observational congruence on finite terms of CCS. Information and Control, 68(1-3):125--145, 1986.
[15]
David Harel, Dexter Kozen, and Jerzy Tiuryn. Dynamic Logic. The MIT Press, Cambridge, Massachusetts, 2000.
[16]
Matthew Hennessy and Robin Milner. On observing nondeterminism and concurrency. In ICALP, volume 85 of LNCS, pages 299--309. Springer-Verlag, 1980.
[17]
C. A. R. Hoare. An axiomatic basis for computer programming. Communications of the ACM, 12(10):576--580, 583, 1969.
[18]
Kohei Honda, Martin Berger, and Nobuko Yoshida. Descriptive and relative completeness of logics for higher-order functions. In ICALP, volume 4052 of LNCS. Springer, 2006.
[19]
Bart Jacobs and Erik Poll. Java program verification at nijmegen: Developments and perspective. In ISSS, volume 3233 of LNCS, pages 134--153. Springer, 2003.
[20]
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. ACM, 2009.
[21]
Gerwin Klein, Philip Derrin, and Kevin Elphinstone. Experience report: seL4: formally verifying a high-performance microkernel. In ICFP, pages 91--96. ACM, 2009.
[22]
Gerwin Klein, Kevin Elphinstone, Gernot Heiser, June Andronick, David Cock, Philip Derrin, Dhammika Elkaduwe, Kai Engelhardt, Rafal Kolanski, Michael Norrish, Thomas Sewell, Harvey Tuch, and Simon Winwood. seL4: Formal verification of an OS kernel. In Proceedings of the 22nd Symposium on Operating Systems Principles (SOSP), Operating Systems Review (OSR), pages 207--220, Big Sky, MT, 2009. ACM SIGOPS.
[23]
Xavier Leroy. Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In POPL, pages 42--54, 2006.
[24]
Xavier Leroy, Damien Doligez, Jacques Garrigue, Didier Rémy, and Jérôme Vouillon. The Objective Caml system, 2005.
[25]
Pierre Letouzey. Programmation fonctionnelle certifiée - l'extraction de programmes dans l'assistant Coq. PhD thesis, Université Paris 11, 2004.
[26]
Nicolas Marti, Reynald Affeldt, and Akinori Yonezawa. Towards formal verification of memory properties using separation logic, 2005.
[27]
Andrew McCreight. Practical tactics for separation logic. In TPHOLs, volume 5674 of LNCS, pages 343--358. Springer, 2009.
[28]
Farhad Mehta and Tobias Nipkow. Proving pointer programs in higher-order logic. Information and Computation, 199(1-2), 2005.
[29]
Magnus O. Myreen. Formal Verification of Machine-Code Programs. PhD thesis, University of Cambridge, 2008.
[30]
Magnus O. Myreen. Separation logic adapted for proofs by rewriting. In Interactive Theorem Proving (ITP), volume 6172 of LNCS, pages 485--489. Springer, 2010.
[31]
Magnus O. Myreen and Michael J. C. Gordon. Verified LISP implementations on ARM, x86 and powerPC. In TPHOLs, volume 5674 of LNCS, pages 359--374. Springer, 2009.
[32]
Aleksandar Nanevski and Greg Morrisett. Dependent type theory of stateful higher-order functions. Technical Report TR-24-05, Harvard University, 2005.
[33]
Aleksandar Nanevski, J. Gregory Morrisett, and Lars Birkedal. Hoare type theory, polymorphism and separation. Journal of Functional Programming, 18(5--6):865--911, 2008.
[34]
Aleksandar Nanevski, Viktor Vafeiadis, and Josh Berdine. Structuring the verification of heap-manipulating programs. In POPL, pages 261--274. ACM, 2010.
[35]
Zhaozhong Ni and Zhong Shao. Certified assembly programming with embedded code pointers. In POPL, 2006.
[36]
Peter O'Hearn, John Reynolds, and Hongseok Yang. Local reasoning about programs that alter data structures. In CSL, volume 2142 of LNCS, pages 1--19, Berlin, 2001. Springer-Verlag.
[37]
Chris Okasaki. Purely Functional Data Structures. Cambridge University Press, 1999.
[38]
Yann Régis-Gianas and François Pottier. A Hoare logic for call-by-value functional programs. In MPC, 2008.
[39]
John C. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS, pages 55--74, 2002.
[40]
Hayo Thielecke. Frame rules from answer types for code pointers. In POPL, pages 309--319, 2006.
[41]
Thomas Tuerk. Local reasoning about while-loops. In VSTTE LNCS, 2010.
[42]
Karen Zee, Viktor Kuncak, and Martin C. Rinard. An integrated proof language for imperative programs. In PLDI, pages 338--351. ACM, 2009.

Cited By

View all
  • (2024)Quiver: Guided Abductive Inference of Separation Logic Specifications in CoqProceedings of the ACM on Programming Languages10.1145/36564138:PLDI(889-913)Online publication date: 20-Jun-2024
  • (2024)Mechanised Hypersafety Proofs about Structured DataProceedings of the ACM on Programming Languages10.1145/36564038:PLDI(647-670)Online publication date: 20-Jun-2024
  • (2024)Verifying Programs with Logic and Extended Proof Rules: Deep Embedding vs. Shallow EmbeddingJournal of Automated Reasoning10.1007/s10817-024-09706-568:3Online publication date: 10-Aug-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '11: Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
September 2011
470 pages
ISBN:9781450308656
DOI:10.1145/2034773
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 46, Issue 9
    ICFP '11
    September 2011
    456 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2034574
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 19 September 2011

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. characteristic formula
  2. interactive verification
  3. total correctness

Qualifiers

  • Research-article

Conference

ICFP '11
Sponsor:

Acceptance Rates

ICFP '11 Paper Acceptance Rate 33 of 92 submissions, 36%;
Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)18
  • Downloads (Last 6 weeks)0
Reflects downloads up to 25 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Quiver: Guided Abductive Inference of Separation Logic Specifications in CoqProceedings of the ACM on Programming Languages10.1145/36564138:PLDI(889-913)Online publication date: 20-Jun-2024
  • (2024)Mechanised Hypersafety Proofs about Structured DataProceedings of the ACM on Programming Languages10.1145/36564038:PLDI(647-670)Online publication date: 20-Jun-2024
  • (2024)Verifying Programs with Logic and Extended Proof Rules: Deep Embedding vs. Shallow EmbeddingJournal of Automated Reasoning10.1007/s10817-024-09706-568:3Online publication date: 10-Aug-2024
  • (2024)Practical Deductive Verification of OCaml ProgramsFormal Methods10.1007/978-3-031-71177-0_29(518-542)Online publication date: 9-Sep-2024
  • (2023)Mostly Automated Proof Repair for Verified LibrariesProceedings of the ACM on Programming Languages10.1145/35912217:PLDI(25-49)Online publication date: 6-Jun-2023
  • (2023)Omnisemantics: Smooth Handling of NondeterminismACM Transactions on Programming Languages and Systems10.1145/357983445:1(1-43)Online publication date: 8-Mar-2023
  • (2023)A Product of Shape and Sequence AbstractionsStatic Analysis10.1007/978-3-031-44245-2_15(310-342)Online publication date: 24-Oct-2023
  • (2023)Specifying and Verifying Higher-order Rust IteratorsTools and Algorithms for the Construction and Analysis of Systems10.1007/978-3-031-30820-8_9(93-110)Online publication date: 22-Apr-2023
  • (2022)Coq’s vibrant ecosystem for verification engineering (invited talk)Proceedings of the 11th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3497775.3503951(2-11)Online publication date: 17-Jan-2022
  • (2021)Steel: proof-oriented programming in a dependently typed concurrent separation logicProceedings of the ACM on Programming Languages10.1145/34735905:ICFP(1-30)Online publication date: 19-Aug-2021
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media