Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Modular reasoning about heap paths via effectively propositional formulas

Published: 08 January 2014 Publication History

Abstract

First order logic with transitive closure, and separation logic enable elegant interactive verification of heap-manipulating programs. However, undecidabilty results and high asymptotic complexity of checking validity preclude complete automatic verification of such programs, even when loop invariants and procedure contracts are specified as formulas in these logics. This paper tackles the problem of procedure-modular verification of reachability properties of heap-manipulating programs using efficient decision procedures that are complete: that is, a SAT solver must generate a counterexample whenever a program does not satisfy its specification. By (a) requiring each procedure modifies a fixed set of heap partitions and creates a bounded amount of heap sharing, and (b) restricting program contracts and loop invariants to use only deterministic paths in the heap, we show that heap reachability updates can be described in a simple manner. The restrictions force program specifications and verification conditions to lie within a fragment of first-order logic with transitive closure that is reducible to effectively propositional logic, and hence facilitate sound, complete and efficient verification. We implemented a tool atop Z3 and report on preliminary experiments that establish the correctness of several programs that manipulate linked data structures.

Supplementary Material

JPG File (d2_left_t8.jpg)
MP4 File (d2_left_t8.mp4)

References

[1]
M. F. Atig, A. Bouajjani, and S. Qadeer. Context-bounded analysis for concurrent programs with dynamic creation of threads. Logical Methods in Computer Science, 7(4), 2011.
[2]
M. Barnett, M. Fähndrich, K. R. M. Leino, P. Müller, W. Schulte, and H. Venter. Specification and verification: the spec# experience. Commun. ACM, 54(6):81--91, 2011.
[3]
C. Barrett, A. Stump, and C. Tinelli. SMTLIB: Satisfiability Modulo Theories Library, 2013. http://smtlib.cs.uiowa.edu/docs.html.
[4]
A. Bouajjani, C. Dragoi, C. Enea, and M. Sighireanu. Accurate invariant checking for programs manipulating lists and arrays with infinite data. In ATVA, pages 167--182, 2012.
[5]
G. Dong and J. Su. Incremental and decremental evaluation of transitive closure by first-order queries. Inf. & Comput., 120:101--106, 1995.
[6]
A. Gotsman, J. Berdine, and B. Cook. Interprocedural shape analysis with separated heap abstractions. In SAS, pages 240--260, 2006.
[7]
W. Hesse. Dynamic Computational Complexity. PhD thesis, UMass in Computer Science, June 2003.
[8]
N. Immerman. Descriptive complexity. Graduate texts in computer science. Springer, 1999.
[9]
S. S. Ishtiaq and P. W. O'Hearn. Bi as an assertion language for mutable data structures. In POPL, pages 14--26, 2001.
[10]
S. Itzhaky, A. Banerjee, N. Immerman, O. Lahav, A. Nanevski, and M. Sagiv. Modular reasoning about heap paths via effectively propositional formulas. Technical report, Tel Aviv University, 2013. http://www.cs.tau.ac.il/~shachar/dl/tr 2013b.pdf.
[11]
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.
[12]
S. Itzhaky, A. Banerjee, N. Immerman, A. Nanevski, and M. Sagiv. Effectively-propositional reasoning about reachability in linked data structures. Technical report, Tel Aviv University, 2013. http://www.cs.tau.ac.il/~shachar/dl/tr-2013.pdf.
[13]
S. K. Lahiri and S. Qadeer. Back to the future: revisiting precise program verification using smt solvers. In POPL, pages 171--182, 2008.
[14]
G. T. Leavens, A. L. Baker, and C. Ruby. Preliminary design of JML: a behavioral interface specification language for Java. ACM SIGSOFT Software Engineering Notes, 31(3):1--38, 2006.
[15]
P. Madhusudan, G. Parlato, and X. Qiu. Decidable logics combining heap structures and data. In POPL, pages 611--622. ACM, 2011.
[16]
N. Mitchell, E. Schonberg, and G. Sevitsky. Making sense of large heaps. In ECOOP, pages 77--97, 2009.
[17]
A. Møller and M. I. Schwartzbach. The pointer assertion logic engine. In PLDI, pages 221--231. ACM, 2001.
[18]
R. Piskac, L. M. de Moura, and N. Bjørner. Deciding effectively propositional logic using dpll and substitution sets. J. Autom. Reasoning, 44(4):401--424, 2010.
[19]
R. Piskac, T.Wies, and D. Zufferey. Automating separation logic using smt. In CAV, pages 773--789, 2013.
[20]
T. W. Reps, S. Sagiv, and G. Yorsh. Symbolic implementation of the best transformer. In VMCAI, pages 252--266, 2004.
[21]
N. Rinetzky, J. Bauer, T. W. Reps, S. Sagiv, and R. Wilhelm. A semantics for procedure local heaps and its abstractions. In POPL, pages 296--309, 2005.
[22]
N. Rinetzky, M. Sagiv, and E. Yahav. Interprocedural shape analysis for cutpoint-free programs. In SAS, pages 284--302, 2005.
[23]
X. Rival and B.-Y. E. Chang. Calling context abstraction with shapes. In POPL, pages 173--186, 2011.
[24]
R. E. Tarjan. Efficiency of a good but not linear set union algorithm. Journal of the ACM, 22(2):215--225, 1975.
[25]
J. Wing. The CMU Larch Project. 1995. URL http://www.cs.cmu.edu/afs/cs/project/larch/www/home.html.
[26]
G. Winskel. The Formal Semantics of Programming Languages: An Introduction. Foundations of Computing Series. Zone Books, U.S., 1993. ISBN 9780262731034.
[27]
H. Yang, O. Lee, J. Berdine, C. Calcagno, B. Cook, D. Distefano, and P. W. O'Hearn. Scalable shape analysis for systems code. In CAV, pages 385--398, 2008.
[28]
G. Yorsh, A. M. Rabinovich, M. Sagiv, A. Meyer, and A. Bouajjani. A logic of reachable patterns in linked data-structures. J. Log. Algebr. Program., 73(1-2):111--142, 2007.
[29]
K. Zee, V. Kuncak, and M. C. Rinard. Full functional verification of linked data structures. In PLDI, pages 349--361, 2008.

