skip to main content
research-article

Making numerical program analysis fast

Published:03 June 2015Publication History
Skip Abstract Section

Abstract

Numerical abstract domains are a fundamental component in modern static program analysis and are used in a wide range of scenarios (e.g. computing array bounds, disjointness, etc). However, analysis with these domains can be very expensive, deeply affecting the scalability and practical applicability of the static analysis. Hence, it is critical to ensure that these domains are made highly efficient. In this work, we present a complete approach for optimizing the performance of the Octagon numerical abstract domain, a domain shown to be particularly effective in practice. Our optimization approach is based on two key insights: i) the ability to perform online decomposition of the octagons leading to a massive reduction in operation counts, and ii) leveraging classic performance optimizations from linear algebra such as vectorization, locality of reference, scalar replacement and others, for improving the key bottlenecks of the domain. Applying these ideas, we designed new algorithms for the core Octagon operators with better asymptotic runtime than prior work and combined them with the optimization techniques to achieve high actual performance. We implemented our approach in the Octagon operators exported by the popular APRON C library, thus enabling existing static analyzers using APRON to immediately benefit from our work. To demonstrate the performance benefits of our approach, we evaluated our framework on three published static analyzers showing massive speed-ups for the time spent in Octagon analysis (e.g., up to 146x) as well as significant end-to-end program analysis speed-ups (up to 18.7x). Based on these results, we believe that our framework can serve as a new basis for static analysis with the Octagon numerical domain.

