skip to main content
10.1145/1706299.1706331acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Structuring the verification of heap-manipulating programs

Published: 17 January 2010 Publication History

Abstract

Most systems based on separation logic consider only restricted forms of implication or non-separating conjunction, as full support for these connectives requires a non-trivial notion of variable context, inherited from the logic of bunched implications (BI). We show that in an expressive type theory such as Coq, one can avoid the intricacies of BI, and support full separation logic very efficiently, using the native structuring primitives of the type theory.
Our proposal uses reflection to enable equational reasoning about heaps, and Hoare triples with binary postconditions to further facilitate it. We apply these ideas to Hoare Type Theory, to obtain a new proof technique for verification of higher-order imperative programs that is general, extendable, and supports very short proofs, even without significant use of automation by tactics. We demonstrate the usability of the technique by verifying the fast congruence closure algorithm of Nieuwenhuis and Oliveras, employed in the state-of-the-art Barcelogic SAT solver.

References

[1]
A. W. Appel. Tactics for separation logic. Available at http://www.cs.princeton.edu/~appel/papers/septacs.pdf, 2006.
[2]
B. Barras and B. Bernardo. The implicit calculus of constructions as a programming language with dependent types. In FoSSaCS'08, pages 365--379.
[3]
C. Barrett, M. Deters, A. Oliveras, and A. Stump. Design and results of the 4th annual satisfiability modulo theories competition (SMT-COMP 2008). To appear.
[4]
J. M. L. Bean. Ribbon Proofs - A Proof System for the Logic of Bunched Implications. PhD thesis, Queen Mary University of London, 2006.
[5]
J. Berdine, C. Calcagno, B. Cook, D. Distefano, P. W. O'Hearn, T. Wies, and H. Yang. Shape analysis for composite data structures. In CAV'07, pages 178--192.
[6]
J. Berdine, C. Calcagno, and P. W. O'Hearn. Smallfoot: Modular automatic assertion checking with separation logic. In Formal Methods for Components and Objects, pages 115--137, 2006.
[7]
L. Birkedal and H. Yang. Relational parametricity and separation logic. Logical Methods in Computer Science, 4(2:6):1--27, 2008.
[8]
C. Calcagno, D. Distefano, P. O'Hearn, and H. Yang. Compositional shape analysis bymeans of bi-abduction. In POPL'09, pages 289--300.
[9]
C. Calcagno, P. W. O'Hearn, and H. Yang. Local action and abstract separation logic. In LICS'07, pages 366--368.
[10]
B.-Y. E. Chang and X. Rival. Relational inductive shape analysis. In POPL'08, pages 247--260.
[11]
A. J. Chlipala, J. G. Malecha, G. Morrisett, A. Shinnar, and R. Wisnesky. Effective interactive proofs for higher-order imperative programs. In ICFP'09, pages 79--90.
[12]
X. Feng, Z. Shao, Y. Dong, and Y. Guo. Certifying low-level programs with hardware interrupts and preemptive threads. In PLDI'08, pages 170--182.
[13]
D. Galmiche and D. Méry. Semantic labelled tableaux for propositional BI. Journal of Logic and Computation, 13(5):707--753, 2003.
[14]
G. Gonthier and A. Mahboubi. A small scale reflection extension for the Coq system. Technical Report 6455, INRIA, 2007.
[15]
N. R. Krishnaswami, J. Aldrich, L. Birkedal, K. Svendsen, and A. Buisse. Design patterns in separation logic. In TLDI'09, pages 105--116.
[16]
X. Leroy and S. Blazy. Formal verification of a C-like memory model and its uses for verifying program transformations. J. Autom. Reason., 41(1):1--31, 2008.
[17]
N. Marty and R. Affeldt. A certified verifier for a fragment of separation logic. Computer Software, 25(3):135--147, 2008.
[18]
A. McCreight. Practical tactics for separation logic. In TPHOL'09, pages 343--358.
[19]
A. Nanevski, G. Morrisett, and L. Birkedal. Polymorphism and separation in Hoare Type Theory. In ICFP'06, pages 62--73.
[20]
A. Nanevski, G. Morrisett, and L. Birkedal. Hoare type theory, polymorphism and separation. Journal of Functional Programming, 18(5&6):865--911, 2008.
[21]
A. Nanevski, G. Morrisett, A. Shinnar, P. Govereau, and L. Birkedal. Ynot: Dependent types for imperative programs. In ICFP'08, pages 229--240.
[22]
H. H. Nguyen and W.-N. Chin. Enhancing program verification with lemmas. In CAV'08, pages 355--369.
[23]
R. Nieuwenhuis and A. Oliveras. Fast congruence closure and extensions. Information and Computation, 205(4):557--580, 2007.
[24]
P. O'Hearn. On bunched typing. Journal of Functional Programming, 13(4):747--796, 2003.
[25]
P. O'Hearn, J. Reynolds, and H. Yang. Local reasoning about programs that alter data structures. In CSL'01, pages 1--19.
[26]
J. C. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS'02, pages 55--74.
[27]
K. Zee, V. Kuncak, and M. Rinard. An integrated proof language for imperative programs. In PLDI'09, pages 338--351.