Cited By

View all
  • (2021)Data-driven abductive inference of library specificationsProceedings of the ACM on Programming Languages10.1145/34854935:OOPSLA(1-29)Online publication date: 15-Oct-2021
  • (2024)An Infinite Needle in a Finite Haystack: Finding Infinite Counter-Models in Deductive VerificationProceedings of the ACM on Programming Languages10.1145/36328758:POPL(970-1000)Online publication date: 5-Jan-2024
  • (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 SIGPLAN Notices
ACM SIGPLAN Notices  Volume 49, Issue 1
POPL '14
January 2014
661 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2578855
Issue’s Table of Contents
  • cover image ACM Conferences
    POPL '14: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
    January 2014
    702 pages
    ISBN:9781450325448
    DOI:10.1145/2535838
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]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 08 January 2014
Published in SIGPLAN Volume 49, Issue 1

Check for updates

Author Tags

  1. linked list
  2. smt
  3. verification

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)0
Reflects downloads up to 30 Aug 2024

Other Metrics

Citations

Cited By

View all
  • (2021)Data-driven abductive inference of library specificationsProceedings of the ACM on Programming Languages10.1145/34854935:OOPSLA(1-29)Online publication date: 15-Oct-2021
  • (2024)An Infinite Needle in a Finite Haystack: Finding Infinite Counter-Models in Deductive VerificationProceedings of the ACM on Programming Languages10.1145/36328758:POPL(970-1000)Online publication date: 5-Jan-2024
  • (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)A concurrent program logic with a future and historyProceedings of the ACM on Programming Languages10.1145/35633376:OOPSLA2(1378-1407)Online publication date: 31-Oct-2022
  • (2020)What’s Decidable About Program Verification Modulo Axioms?Tools and Algorithms for the Construction and Analysis of Systems10.1007/978-3-030-45237-7_10(158-177)Online publication date: 17-Apr-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)Modular verification of heap reachability properties in separation logicProceedings of the ACM on Programming Languages10.1145/33605473:OOPSLA(1-28)Online publication date: 10-Oct-2019
  • (2018)Template-Based Verification of Heap-Manipulating Programs2018 Formal Methods in Computer Aided Design (FMCAD)10.23919/FMCAD.2018.8603009(1-9)Online publication date: Oct-2018
  • (2018)Safe replication through bounded concurrency verificationProceedings of the ACM on Programming Languages10.1145/32765342:OOPSLA(1-27)Online publication date: 24-Oct-2018
  • (2018)Deductive Verification in Decidable Fragments with IvyStatic Analysis10.1007/978-3-319-99725-4_4(43-55)Online publication date: 29-Aug-2018
  • Show More Cited By

View Options

Get Access

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