skip to main content
research-article

Predicate abstraction of Java programs with collections

Published:19 October 2012Publication History
Skip Abstract Section

Abstract

Our goal is to develop precise and scalable verification techniques for Java programs that use collections and properties that depend on their content. We apply the popular approach of predicate abstraction to Java programs and collections. The main challenge in this context is precise and compact modeling of collections that enables practical verification. We define a predicate language for modeling the observable state of Java collections at the interface level. Changes of the state by API methods are captured by weakest preconditions. We adapt existing techniques for construction of abstract programs. Most notably, we designed optimizations based on specific features of the predicate language. We evaluated our approach on Java programs that use collections in advanced ways. Our results show that interesting properties, such as consistency between multiple collections, can be verified using our approach. The properties are specified using logic formulas that involve predicates introduced by our language.

References

  1. T. Ball, E. Bounimova, B. Cook, V. Levin, J. Lichtenberg, C. McGarvey, B. Ondrusek, S.K. Rajamani, and A. Ustuner. Thorough Static Analysis of Device Drivers. In Proceedings of EuroSys 2006, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. T. Ball, R. Majumdar, T. Millstein, and S.K. Rajamani. Automatic Predicate Abstraction of C Programs. In Proceedings of PLDI 2001, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. T. Ball, A. Podelski, and S.K. Rajamani. Boolean and Cartesian Abstraction for Model Checking C Programs. In TACAS 2001, LNCS, vol. 2031. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Barnett, B.-Y. E. Chang, R. DeLine, B. Jacobs, and R. Leino. Boogie: A Modular Reusable Verifier for Object-Oriented Programs. In FMCO 2005, LNCS, vol. 4111. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Barnett, R. Leino, and W. Schulte. The Spec# Programming System: An Overview. In CASSIS 2004, LNCS, vol. 3362. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 2007, LNCS, vol. 4590. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. J. Bingham and Z. Rakamaric. A Logic and Decision Procedure for Predicate Abstraction of Heap-Manipulating Programs. In VMCAI 2006, LNCS, vol. 3855. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. N. Blanc, A. Groce, and D. Kroening. Verifying C+ with STL Containers via Predicate Abstraction. In ASE 2007, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Bouajjani, M. Bozga, P. Habermehl, R. Iosif, P. Moro, and T. Vojnar. Programs with Lists Are Counter Automata. In CAV 2006, LNCS, vol. 4144. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. A. Bouajjani, C. Dragoi, C. Enea, A. Rezine and M. Sighireanu. Invariant Synthesis for Programs Manipulating Lists with Unbounded Data. In CAV 2010, LNCS, vol. 6174. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Boyapati, S. Khurshid, and D. Marinov. Korat: Automated Testing Based on Java Predicates, In ISSTA 2002, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. A.R. Bradley, Z. Manna, and H.B. Sipma. What's Decidable About Arrays?. In VMCAI 2006, LNCS, vol. 3855. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. Chandra, S.J. Fink, and M. Sridharan. Snugglebug: A Powerful Approach to Weakest Preconditions. In PLDI 2009, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. E.M. Clarke, O. Grumberg, S. Jha, Y. Lu, and H. Veith. Counterexample-Guided Abstraction Refinement, In CAV 2000, LNCS, vol. 1855. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. D. Cok and J. Kiniry. ESC/Java2: Uniting ESC/Java and JML, In CASSIS 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. D. Dams and K. Namjoshi. Shape Analysis through Predicate Abstraction and Model Checking. In Proceedings of VMCAI 2003, LNCS, vol. 2575. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. I. Dillig, T. Dillig, and A. Aiken. Precise Reasoning for Programs Using Containers. In Proceedings of POPL 2011, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. D. Distefano and M. Parkinson. jStar: Towards Practical Verification for Java. In Proceedings of OOPSLA 2008, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. C. Flanagan, R. Leino, M. Lillibridge, G. Nelson, J.B. Saxe, and R. Stata. Extended Static Checking for Java, In Proceedings of PLDI 2002, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. C.A. Furia. What's Decidable about Sequences?. In ATVA 2010, LNCS, vol. 6252. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. S. Graf and H. Saïdi. Construction of Abstract State Graphs with PVS. In Proceedings of CAV 1997, LNCS, vol. 1254. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. M. Heizmann, J. Hoenicke, and A. Podelski. Nested interpolants. In POPL 2010, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. T.A. Henzinger, R. Jhala, R. Majumdar, and G. Sutre. Lazy Abstraction. In Proceedings of POPL 2002, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. D. Kapur, R. Majumdar, and C.G. Zarba. Interpolation for Data Structures. In Proceedings of FSE 2006, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. S. Khurshid, C.S. Pasareanu, and W. Visser. Generalized Symbolic Execution for Model Checking and Testing. In TACAS 2003, LNCS, vol. 2619. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. S. Khurshid and Y.L. Suen. Generalizing Symbolic Execution to Library Classes. In Proceedings of PASTE 2005, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. V. Kuncak, R. Piskac, P. Suter, and T. Wies. Building a Calculus of Data Structures. In VMCAI 2010, LNCS, vol. 5944. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. S.K. Lahiri and S. Qadeer. Verifying Properties of Well-Founded Linked Lists. In Proceedings of POPL 2006, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. S.K. Lahiri and S. Qadeer. Back to the Future: Revisiting Precise Program Verification Using SMT Solvers. In Proceedings of POPL 2008, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. G. Leavens, A. Baker, and C. Ruby. Preliminary Design of JML: A Behavioral Interface Specification Language for Java. ACM SIGSOFT Software Engineering Notes, 31(3), 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. R. Leino. Dafny: An Automatic Program Verifier for Functional Correctness. In LPAR 2010, LNAI, vol. 6355. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. R. Madhavan and R. Komondoor. Null Dereference Verification via Over-approximated Weakest Pre-conditions Analysis. In OOPSLA 2011, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. P. Madhusudan, G. Parlato, and X. Qiu. Decidable Logics Combining Heap Structures and Data. In POPL 2011, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. J. McCarthy. A Basis for a Mathematical Theory of Computation, Technical report, MIT, Cambridge, MA, USA, 1962. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. K. McMillan. Lazy Abstraction with Interpolants. In CAV 2006, LNCS, vol. 4144. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. L. de Moura and N. Bjorner. Z3: An Efficient SMT Solver. In Proceedings of TACAS 2008, LNCS, vol. 4963. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. A. Podelski and T. Wies. Boolean Heaps. In SAS 2005, LNCS, vol. 3672. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. S. Ranise and C. Tinelli. The SMT-LIB standard, version 1.2, August 2006.Google ScholarGoogle Scholar
  39. W. Visser, C.S. Pasareanu, and S. Khurshid. Test Input Generation with Java PathFinder, In ISSTA 2004, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. K. Zee, V. Kuncak, and M. Rinard. Full Functional Verification of Linked Data Structures. In PLDI 2008, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. K. Zee, V. Kuncak, and M. Rinard. An Integrated Proof Language for Imperative Programs. In PLDI 2009, ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. ASM: Java bytecode manipulation and analysis framework. http://asm.ow2.org/.Google ScholarGoogle Scholar
  43. J2BP tool for predicate abstraction of Java programs. http://plg.uwaterloo.ca/~pparizek/j2bp/.Google ScholarGoogle Scholar
  44. Java Pathfinder system for verification of Java programs. http://babelfish.arc.nasa.gov/trac/jpf/.Google ScholarGoogle Scholar
  45. SMT-LIB Format for Finite Lists, Sets, and Maps. http://www.cprover.org/SMT-LIB-LSM/.Google ScholarGoogle Scholar
  46. T.J. Watson Libraries for Analysis (WALA). http://wala.sourceforge.net/.Google ScholarGoogle Scholar
  47. Yices: An SMT solver. http://yices.csl.sri.com/.Google ScholarGoogle Scholar

Index Terms

  1. Predicate abstraction of Java programs with collections

              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 47, Issue 10
                OOPSLA '12
                October 2012
                1011 pages
                ISSN:0362-1340
                EISSN:1558-1160
                DOI:10.1145/2398857
                Issue’s Table of Contents
                • cover image ACM Conferences
                  OOPSLA '12: Proceedings of the ACM international conference on Object oriented programming systems languages and applications
                  October 2012
                  1052 pages
                  ISBN:9781450315616
                  DOI:10.1145/2384616

                Copyright © 2012 ACM

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 19 October 2012

                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!