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

Natural proofs for data structure manipulation in C using separation logic

Published: 09 June 2014 Publication History

Abstract

The natural proof technique for heap verification developed by Qiu et al. [32] provides a platform for powerful sound reasoning for specifications written in a dialect of separation logic called Dryad. Natural proofs are proof tactics that enable automated reasoning exploiting recursion, mimicking common patterns found in human proofs. However, these proofs are known to work only for a simple toy language [32].
In this work, we develop a framework called VCDryad that extends the Vcc framework [9] to provide an automated deductive framework against separation logic specifications for C programs based on natural proofs. We develop several new techniques to build this framework, including (a) a novel tool architecture that allows encoding natural proofs at a higher level in order to use the existing Vcc framework (including its intricate memory model, the underlying type-checker, and the SMT-based verification infrastructure), and (b) a synthesis of ghost-code annotations that captures natural proof tactics, in essence forcing Vcc to find natural proofs using primarily decidable theories.
We evaluate our tool extensively, on more than 150 programs, ranging from code manipulating standard data structures, well-known open source library routines (Glib, OpenBSD), Linux kernel routines, customized OS data structures, etc. We show that all these C programs can be fully automatically verified using natural proofs (given pre/post conditions and loop invariants) without any user-provided proof tactics. VCDryad is perhaps the first deductive verification framework for heap-manipulating programs in a real language that can prove such a wide variety of programs automatically.

References

[1]
M. Barnett, B.-Y. E. Chang, R. DeLine, B. Jacobs, and K. R. M. Leino. Boogie: A modular reusable verifier for object-oriented programs. In FMCO'05, pages 364--387, 2006.
[2]
J. Berdine, C. Calcagno, and P. W. O'Hearn. A decidable fragment of separation logic. In FSTTCS, pages 97--109, 2004.
[3]
J. Berdine, C. Calcagno, and P. W. O'Hearn. Symbolic execution with separation logic. In APLAS'05, pages 52--68, 2005.
[4]
J. Berdine, C. Calcagno, and P. W. O'Hearn. Smallfoot: Modular automatic assertion checking with separation logic. In FMCO'05, pages 115--137, 2006.
[5]
D. Beyer. Competition on software verification (sv-comp), 2013. URL http://sv-comp.sosy-lab.org/2014/.
[6]
A. R. Bradley, Z. Manna, and H. B. Sipma. What's decidable about arrays? In VMCAI'06, 2006.
[7]
W.-N. Chin, C. David, H. H. Nguyen, and S. Qin. Automated verification of shape, size and bag properties via user-defined predicates in separation logic. Sci. Comput. Program., pages 1006--1036, 2012.
[8]
A. Chlipala. Mostly-automated verification of low-level programs in computational separation logic. In PLDI '11, pages 234--245, 2011.
[9]
E. Cohen, M. Dahlweid, M. Hillebrand, D. Leinenbach, M. Moskal, T. Santen, W. Schulte, and S. Tobies. VCC: A practical system for verifying concurrent C. In TPHOLs'09, pages 23--42, 2009.
[10]
E. Cohen, M. Moskal, S. Tobies, and W. Schulte. A precise yet efficient memory model for C. Electron. Notes Theor. Comput. Sci., pages 85--103, 2009.
[11]
E. Cohen, W. J. Paul, and S. Schmaltz. Theory of multi core hypervisor verification. In SOFSEM'13, pages 1--27, 2013.
[12]
J. Condit, B. Hackett, S. K. Lahiri, and S. Qadeer. Unifying type checking and property checking for low-level code. In POPL'09, pages 302--314, 2009.
[13]
B. Cook, C. Haase, J. Ouaknine, M. J. Parkinson, and J. Worrell. Tractable reasoning in a fragment of separation logic. In CONCUR'11, pages 235--249, 2011.
[14]
L. M. de Moura and N. Bjørner. Generalized, efficient array decision procedures. In FMCAD'09, pages 45--52, 2009.
[15]
D. Distefano and M. J. Parkinson J. jStar: Towards practical verification for Java. In OOPSLA '08, pages 213--226, 2008.
[16]
C. Flanagan and K. R. M. Leino. Houdini, an annotation assistant for ESC/Java. In FME '01, pages 500--517, 2001.
[17]
Y. Ge and L. M. de Moura. Complete instantiation for quantified formulas in satisfiabiliby modulo theories. In CAV'09, pages 306--320, 2009.
[18]
C. Haase, S. Ishtiaq, J. Ouaknine, and M. J. Parkinson. SeLoger: A tool for graph-based reasoning in separation logic. In CAV'13, pages 790--795, 2013.
[19]
R. Iosif, A. Rogalewicz, and J. Simácek. The tree width of separation logic with recursive definitions. In CADE-24, pages 21--38, 2013.
[20]
S. Itzhaky, A. Banerjee, N. Immerman, A. Nanevski, and M. Sagiv. Effectively-propositional reasoning about reachability in linked data structures. In CAV, pages 756--772, 2013.
[21]
B. Jacobs, J. Smans, P. Philippaerts, F. Vogels, W. Penninckx, and F. Piessens. Verifast: a powerful, sound, predictable, fast verifier for C and Java. In NFM'11, pages 41--55, 2011.
[22]
M. Kawaguchi, P. M. Rondon, and R. Jhala. Type-based data structure verification. In PLDI'09, pages 304--315, 2009.
[23]
C. Le Goues, K. R. M. Leino, and M. Moskal. The Boogie verification debugger. In SEFM'11, pages 407--414, 2011.
[24]
K. R. M. Leino. Dafny: An automatic program verifier for functional correctness. In LPAR-16, pages 348--370, 2010.
[25]
P. Madhusudan, X. Qiu, and A. Stefanescu. Recursive proofs for inductive tree data-structures. In POPL'12, pages 123--136, 2012.
[26]
H. Mai, E. Pek, H. Xue, S. T. King, and P. Madhusudan. Verifying security invariants in ExpressOS. In ASPLOS '13, pages 293--304, 2013.
[27]
A. Møller and M. I. Schwartzbach. The pointer assertion logic engine. In PLDI'01, June 2001.
[28]
J. A. Navarro Pérez and A. Rybalchenko. Separation logic + superposition calculus = heap theorem prover. In PLDI'11, PLDI '11, pages 556--566, 2011.
[29]
P. W. O'Hearn, J. C. Reynolds, and H. Yang. Local reasoning about programs that alter data structures. In CSL'01, pages 1--19, 2001.
[30]
P. Philippaerts, J. T. Mühlberg, W. Penninckx, J. Smans, B. Jacobs, and F. Piessens. Software verification with VeriFast: Industrial case studies. Sci. Comput. Program., 82:77--97, 2014.
[31]
R. Piskac, T. Wies, and D. Zufferey. Automating separation logic using smt. In CAV'13, 2013.
[32]
X. Qiu, P. Garg, A. Stefanescu, and P. Madhusudan. Natural proofs for structure, data, and separation. In PLDI '13, pages 231--242, 2013.
[33]
J. C. Reynolds. Separation logic: A logic for shared mutable data structures. In LICS'02, pages 55--74, 2002.
[34]
P. M. Rondon. Liquid Types. PhD thesis, UCSD, 2012.
[35]
P. Suter, M. Dotta, and V. Kuncak. Decision procedures for algebraic data types with abstractions. In POPL'10, pages 199--210, 2010.
[36]
P. Suter, A. S. Köksal, and V. Kuncak. Satisfiability modulo recursive programs. In SAS'11, pages 298--315, 2011.
[37]
J. Yang and C. Hawblitzel. Safe to the last instruction: automated verification of a type-safe operating system. In PLDI'10, pages 99--110, 2010.

