skip to main content
research-article

Modular reasoning about heap paths via effectively propositional formulas

Published:08 January 2014Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C. Barrett, A. Stump, , and C. Tinelli. SMTLIB: Satisfiability Modulo Theories Library, 2013. http://smtlib.cs.uiowa.edu/docs.html.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. G. Dong and J. Su. Incremental and decremental evaluation of transitive closure by first-order queries. Inf. & Comput., 120:101--106, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. A. Gotsman, J. Berdine, and B. Cook. Interprocedural shape analysis with separated heap abstractions. In SAS, pages 240--260, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. W. Hesse. Dynamic Computational Complexity. PhD thesis, UMass in Computer Science, June 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. N. Immerman. Descriptive complexity. Graduate texts in computer science. Springer, 1999.Google ScholarGoogle Scholar
  9. S. S. Ishtiaq and P. W. O'Hearn. Bi as an assertion language for mutable data structures. In POPL, pages 14--26, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  13. S. K. Lahiri and S. Qadeer. Back to the future: revisiting precise program verification using smt solvers. In POPL, pages 171--182, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. P. Madhusudan, G. Parlato, and X. Qiu. Decidable logics combining heap structures and data. In POPL, pages 611--622. ACM, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. N. Mitchell, E. Schonberg, and G. Sevitsky. Making sense of large heaps. In ECOOP, pages 77--97, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. A. Møller and M. I. Schwartzbach. The pointer assertion logic engine. In PLDI, pages 221--231. ACM, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. R. Piskac, T.Wies, and D. Zufferey. Automating separation logic using smt. In CAV, pages 773--789, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. T. W. Reps, S. Sagiv, and G. Yorsh. Symbolic implementation of the best transformer. In VMCAI, pages 252--266, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. N. Rinetzky, M. Sagiv, and E. Yahav. Interprocedural shape analysis for cutpoint-free programs. In SAS, pages 284--302, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. X. Rival and B.-Y. E. Chang. Calling context abstraction with shapes. In POPL, pages 173--186, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. R. E. Tarjan. Efficiency of a good but not linear set union algorithm. Journal of the ACM, 22(2):215--225, 1975. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J. Wing. The CMU Larch Project. 1995. URL http://www.cs.cmu.edu/afs/cs/project/larch/www/home.html.Google ScholarGoogle Scholar
  26. G. Winskel. The Formal Semantics of Programming Languages: An Introduction. Foundations of Computing Series. Zone Books, U.S., 1993. ISBN 9780262731034. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle ScholarCross RefCross Ref
  29. K. Zee, V. Kuncak, and M. C. Rinard. Full functional verification of linked data structures. In PLDI, pages 349--361, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Modular reasoning about heap paths via effectively propositional formulas

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • 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

        Copyright © 2014 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 8 January 2014

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!