Abstract
Weakly-relational numeric constraints provide a compromise between complexity and expressivity that is adequate for several applications in the field of formal analysis and verification of software and hardware systems. We address the problems to be solved for the construction of full-fledged, efficient and provably correct abstract domains based on such constraints. We first propose to work with semantic abstract domains, whose elements are geometric shapes, instead of the (more concrete) syntactic abstract domains of constraint networks and matrices on which the previous proposals are based. This allows to solve, once and for all, the problem whereby closure by entailment, a crucial operation for the realization of such domains, seemed to impede the realization of proper widening operators. In our approach, the implementation of widenings relies on the availability of an effective reduction procedure for the considered constraint description: one for the domain of bounded difference shapes already exists in the literature; we provide algorithms for the significantly more complex cases of rational and integer octagonal shapes. We also improve upon the state-of-the-art by presenting, along with their proof of correctness, closure by entailment algorithms of reduced complexity for domains based on rational and integer octagonal constraints. The consequences of implementing weakly-relational numerical domains with floating point numbers are also discussed.
Similar content being viewed by others
References
Cousot P, Cousot R (1976) Static determination of dynamic properties of programs. In: Robinet B (ed) Proceedings of the Second International Symposium on Programming, Paris, France. Dunod, Paris, pp 106–130
Cousot P, Halbwachs N (1978) Automatic discovery of linear restraints among variables of a program. In: Conference Record of the Fifth Annual ACM Symposium on Principles of Programming Languages, Tucson, Arizona. ACM, New York, pp 84–96
Bagnara R (1997) Data-flow analysis for constraint logic-based languages. PhD thesis, Dipartimento di Informatica, Università di Pisa, Pisa, Italy. Printed as Report TD-1/97
Bagnara R, Giacobazzi R, Levi G (1992) Static analysis of CLP programs over numeric domains. In: Billaud M, Castéran P, Corsini M, Musumbu K, Rauzy A (eds) Actes “Workshop on Static Analysis’92”. Atelier Irisa, IRISA Campus de Beaulieu, Bordeaux. Bigre, vol 81–82, pp 43–50. Extended abstract
Bagnara R, Giacobazzi R, Levi G (1993) An application of constraint propagation to data-flow analysis. In: Proceedings of “The Ninth Conference on Artificial Intelligence for Applications”, Orlando, Florida. IEEE Computer Society Press, Los Alamitos, pp 270–276
Miné A (2001) A new numerical abstract domain based on difference-bound matrices. In: Danvy O, Filinski A (eds) Proceedings of the 2nd Symposium on Programs as Data Objects (PADO 2001), Aarhus, Denmark. Lecture notes in computer science, vol 2053. Springer, Berlin, pp 155–172
Shaham R, Kolodner EK, Sagiv S (2000) Automatic removal of array memory leaks in Java. In: Watt DA (ed) Proceedings of the 9th International Conference on Compiler Construction (CC 2000), Berlin, Germany. Lecture notes in computer science, vol 1781. Springer, Berlin, pp 50–66
Miné A (2001) The octagon abstract domain. In: Proceedings of the Eighth Working Conference on Reverse Engineering (WCRE’01), Stuttgart, Germany. IEEE Computer Society Press, Los Alamitos, pp 310–319
Simon A, King A, Howe JM (2002) Two variables per linear inequality as an abstract domain. In: Leuschel M (ed) Logic Based Program Synthesis and Transformation, 12th International Workshop, Madrid, Spain. Lecture notes in computer science, vol 2664. Springer, Berlin, pp 71–89
Clarisó R, Cortadella J (2004) The octahedron abstract domain. In: Giacobazzi R (ed) Static Analysis: Proceedings of the 11th International Symposium, Verona, Italy. Lecture notes in computer science, vol 3148. Springer, Berlin, pp 312–327
Sankaranarayanan S, Sipma HB, Manna Z (2005) Scalable analysis of linear systems using mathematical programming. In: Cousot R (ed) Verification, Model Checking and Abstract Interpretation: Proceedings of the 6th International Conference (VMCAI 2005), Paris, France. Lecture notes in computer science, vol 3385. Springer, Berlin, pp 25–41
Miné A (2002) A few graph-based relational numerical abstract domains. In: Hermenegildo MV, Puebla G (eds) Static Analysis: Proceedings of the 9th International Symposium, Madrid, Spain. Lecture notes in computer science, vol 2477. Springer, Berlin, pp 117–132
Jaffar J, Maher MJ, Stuckey PJ, Yap RHC (1994) Beyond finite domains. In: Borning A (ed) Principles and Practice of Constraint Programming: Proceedings of the Second International Workshop, Rosario, Orcas Island, Washington, USA. Lecture notes in computer science, vol 874. Springer, Berlin, pp 86–94
Lagarias JC (1985) The computational complexity of simultaneous Diophantine approximation problems. SIAM J Comput 14(1):196–209
Balasundaram V, Kennedy K (1989) A technique for summarizing data access and its use in parallelism enhancing transformations. In: Knobe B (ed) Proceedings of the ACM SIGPLAN’89 Conference on Programming Language Design and Implementation (PLDI), Portland, Oregon, USA. ACM SIGPLAN notices, vol 24(7). ACM, New York, pp 41–53
Ball T, Cook B, Lahiri SK, Zhang L (2004) Zapato: Automatic theorem proving for predicate abstraction refinement. In: Alur R, Peled D (eds) Computer Aided Verification: Proceedings of the 16th International Conference, Boston, MA, USA. Lecture notes in computer science, vol 3114. Springer, Berlin, pp 457–461
Cousot P, Cousot R, Feret J, Mauborgne L, Miné A, Monniaux D, Rival X (2005) The Astrée analyzer. In: Sagiv M (ed) Programming Languages and Systems, Proceedings of the 14th European Symposium on Programming, Edinburgh, UK. Lecture notes in computer science, vol 3444. Springer, Berlin, pp 21–30
Miné A (2005) Weakly relational numerical abstract domains. PhD thesis, École Polytechnique, Paris, France
Halbwachs N (1979) Détermination automatique de relations linéaires vérifiées par les variables d’un programme. Thèse de 3ème cycle d’informatique, Université scientifique et médicale de Grenoble, Grenoble, France
Bagnara R, Hill PM, Mazzi E, Zaffanella E (2005) Widening operators for weakly-relational numeric abstractions. In: Hankin C, Siveroni I (eds) Static Analysis: Proceedings of the 12th International Symposium, London, UK. Lecture notes in computer science, vol 3672. Springer, Berlin, pp 3–18
Bagnara R, Hill PM, Mazzi E, Zaffanella E (2005) Widening operators for weakly-relational numeric abstractions. Quaderno 399, Dipartimento di Matematica, Università di Parma, Italy. Available at http://www.cs.unipr.it/Publications/
Bagnara R, Hill PM, Zaffanella E (2008) An improved tight closure algorithm for integer octagonal constraints. In: Logozzo F, Peled D, Zuck L (eds) Verification, Model Checking and Abstract Interpretation: Proceedings of the 9th International Conference (VMCAI 2008), San Francisco, USA. Lecture notes in computer science, vol 4905. Springer, Berlin, pp 8–21
Birkhoff G (1967) Lattice theory, 3rd edn. Colloquium publications, vol XXV. American Mathematical Society, Providence
Cousot P, Cousot R (1977) Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings of the Fourth Annual ACM Symposium on Principles of Programming Languages. ACM, New York, pp 238–252
Cousot P, Cousot R (1979) Systematic design of program analysis frameworks. In: Proceedings of the Sixth Annual ACM Symposium on Principles of Programming Languages. ACM, New York, pp 269–282
Cormen TH, Leiserson TE, Rivest RL (1990) Introduction to algorithms. The MIT Press, Cambridge
Pratt VR (1977) Two easy theories whose combination is hard. Memo sent to Nelson and Oppen concerning a preprint of their paper [49]
Bellman R (1957) Dynamic programming. Princeton University Press, Princeton
Allen JF, Kautz HA (1985) A model of naive temporal reasoning. In: Hobbs JR, Moore R (eds) Formal theories of the commonsense world. Ablex, Norwood, pp 251–268
Davis E (1987) Constraint propagation with interval labels. Artif Intell 32(3):281–331
Dill DL (1989) Timing assumptions and verification of finite-state concurrent systems. In: Sifakis J (ed) Proceedings of the International Workshop on Automatic Verification Methods for Finite State Systems, Grenoble, France. Lecture notes in computer science, vol 407. Springer, Berlin, pp 197–212
Larsen K, Larsson F, Pettersson P, Yi W (1997) Efficient verification of real-time systems: Compact data structure and state-space reduction. In: Proceedings of the 18th IEEE Real-Time Systems Symposium (RTSS’97). IEEE Computer Society Press, Los Alamitos, pp 14–24
Bagnara R, Hill PM, Ricci E, Zaffanella E (2005) Precise widening operators for convex polyhedra. Sci Comput Program 58(1–2):28–56
Aho AV, Garey MR, Ullman JD (1972) The transitive reduction of a directed graph. SIAM J Comput 1(2):131–137
Halbwachs N, Proy YE, Raymond P (1994) Verification of linear hybrid systems by means of convex approximations. In: Le B (ed) Static Analysis: Proceedings of the 1st International Symposium, Namur, Belgium. Lecture notes in computer science, vol 864. Springer, Berlin, pp 223–237
Halbwachs N, Proy YE, Roumanoff P (1997) Verification of real-time systems using linear relation analysis. Form Methods Syst Des 11(2):157–185
Blanchet B, Cousot P, Cousot R, Feret J, Mauborgne L, Miné A, Monniaux D, Rival X (2002) Design and implementation of a special-purpose static program analyzer for safety-critical real-time embedded software. In: Mogensen TÆ, Schmidt DA, Sudborough IH (eds) The essence of computation, complexity, analysis, transformation. Lecture notes in computer science, vol 2566. Springer, Berlin, pp 85–108. Essays Dedicated to Neil D Jones [on occasion of his 60th birthday]
Blanchet B, Cousot P, Cousot R, Feret J, Mauborgne L, Miné A, Monniaux D, Rival X (2003) A static analyzer for large safety-critical software. In: Proceedings of the ACM SIGPLAN 2003 Conference on Programming Language Design and Implementation (PLDI’03). ACM, New York, pp 196–207
Miné A (2004) Relational abstract domains for the detection of floating-point run-time errors. In: Schmidt D (ed) Programming Languages and Systems: Proceedings of the 13th European Symposium on Programming, Barcelona, Spain. Lecture notes in computer science, vol 2986. Springer, Berlin, pp 3–17
Bagnara R, Hill PM, Zaffanella E (2008) The Parma Polyhedra Library: Toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems. Sci Comput Program 72(1–2):3–21
Bagnara R, Hill PM, Zaffanella E (2006) Widening operators for powerset domains. Softw Tools Technol Transf 8(4/5):449–466. In the printed version of this article, all the figures have been improperly printed (rendering them useless). See [50]
Miné A (2002) The Octagon Abstract Domain Library. Semantics and Abstract Interpretation Computer Science Lab., École Normale Supérieure, Paris, France, release 0.9.6 edn. Available at http://www.di.ens.fr/~mine/oct/
Venet A, Brat G (2004) Precise and efficient static array bound checking for large embedded C programs. In: Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation (PLDI’04). ACM, New York, pp 231–242
Harvey W, Stuckey PJ (1997) A unit two variable per inequality integer constraint solver for constraint logic programming. In Patel M (ed) ACSC’97: Proceedings of the 20th Australasian Computer Science Conference, vol 19. Australian Computer Science Communications, pp 102–111
Pugh W (1991) The Omega test: A fast and practical integer programming algorithm for dependence analysis. In Supercomputing 91
Seater R, Wonnacott D (2001) Polynomial time array dataflow analysis. In: Dietz HG (ed) Languages and Compilers for Parallel Computing, 14th International Workshop, Cumberland Falls, KY, USA. Lecture notes in computer science, vol 2624. Springer, Berlin, pp 411–426
Lahiri SK, Musuvathi M (2005) An efficient decision procedure for UTVPI constraints. In: Gramlich B (ed) Frontiers of Combining Systems: Proceedings of the 5th International Workshop, FroCoS 2005, Vienna, Austria. Lecture notes in artificial intelligence, vol 3717. Springer, Berlin, pp 168–183
Miné A (2006) The octagon abstract domain. Higher-Order Symb Comput 19(1):31–100
Nelson G, Oppen DC (1977) Fast decision algorithms based on Union and Find. In: Proceedings of the 18th Annual Symposium on Foundations of Computer Science (FOCS’77). IEEE Computer Society Press, Providence, pp 114–119. The journal version of this paper is [51]
Bagnara R, Hill PM, Zaffanella E (2007) Widening operators for powerset domains. Softw Tools Technol Transf 9(3/4):413–414. Erratum to [41] containing all the figures properly printed
Nelson G, Oppen DC (1980) Fast decision procedures based on congruence closure. J ACM 27(2):356–364. An earlier version of this paper is [49]
Author information
Authors and Affiliations
Corresponding author
Additional information
This work has been partly supported by MURST projects “Constraint Based Verification of Reactive Systems” and “AIDA—Abstract Interpretation: Design and Applications,” and by a Royal Society (UK) International Joint Project (ESEP) award.
Rights and permissions
About this article
Cite this article
Bagnara, R., Hill, P.M. & Zaffanella, E. Weakly-relational shapes for numeric abstractions: improved algorithms and proofs of correctness. Form Methods Syst Des 35, 279–323 (2009). https://doi.org/10.1007/s10703-009-0073-1
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10703-009-0073-1