Cited By

View all
  • (2024)RefinedRust: A Type System for High-Assurance Verification of Rust ProgramsProceedings of the ACM on Programming Languages10.1145/36564228:PLDI(1115-1139)Online publication date: 20-Jun-2024
  • (2023)Complete First-Order Reasoning for Properties of Functional ProgramsProceedings of the ACM on Programming Languages10.1145/36228357:OOPSLA2(1063-1092)Online publication date: 16-Oct-2023
  • (2023)A First-order Logic with FramesACM Transactions on Programming Languages and Systems10.1145/358305745:2(1-44)Online publication date: 15-May-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2014
619 pages
ISBN:9781450327848
DOI:10.1145/2594291
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 49, Issue 6
    PLDI '14
    June 2014
    598 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2666356
    • Editor:
    • Andy Gill
    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: 09 June 2014

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. data structures
  2. natural proofs
  3. program verifiers
  4. separation logic

Qualifiers

  • Research-article

Funding Sources

Conference

PLDI '14
Sponsor:

Acceptance Rates

PLDI '14 Paper Acceptance Rate 52 of 287 submissions, 18%;
Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

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

Other Metrics

Citations

Cited By

View all
  • (2024)RefinedRust: A Type System for High-Assurance Verification of Rust ProgramsProceedings of the ACM on Programming Languages10.1145/36564228:PLDI(1115-1139)Online publication date: 20-Jun-2024
  • (2023)Complete First-Order Reasoning for Properties of Functional ProgramsProceedings of the ACM on Programming Languages10.1145/36228357:OOPSLA2(1063-1092)Online publication date: 16-Oct-2023
  • (2023)A First-order Logic with FramesACM Transactions on Programming Languages and Systems10.1145/358305745:2(1-44)Online publication date: 15-May-2023
  • (2022)Model-guided synthesis of inductive lemmas for FOL with least fixpointsProceedings of the ACM on Programming Languages10.1145/35633546:OOPSLA2(1873-1902)Online publication date: 31-Oct-2022
  • (2020)A Learning-Based Approach to Synthesizing Invariants for Incomplete Verification EnginesJournal of Automated Reasoning10.1007/s10817-020-09570-zOnline publication date: 13-Jul-2020
  • (2020)A First-Order Logic with FramesProgramming Languages and Systems10.1007/978-3-030-44914-8_19(515-543)Online publication date: 27-Apr-2020
  • (2019)Coordinating Clinical TeamsProceedings of the ACM on Human-Computer Interaction10.1145/33593233:CSCW(1-30)Online publication date: 7-Nov-2019
  • (2019)Did It Have To End This Way?Proceedings of the ACM on Human-Computer Interaction10.1145/33593113:CSCW(1-23)Online publication date: 7-Nov-2019
  • (2019)Information Materialities of Citizen Communication in the U.S. CongressProceedings of the ACM on Human-Computer Interaction10.1145/33591493:CSCW(1-20)Online publication date: 7-Nov-2019
  • (2019)An abstract stack based approach to verified compositional compilation to machine codeProceedings of the ACM on Programming Languages10.1145/32903753:POPL(1-30)Online publication date: 2-Jan-2019
  • 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

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media