References

  1. Optoctagon. https://github.com/eth-srl/OptOctagon.Google ScholarGoogle Scholar
  2. R. Bagnara, P. M. Hill, and E. Zaffanella. The Parma Polyhedra Library: Toward a complete set of numerical abstractions for the analysis and verification of hardware and software systems. Science of Computer Programming, 72(12):3 – 21, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. R. Bagnara, P. Hill, and E. Zaffanella. Weakly-relational shapes for numeric abstractions: improved algorithms and proofs of correctness. Formal Methods in System Design (FMSD), 35(3):279–323, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. T. Ball, R. Majumdar, T. D. Millstein, and S. K. Rajamani. Automatic predicate abstraction of C programs. In Proc. ACM Conference on Programming Language Design and Implementation (PLDI), pages 203–213, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. F. Banterle and R. Giacobazzi. A fast implementation of the octagon abstract domain on graphics hardware. In Proc. International Static Analysis Symposium (SAS), volume 4634 of Lecture Notes in Computer Science, pages 315–335. Springer, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. Beyer and M. Keremoglu. CPAchecker: A tool for configurable software verification. In Computer Aided Verification (CAV), volume 6806 of Lecture Notes in Computer Science, pages 184–190. Springer, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 Proc. ACM Conference on Programming Language Design and Implementation (PLDI), pages 196–207, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. L. Brutschy, P. Ferrara, and P. Müller. Static analysis for independent app developers. In Proc. ACM International Conference on Object Oriented Programming Systems Languages & Applications (OOPSLA), pages 847––860, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Chawdhary, E. Robbins, and A. King. Simple and efficient algorithms for octagons. In Programming Languages and Systems, volume 8858 of Lecture Notes in Computer Science, pages 296–313. Springer, 2014.Google ScholarGoogle Scholar
  10. R. Claris and J. Cortadella. The octahedron abstract domain. In Proc. International Static Analysis Symposium (SAS), volume 3148 of Lecture Notes in Computer Science, pages 312–327. Springer, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  11. P. Cousot and R. Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proc. ACM Symposium on Principles of Programming Languages (POPL), pages 238–252, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Cousot and N. Halbwachs. Automatic discovery of linear restraints among variables of a program. In Proc. ACM Symposium on Principles of Programming Languages (POPL), pages 84–96, 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Fähndrich and F. Logozzo. Static contract checking with abstract interpretation. In Proc. International Conference on Formal Verification of Object-oriented Software, pages 10–30, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. P. Ferrara. Generic combination of heap and value analyses in abstract interpretation. In Verification, Model Checking, and Abstract Interpretation (VMCAI), volume 8318 of Lecture Notes in Computer Science, pages 302–321. Springer, 2014.Google ScholarGoogle ScholarCross RefCross Ref
  15. R. W. Floyd. Algorithm 97: Shortest path. Communications ACM, 5 (6):345–, June 1962. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. K. Goto and R. Van De Geijn. High-performance implementation of the level-3 BLAS. ACM Trans. Math. Softw., 35(1):1–14, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. N. Halbwachs, D. Merchat, and L. Gonnord. Some ways to reduce the space dimension in polyhedra computations. Formal Methods in System Design (FMSD), 29(1):79–95, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. S.-C. Han, F. Franchetti, and M. Püschel. Program generation for the all-pairs shortest path problem. In Proc. International Conference on Parallel Architectures and Compilation Techniques (PACT), pages 222–232, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. B. Jeannet and A. Miné. Apron: A library of numerical abstract domains for static analysis. In Computer Aided Verification (CAV), volume 5643 of Lecture Notes in Computer Science, pages 661–667. Springer, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. V. Laviron and F. Logozzo. Subpolyhedra: A (more) scalable approach to infer linear inequalities. In Verification, Model Checking, and Abstract Interpretation (VMCAI), volume 5403 of Lecture Notes in Computer Science, pages 229–244. Springer, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. T. Lev-Ami and S. Sagiv. TVLA: A system for implementing static analyses. In Proc. International Static Analysis Symposium (SAS), volume 1824 of Lecture Notes in Computer Science, pages 280–301. Springer, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. F. Logozzo and M. Fähndrich. Pentagons: A weakly relational abstract domain for the efficient validation of array accesses. In ACM Symposium on Applied Computing, pages 184–188, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. A. Miné. The octagon abstract domain. Higher Order and Symbolic Computation, 19(1):31–100, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. N. Partush and E. Yahav. Abstract semantic differencing for numerical programs. In Proc. International Static Analysis Symposium (SAS), volume 7935 of Lecture Notes in Computer Science, pages 238–258. Springer, 2013.Google ScholarGoogle ScholarCross RefCross Ref
  25. V. Raychev, M. T. Vechev, and E. Yahav. Automatic synthesis of deterministic concurrency. In Proc. International Static Analysis Symposium (SAS), volume 7935 of Lecture Notes in Computer Science, pages 283–303. Springer, 2013.Google ScholarGoogle ScholarCross RefCross Ref
  26. M. Sagiv, T. Reps, and R. Wilhelm. Parametric shape analysis via 3-valued logic. ACM Transactions on Programming Languages and Systems (TOPLAS), 24(3):217–298, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. A. Simon and A. King. The two variable per inequality abstract domain. Higher Order and Symbolic Computation, 23(1):87–143, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. A. Toubhans, B. E. Chang, and X. Rival. Reduced product combination of abstract domains for shapes. In Verification, Model Checking, and Abstract Interpretation (VMCAI), volume 7737 of Lecture Notes in Computer Science, pages 375–395. Springer, 2013.Google ScholarGoogle Scholar
  29. C. Urban and A. Miné. An abstract domain to infer ordinal-valued ranking functions. In Programming Languages and Systems - 23rd European Symposium on Programming (ESOP), volume 8410 of Lecture Notes in Computer Science, pages 412–431. Springer, 2014.Google ScholarGoogle Scholar
  30. C. Urban and A. Miné. A decision tree abstract domain for proving conditional termination. In Proc. International Static Analysis Symposium (SAS), volume 8723 of Lecture Notes in Computer Science, pages 302–318. Springer, 2014.Google ScholarGoogle ScholarCross RefCross Ref
  31. R. Vallée-Rai, P. Co, E. Gagnon, L. Hendren, P. Lam, and V. Sundaresan. Soot - A Java bytecode optimization framework. In Proc. Conference of the Centre for Advanced Studies on Collaborative Research, pages 125–135, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. A. Venet and G. Brat. Precise and efficient static array bound checking for large embedded c programs. In Proc. ACM Conference on Programming Language Design and Implementation (PLDI), pages 231–242, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Making numerical program analysis fast

        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

        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!