Advertisement

An Algorithm Inspired by Constraint Solvers to Infer Inductive Invariants in Numeric Programs

  • Antoine Miné
  • Jason Breck
  • Thomas Reps
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9632)

Abstract

This paper addresses the problem of proving a given invariance property \(\varphi \) of a loop in a numeric program, by inferring automatically a stronger inductive invariant \(\psi \). The algorithm we present is based on both abstract interpretation and constraint solving. As in abstract interpretation, it computes the effect of a loop using a numeric abstract domain. As in constraint satisfaction, it works from “above”—interactively splitting and tightening a collection of abstract elements until an inductive invariant is found. Our experiments show that the algorithm can find non-linear inductive invariants that cannot normally be obtained using intervals (or octagons), even when classic techniques for increasing abstract-interpretation precision are employed—such as increasing and decreasing iterations with extrapolation, partitioning, and disjunctive completion. The advantage of our work is that because the algorithm uses standard abstract domains, it sidesteps the need to develop complex, non-standard domains specialized for solving a particular problem.

Keywords

Constraint Programming Loop Iteration Abstract Interpretation Constraint Solver Abstract Domain 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. 1.
    Adjé, A., Gaubert, S., Goubault, E.: Coupling policy iteration with semi-definite relaxation to compute accurate numerical invariants in static analysis. In: Gordon, A.D. (ed.) ESOP 2010. LNCS, vol. 6012, pp. 23–42. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  2. 2.
    Apt, K.R.: The essence of constraint propagation. Theor. Comput. Sci. 221(1–2), 179–210 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Benhamou, F., Goualard, F., Granvilliers, L., Puget, J.-F.: Revisiting hull and box consistency. In: ICLP 1999, pp. 230–244 (1999)Google Scholar
  4. 4.
    Bertrane, J., Cousot, P., Cousot, R., Feret, J., Mauborgne, L., Miné, A., Rival, X.: Static analysis and verification of aerospace software by abstract interpretation. In: AIAA Infotech\(@\)Aerospace, number –3385 in AIAA, pp. 1–38. AIAA (2010)Google Scholar
  5. 5.
    Bradley, A.R.: SAT-based model checking without unrolling. In: Jhala, R., Schmidt, D. (eds.) VMCAI 2011. LNCS, vol. 6538, pp. 70–87. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  6. 6.
    Clarke, E.M., Grumberg, O., Jha, S., Lu, Y., Veith, H.: Counterexample-guided abstraction refinement. In: Emerson, E.A., Sistla, A.P. (eds.) CAV 2000. LNCS, vol. 1855, pp. 154–169. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  7. 7.
    Colón, M.A., Sankaranarayanan, S., Sipma, H.B.: Linear invariant generation using non-linear constraint solving. In: Hunt Jr., W.A., Somenzi, F. (eds.) CAV 2003. LNCS, vol. 2725, pp. 420–432. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  8. 8.
    Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL 1977, pp. 238–252. ACM, January 1977Google Scholar
  9. 9.
    Das, S., Dill, D.L., Park, S.: Experience with predicate abstraction. In: Halbwachs, N., Peled, D.A. (eds.) CAV 1999. LNCS, vol. 1633, pp. 160–171. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  10. 10.
    D’Silva, V., Haller, L., Kroening, D.: Satisfiability solvers are static analysers. In: Miné, A., Schmidt, D. (eds.) SAS 2012. LNCS, vol. 7460, pp. 317–333. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  11. 11.
    D’Silva, V., Haller, L., Kroening, D., Tautschnig, M.: Numeric bounds analysis with conflict-driven learning. In: Flanagan, C., König, B. (eds.) TACAS 2012. LNCS, vol. 7214, pp. 48–63. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  12. 12.
    Feret, J.: Static analysis of digital filters. In: Schmidt, D. (ed.) ESOP 2004. LNCS, vol. 2986, pp. 33–48. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  13. 13.
    Garg, P., Löding, C., Madhusudan, P., Neider, D.: ICE: a robust framework for learning invariants. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 69–87. Springer, Heidelberg (2014)Google Scholar
  14. 14.
    Garoche, P.-L., Kahsai, T., Tinelli, C.: Incremental invariant generation using logic-based automatic abstract transformers. In: Brat, G., Rungta, N., Venet, A. (eds.) NFM 2013. LNCS, vol. 7871, pp. 139–154. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  15. 15.
    Granger, P.: Improving the results of static analyses of programs by local decreasing iterations. In: Shyamasundar, R.K. (ed.) FSTTCS 1992. LNCS, vol. 652, pp. 68–79. Springer, Heidelberg (1992)CrossRefGoogle Scholar
  16. 16.
    Gulwani, S., Srivastava, S., Venkatesan, R.: Program analysis as constraint solving. In: PLDI 2008, pp. 281–292. ACM (2008)Google Scholar
  17. 17.
    Itzhaky, S., Bjørner, N., Reps, T., Sagiv, M., Thakur, A.: Property-directed shape analysis. In: Biere, A., Bloem, R. (eds.) CAV 2014. LNCS, vol. 8559, pp. 35–51. Springer, Heidelberg (2014)Google Scholar
  18. 18.
    Jeannet, B., Miné, A.: Apron: A Library of Numerical Abstract Domains for Static Analysis. In: Bouajjani, A., Maler, O. (eds.) CAV 2009. LNCS, vol. 5643, pp. 661–667. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  19. 19.
    Miné, A.: Relational abstract domains for the detection of floating-point run-time errors. In: Schmidt, D. (ed.) ESOP 2004. LNCS, vol. 2986, pp. 3–17. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  20. 20.
    Miné, A.: The octagon abstract domain. High. Order Symbolic Comput. 19(1), 31–100 (2006)CrossRefzbMATHGoogle Scholar
  21. 21.
    Miné, A., Breck, J., Reps, T.: An algorithm inspired by constraint solvers to infer inductive invariants in numeric programs. TR 1829, CS Dept., Univ. of Wisconsin, Madison, WI, January 2016Google Scholar
  22. 22.
    Montanari, U.: Networks of constraints: fundamental properties and applications to picture processing. Inf. Sci. 7(2), 95–132 (1974)MathSciNetCrossRefzbMATHGoogle Scholar
  23. 23.
    Moore, R.E.: Interval Analysis. Prentice Hall, Englewood Cliffs (1966)zbMATHGoogle Scholar
  24. 24.
    Pelleau, M., Miné, A., Truchet, C., Benhamou, F.: A constraint solver based on abstract domains. In: Giacobazzi, R., Berdine, J., Mastroeni, I. (eds.) VMCAI 2013. LNCS, vol. 7737, pp. 434–454. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  25. 25.
    Ponsini, O., Michel, C., Rueher, M.: Combining constraint programming and abstract interpretation for value analysis of floating-point programs. In: CSTVA 2012, pp. 775–776 (2012)Google Scholar
  26. 26.
    Roux, P., Garoche, P.-L.: Practical policy iterations - a practical use of policy iterations for static analysis: the quadratic case. FMSD 46(2), 163–196 (2015)zbMATHGoogle Scholar
  27. 27.
    Saïdi, H., Shankar, N.: Abstract and model check while you prove. In: Halbwachs, N., Peled, D.A. (eds.) CAV 1999. LNCS, vol. 1633, pp. 443–454. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  28. 28.
    Sankaranarayanan, S., Sipma, H.B., Manna, Z.: Constraint-based linear-relations analysis. In: Giacobazzi, R. (ed.) SAS 2004. LNCS, vol. 3148, pp. 53–68. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  29. 29.
    Tarski, A.: A lattice theoretical fixpoint theorem and its applications. Pac. J. Math. 5, 285–310 (1955)MathSciNetCrossRefzbMATHGoogle Scholar
  30. 30.
    Thakur, A., Lal, A., Lim, J., Reps, T.: PostHat and all that: Automating abstract interpretation. ENTCS 311, 15–32 (2015)MathSciNetGoogle Scholar
  31. 31.
    Thakur, A., Reps, T.: A generalization of stålmarck’s method. In: Miné, A., Schmidt, D. (eds.) SAS 2012. LNCS, vol. 7460, pp. 334–351. Springer, Heidelberg (2012)CrossRefGoogle Scholar
  32. 32.
    Xie, Y., Aiken, A.: Saturn: a SAT-based tool for bug detection. In: Etessami, K., Rajamani, S.K. (eds.) CAV 2005. LNCS, vol. 3576, pp. 139–143. Springer, Heidelberg (2005)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2016

Authors and Affiliations

  1. 1.Sorbonne Universités, UPMC Univ Paris 06, CNRS, LIP6ParisFrance
  2. 2.University of WisconsinMadisonUSA
  3. 3.GrammaTech, Inc.IthacaUSA

Personalised recommendations