Abstract

We present abstract acceleration techniques for computing loop invariants for numerical programs with linear assignments and conditionals. Whereas abstract interpretation techniques typically over-approximate the set of reachable states iteratively, abstract acceleration captures the effect of the loop with a single, non-iterative transfer function applied to the initial states at the loop head. In contrast to previous acceleration techniques, our approach applies to any linear loop without restrictions. Its novelty lies in the use of the Jordan normal form decomposition of the loop body to derive symbolic expressions for the entries of the matrix modeling the effect of η ≥ Ο iterations of the loop. The entries of such a matrix depend on η through complex polynomial, exponential and trigonometric functions. Therefore, we introduces an abstract domain for matrices that captures the linear inequality relations between these complex expressions. This results in an abstract matrix for describing the fixpoint semantics of the loop.
Our approach integrates smoothly into standard abstract interpreters and can handle programs with nested loops and loops containing conditional branches. We evaluate it over small but complex loops that are commonly found in control software, comparing it with other tools for computing linear loop invariants. The loops in our benchmarks typically exhibit polynomial, exponential and oscillatory behaviors that present challenges to existing approaches. Our approach finds non-trivial invariants to prove useful bounds on the values of variables for such loops, clearly outperforming the existing approaches in terms of precision while exhibiting good performance.
Supplemental Material
- C. Alias, A. Darte, P. Feautrier, and L. Gonnord. Multi-dimensional rankings, program termination, and complexity bounds of flowchart programs. In SAS, volume 6337 of LNCS, pages 117--133, 2010. Google Scholar
Digital Library
- C. Ancourt, F. Coelho, and F. Irigoin. A modular static analysis approach to affine loop invariants detection. In NSAD, volume 267 of ENTCS, pages 3--16. Elsevier, 2010. Google Scholar
Digital Library
- S. Bardin, A. Finkel, J. Leroux, and L. Petrucci. Fast: acceleration from theory to practice. STTT, 10(5):401--424, 2008. Google Scholar
Digital Library
- B. Blanchet, P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, D. Monniaux, and X. Rival. A static analyzer for large safety-critical software. In PLDI, pages 196--207. ACM, 2003. Google Scholar
Digital Library
- B. Boigelot and P. Godefroid. Symbolic verification of communication protocols with infinite state spaces using QDDs. In CAV, volume 1102 of LNCS, July 1996. Google Scholar
Digital Library
- L. Chen, A. Miné, J. Wang, and P. Cousot. An abstract domain to discover interval linear equalities. In VMCAI, volume 5944 of LNCS, 2010. Google Scholar
Digital Library
- M. Colón, S. Sankaranarayanan, and H. Sipma. Linear invariant generation using non-linear constraint solving. In Computer Aided Verification, CAV'03, volume 2725, 2003.Google Scholar
Cross Ref
- P. Cousot and N. Halbwachs. Automatic discovery of linear restraints among variables of a program. In Symposium on Principles of programming languages, POPL'78, pages 84--96, 1978. Google Scholar
Digital Library
- P. Cousot and N. Halbwachs. Automatic discovery of linear restraints among the variables of a program. In POPL, pages 84--97, 1978. Google Scholar
Digital Library
- P. Cousot, R. Cousot, J. Feret, L. Mauborgne, A. Miné, and X. Rival. Why does Astrée scale up? FMSD, 35(3), 2009. Google Scholar
Digital Library
- P. Feautrier and L. Gonnord. Accelerated invariant generation for C programs with Aspic and C2fsm. ENTCS, 267(2):3--13, 2010. Google Scholar
Digital Library
- J. Feret. Static analysis of digital filters. In ESOP, volume 2986 of LNCS, pages 33--48, 2004.Google Scholar
- J. Feret. Numerical abstract domains for digital filters. In Numerical and Symbolic Abstract Domains, 2005.Google Scholar
- A. Finkel and J. Leroux. How to compose Presburger-accelerations: Applications to broadcast protocols. In FSTTCS, volume 2556 of LNCS, pages 145--156, 2002. Google Scholar
Digital Library
- S. Gaubert, E. Goubault, A. Taly, and S. Zennou. Static analysis by policy iteration on relational domains. In ESOP, volume 4421 of LNCS, 2007. Google Scholar
Digital Library
- T. M. Gawlitza and H. Seidl. Precise relational invariants through strategy iteration. In Computer Science Logic, volume 4646 of LNCS, pages 23--40. Springer, 2007. Google Scholar
Digital Library
- T. M. Gawlitza, H. Seidl, A. Adjé, S. Gaubert, and É. Goubault. Abstract interpretation meets convex optimization. Journal of Symbolic Computation, 47(12):1512--1532, 2012. Google Scholar
Digital Library
- L. Gonnord and N. Halbwachs. Combining widening and acceleration in linear relation analysis. In SAS, volume 4218 of LNCS, 2006. Google Scholar
Digital Library
- A. Gupta and A. Rybalchenko. InvGen: an efficient invariant generator. In CAV, volume 5643 of LNCS, pages 634--640, 2009. Google Scholar
Digital Library
- J. M. Howe and A. King. Logahedra: A new weakly relational domain. In Automated Technology for Verification and Analysis, ATVA'09, volume 5799 of LNCS, pages 306--320. Springer, 2009. Google Scholar
Digital Library
- B. Jeannet and A. Miné. APRON: A library of numerical abstract domains for static analysis. In CAV, volume 5643 of LNCS, pages 661--667, 2009. http://apron.cri.ensmp.fr/library/. Google Scholar
Digital Library
- B. Jeannet, M. Argoud, and G. Lalire. The INTERPROC interprocedural analyzer. http://pop-art.inrialpes.fr/interproc/interprocweb.cgi.Google Scholar
- B. Jeannet, P. Schrammel, and S. Sankaranarayanan. Abstract acceleration of general linear loops. CoRR, abs/1311.768, 2013. Google Scholar
Digital Library
- J. B. Kam and J. D. Ullman. Monotone data flow analysis frameworks. Acta Informatica, 7:305--317, 1977.Google Scholar
Digital Library
- J. Knoop, L. Kovács, and J. Zwirchmayr. Symbolic loop bound computation for wcet analysis. In Perspectives of Systems Informatics, volume 7162 of LNCS, pages 227--242. Springer, 2011. Google Scholar
Digital Library
- L. Kovács. Invariant generation for p-solvable loops with assignments. In CSR, volume 5010 of LNCS, pages 349--359, 2008. Google Scholar
Digital Library
- G. Lafferriere, G. J. Pappas, and S. Yovine. Symbolic reachability computation for families of linear vector fields. JSC, 32(3):231--253, 2001. Google Scholar
Digital Library
- P. Lancaster and M. Tismenetsky. The Theory of Matrices (2nd edition). Academic Press, 1984.Google Scholar
- A. Miné. The octagon abstract domain. In AST 2001 in WCRE 2001, IEEE, pages 310--319. IEEE CS Press, October 2001. Google Scholar
Digital Library
- A. Miné. Symbolic methods to enhance the precision of numerical abstract domains. In VMCAI, volume 3855 of LNCS, pages 348--363, 2006. Google Scholar
Digital Library
- D. Monniaux. Compositional analysis of floating-point linear numerical filters. In CAV, volume 3576 of LNCS, pages 199--212, 2005. Google Scholar
Digital Library
- D. Monniaux. Automatic modular abstractions for linear constraints. In POPL. ACM, 2009. Google Scholar
Digital Library
- J. Rohn. Solvability of systems of interval linear equations and inequalities. In Linear Optimization Problems with Inexact Data, pages 35--77, 2006.Google Scholar
Cross Ref
- P. Roux, R. Jobredeaux, P.-L. Garoche, and E. Feron. A generic ellipsoid abstract domain for linear time invariant systems. In HSCC, pages 105--114. ACM, 2012. Google Scholar
Digital Library
- S. Sankaranarayanan and A. Tiwari. Relational abstractions for continuous and hybrid systems. In CAV, volume 6806 of LNCS, pages 686--702. Springer, 2011. Google Scholar
Digital Library
- S. Sankaranarayanan, H. B. Sipma, and Z. Manna. Constraint-based linear-relations analysis. In SAS, volume 3148 of LNCS, pages 53--68, 2004.Google Scholar
- S. Sankaranarayanan, H. B. Sipma, and Z.Manna. Scalable analysis of linear systems using mathematical programming. In VMCAI, volume 3385 of LNCS, 2005. Google Scholar
Digital Library
- P. Schrammel and B. Jeannet. Logico-numerical abstract acceleration and application to the verification of data-flow programs. In SAS, volume 6887 of LNCS, pages 233--248, 2011. Google Scholar
Digital Library
- P. Schrammel and B. Jeannet. Applying abstract acceleration to (co-)reachability analysis of reactive programs. Journal of Symbolic Computation, 47(12):1512--1532, 2012. Google Scholar
Digital Library
- A. Simon and A. King. Widening polyhedra with landmarks. In Prog. Languages and Systems, APLAS'06, volume 4279 of LNCS, 2006. Google Scholar
Digital Library
- A. Tiwari. Approximate reachability for linear systems. In HSCC, volume 2623 of LNCS, pages 514--525. Springer, 2003. Google Scholar
Digital Library
- H. Yazarel and G. J. Pappas. Geometric programming relaxations for linear system reachability. In American Control Conference, pages 553--559, 2004.Google Scholar
Cross Ref
Index Terms
Abstract acceleration of general linear loops
Recommendations
Abstract acceleration of general linear loops
POPL '14: Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming LanguagesWe present abstract acceleration techniques for computing loop invariants for numerical programs with linear assignments and conditionals. Whereas abstract interpretation techniques typically over-approximate the set of reachable states iteratively, ...
General loop fusion technique for nested loops considering timing and code size
CASES '04: Proceedings of the 2004 international conference on Compilers, architecture, and synthesis for embedded systemsLoop fusion is commonly used to improve the instruction-level parallelism of loops for high-performance embedded computing systems. Loop fusion, however, is not always directly applicable because the fusion prevention dependencies may exist among loops. ...
A Fast and Precise Static Loop Analysis Based on Abstract Interpretation, Program Slicing and Polytope Models
CGO '09: Proceedings of the 7th annual IEEE/ACM International Symposium on Code Generation and OptimizationA static loop analysis is a program analysis computing loop iteration counts. This information is crucial for different fields of applications. In the domain of compilers, the knowledge about loop iterations can be exploited for aggressive loop ...







Comments