Cited By

View all
  • (2024)Rooting for Efficiency: Mechanised Reasoning about Array-Based Trees in Separation LogicProceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3636501.3636944(45-59)Online publication date: 9-Jan-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
  • (2021)Deep Semantic Versioning for Evolution and VariabilityProceedings of the 23rd International Symposium on Principles and Practice of Declarative Programming10.1145/3479394.3479416(1-13)Online publication date: 6-Sep-2021
  • Show More Cited By

Index Terms

  1. Structuring the verification of heap-manipulating programs

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Conferences
    POPL '10: Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
    January 2010
    520 pages
    ISBN:9781605584799
    DOI:10.1145/1706299
    • cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 45, Issue 1
      POPL '10
      January 2010
      500 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1707801
      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

    In-Cooperation

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 17 January 2010

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. hoare logic
    2. monads
    3. separation logic
    4. type theory

    Qualifiers

    • Research-article

    Conference

    POPL '10
    Sponsor:

    Acceptance Rates

    Overall Acceptance Rate 860 of 4,328 submissions, 20%

    Upcoming Conference

    POPL '26

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)4
    • Downloads (Last 6 weeks)0
    Reflects downloads up to 05 Mar 2025

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Rooting for Efficiency: Mechanised Reasoning about Array-Based Trees in Separation LogicProceedings of the 13th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3636501.3636944(45-59)Online publication date: 9-Jan-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
    • (2021)Deep Semantic Versioning for Evolution and VariabilityProceedings of the 23rd International Symposium on Principles and Practice of Declarative Programming10.1145/3479394.3479416(1-13)Online publication date: 6-Sep-2021
    • (2021)Certifying the synthesis of heap-manipulating programsProceedings of the ACM on Programming Languages10.1145/34735895:ICFP(1-29)Online publication date: 19-Aug-2021
    • (2019)Structuring the synthesis of heap-manipulating programsProceedings of the ACM on Programming Languages10.1145/32903853:POPL(1-30)Online publication date: 2-Jan-2019
    • (2019)Meta-F $$^\star $$ : Proof Automation with SMT, Tactics, and MetaprogramsProgramming Languages and Systems10.1007/978-3-030-17184-1_2(30-59)Online publication date: 6-Apr-2019
    • (2018)MoSeL: a general, extensible modal framework for interactive proofs in separation logicProceedings of the ACM on Programming Languages10.1145/32367722:ICFP(1-30)Online publication date: 30-Jul-2018
    • (2018)Mechanising blockchain consensusProceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and Proofs - CPP 201810.1145/3176245.3167086(78-90)Online publication date: 2018
    • (2018)Mechanising blockchain consensusProceedings of the 7th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3167086(78-90)Online publication date: 8-Jan-2018
    • (2017)Programming and proving with distributed protocolsProceedings of the ACM on Programming Languages10.1145/31581162:POPL(1-30)Online publication date: 27-Dec-2017
    • 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