skip to main content
research-article

Inductive invariant generation via abductive inference

Published:29 October 2013Publication History
Skip Abstract Section

Abstract

This paper presents a new method for generating inductive loop invariants that are expressible as boolean combinations of linear integer constraints. The key idea underlying our technique is to perform a backtracking search that combines Hoare-style verification condition generation with a logical abduction procedure based on quantifier elimination to speculate candidate invariants. Starting with true, our method iteratively strengthens loop invariants until they are inductive and strong enough to verify the program. A key feature of our technique is that it is lazy: It only infers those invariants that are necessary for verifying program correctness. Furthermore, our technique can infer arbitrary boolean combinations (including disjunctions) of linear invariants. We have implemented the proposed approach in a tool called HOLA. Our experiments demonstrate that HOLA can infer interesting invariants that are beyond the reach of existing state-of-the-art invariant generation tools.

References

  1. Cousot, P., Halbwachs, N.: Automatic Discovery of Linear Restraints among Variables of a Program. In: POPL, ACM (1978) 84--96. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Miné, A.: The octagon abstract domain. Higher-Order and Symbolic Computation 19(1) (2006) 31--100. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Cousot, P., Cousot, R.: Systematic design of program analysis frameworks. In: POPL, ACM (1979) 269--282. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Karr, M.: Affine relationships among variables of a program. A. I. (1976) 133--151.Google ScholarGoogle Scholar
  5. Gupta, A., Rybalchenko, A.: Invgen: An efficient invariant generator. In: Computer Aided Verification, Springer (2009) 634--640. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Colón, M., Sankaranarayanan, S., Sipma, H.: Linear invariant generation using non-linear constraint solving. In: Computer Aided Verification, Springer (2003) 420--432.Google ScholarGoogle Scholar
  7. Henzinger, T., Jhala, R., Majumdar, R., Sutre, G.: Software verification with BLAST. In: International conference on Model checking software. (2003) 235--239. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Ball, T., Rajamani, S.: The slam toolkit. In: Computer aided verification, Springer (2001) 260--264. Google ScholarGoogle Scholar
  9. McMillan, K.: Lazy annotation for program testing and verification. In: Computer Aided Verification, Springer (2010) 104--118. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Henzinger, T., Jhala, R., Majumdar, R., McMillan, K.: Abstractions from proofs. ACM SIGPLAN Notices 39(1) (2004) 232--244. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. McMillan, K.: Interpolation and sat-based model checking. In: Computer Aided Verification, Springer (2003) 1--13.Google ScholarGoogle ScholarCross RefCross Ref
  12. Flanagan, C., Leino, K. R. M., Lillibridge, M., Nelson, G., Saxe, J. B., Stata, R.: Extended static checking for java. In: Proceedings of the ACM SIGPLAN 2002 Conference on Programming language design and implementation. PLDI '02, New York, NY, USA, ACM (2002) 234--245. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Leino, K.: Dafny: An automatic program verifier for functional correctness. In: Logic for Programming, Artificial Intelligence, and Reasoning, Springer (2010) 348--370. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Barnett, M., yuh Evan Chang, B., Deline, R., Jacobs, B., Leino, K. R.: Boogie: A modular reusable verifier for object-oriented programs. In: Formal Methods for Components and Objects: 4th International Symposium, FMCO 2005, volume 4111 of Lecture Notes in Computer Science, Springer (2006) 364--387. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Peirce, C.: Collected papers of Charles Sanders Peirce. Belknap Press (1932).Google ScholarGoogle Scholar
  16. Dillig, I., Dillig, T., McMillan, K., Aiken, A.: Minimum satisfying assignments for SMT, CAV (2012). Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Cooper, D.: Theorem proving in arithmetic without multiplication. Machine Intelligence 7(91-99) (1972) 300.Google ScholarGoogle Scholar
  18. Dillig, I., Dillig, T., Aiken, A.: SAIL: Static Analysis Intermediate Language. Stanford University Technical Report.Google ScholarGoogle Scholar
  19. Dillig, I., Dillig, T., Aiken, A.: Small formulas for large programs: On-line constraint simplification in scalable static analysis. SAS (2011). Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Dillig, I., Dillig, T., Aiken, A.: Cuts from Proofs: A Complete and Practical Technique for Solving Linear Inequalities over Integers. In: CAV. (2009). Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Jeannet, B.: Interproc analyzer for recursive programs with numerical variables. http://pop-art.inrialpes.fr/interproc/interprocweb.cgi.Google ScholarGoogle Scholar
  22. Bradley, A.: Understanding IC3. Theory and Applications of Satisfiability Testing - SAT 2012 (2012) 1--14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Gulwani, S., Srivastava, S., Venkatesan, R.: Program analysis as constraint solving. In: PLDI. Volume 43., ACM (2008) 281--292. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Jhala, R., McMillan, K.: A practical and complete approach to predicate refinement. Tools and Algorithms for the Construction and Analysis of Systems (2006) 459--473. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Sharma, R., Nori, A., Aiken, A.: Interpolants as classifiers. In: Computer Aided Verification, Springer (2012) 71--87. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Gulavani, B., Rajamani, S.: Counterexample driven refinement for abstract interpretation. Tools and Algorithms for the Construction and Analysis of Systems (2006) 474--488. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Gulwani, S., Jojic, N.: Program verification as probabilistic inference. In: ACM SIGPLAN Notices. Volume 42., ACM (2007) 277--289. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Gulavani, B., Chakraborty, S., Nori, A., Rajamani, S.: Automatically refining abstract interpretations. TACAS (2008) 443--458. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Beyer, D., Henzinger, T. A., Majumdar, R., Rybalchenko, A.: Path invariants. In: Proceedings of the 2007 ACM SIGPLAN conference on Programming language design and implementation. PLDI '07, New York, NY, USA, ACM (2007) 300--309. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Bradley, A. R., Manna, Z.: Property-directed incremental invariant generation. Form. Asp. Comput. 20(4-5) (June 2008) 379--405. Google ScholarGoogle ScholarCross RefCross Ref
  31. Gulavani, B. S., Henzinger, T. A., Kannan, Y., Nori, A. V., Rajamani, S. K.: Synergy: a new algorithm for property checking. In: Proceedings of the 14th ACM SIGSOFT international symposium on Foundations of software engineering. SIGSOFT '06/FSE-14, New York, NY, USA, ACM (2006) 117--127. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. http://pub.ist.ac.at/agupta/invgen/: InvGen tool.Google ScholarGoogle Scholar
  33. http://www.nec-labs.com/research/system/systems_SAV-website/benchmarks.php: NECLABS NECLA verification benchmarks.Google ScholarGoogle Scholar
  34. Laviron, V., Logozzo, F.: Subpolyhedra: A (more) scalable approach to infer linear inequalities. In: Verification, Model Checking, and Abstract Interpretation, Springer (2009) 229--244. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Clarke, E., Grumberg, O., Jha, S., Lu, Y., Veith, H.: Counterexample-guided abstraction refinement for symbolic model checking. J. ACM 50(5) (September 2003) 752--794. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Gulwani, S., Srivastava, S., Venkatesan, R.: Constraint-based invariant inference over predicate abstraction. In: Verification, Model Checking, and Abstract Interpretation, Springer (2009) 120--135. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Flanagan, C., Leino, K.: Houdini, an annotation assistant for esc/java. FME 2001: Formal Methods for Increasing Software Productivity (2001) 500--517. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. Ernst, M., Perkins, J., Guo, P., McCamant, S., Pacheco, C., Tschantz, M., Xiao, C.: The Daikon system for dynamic detection of likely invariants. Science of Computer Programming 69(1-3) (2007) 35--45. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. McMillan, K.: Lazy abstraction with interpolants. In: Computer Aided Verification, Springer (2006) 123--136. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Păsăreanu, C. S., Visser, W.: Verification of java programs using symbolic execution and invariant generation. In: SPIN Workshop on Model Checking Software. Springer (2004) 164--181.Google ScholarGoogle Scholar
  41. Bradley, A.: Sat-based model checking without unrolling. In: Verification, Model Checking, and Abstract Interpretation, Springer (2011) 70--87. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Somenzi, F., Bradley, A.: IC3: where monolithic and incremental meet. In: Proceedings of the International Conference on Formal Methods in Computer-Aided Design, FMCAD Inc (2011) 3--8. Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Calcagno, C., Distefano, D., O'Hearn, P., Yang, H.: Compositional shape analysis by means of bi-abduction. POPL 44(1) (2009) 289--300. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Giacobazzi, R.: Abductive analysis of modular logic programs. In: Proceedings of the 1994 International Symposium on Logic programming, Citeseer (1994) 377--391. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Gulwani, S., McCloskey, B., Tiwari, A.: Lifting abstract interpreters to quantified logical domains. In: POPL, ACM (2008) 235--246. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Calcagno, C., Distefano, D., Vafeiadis, V.: Bi-abductive resource invariant synthesis. In: Proceedings of the 7th Asian Symposium on Programming Languages and Systems. APLAS '09, Berlin, Heidelberg, Springer-Verlag (2009) 259--274. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. Dillig, I., Dillig, T., Aiken, A.: Automated error diagnosis using abductive inference. In: Proceedings of the 33rd ACM SIGPLAN conference on Programming Language Design and Implementation. PLDI '12, New York, NY, USA, ACM (2012) 181--192. Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. Li, B., Dillig, I., Dillig, T.,McMillan, K., Sagiv, M.: Synthesis of circular compositional program proofs via abduction. In: Proceedings of the 19th international conference on Tools and Algorithms for the Construction and Analysis of Systems. TACAS'13, Springer-Verlag (2013) 370--384. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Gulwani, S., Musuvathi, M.: Cover Algorithms. In: ESOP. (2008) 193--207. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Inductive invariant generation via abductive inference

      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 48, Issue 10
        OOPSLA '13
        October 2013
        867 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/2544173
        Issue’s Table of Contents
        • cover image ACM Conferences
          OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications
          October 2013
          904 pages
          ISBN:9781450323741
          DOI:10.1145/2509136

        Copyright © 2013 ACM

        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: 29 October 2013

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader