skip to main content
10.1145/2737924.2738000acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Making numerical program analysis fast

Published: 03 June 2015 Publication History

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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[15]
R. W. Floyd. Algorithm 97: Shortest path. Communications ACM, 5 (6):345–, June 1962.
[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.
[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.
[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.
[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.
[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.
[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.
[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.
[23]
A. Miné. The octagon abstract domain. Higher Order and Symbolic Computation, 19(1):31–100, 2006.
[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.
[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.
[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.
[27]
A. Simon and A. King. The two variable per inequality abstract domain. Higher Order and Symbolic Computation, 23(1):87–143, 2010.
[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.
[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.
[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.
[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.
[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.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '15: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2015
630 pages
ISBN:9781450334686
DOI:10.1145/2737924
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 50, Issue 6
    PLDI '15
    June 2015
    630 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2813885
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 03 June 2015

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Fast numerical program analysis
  2. octagon abstract do- main
  3. octagon closure algorithm
  4. octagon decomposition
  5. sparse octagon operators
  6. vectorized octagon operators

Qualifiers

  • Research-article

Conference

PLDI '15
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)30
  • Downloads (Last 6 weeks)1
Reflects downloads up to 02 Mar 2025

Other Metrics

Citations

Cited By

View all
  • (2023)Building Trust and Safety in Artificial Intelligence with Abstract InterpretationStatic Analysis10.1007/978-3-031-44245-2_3(28-38)Online publication date: 24-Oct-2023
  • (2022)Several lifted abstract domains for static analysis of numerical program familiesScience of Computer Programming10.1016/j.scico.2021.102725213:COnline publication date: 1-Jan-2022
  • (2021)Program analysis via efficient symbolic abstractionProceedings of the ACM on Programming Languages10.1145/34854955:OOPSLA(1-32)Online publication date: 15-Oct-2021
  • (2021)A Fresh Look at Zones and OctagonsACM Transactions on Programming Languages and Systems10.1145/345788543:3(1-51)Online publication date: 3-Sep-2021
  • (2021)Program Sketching Using Lifted Analysis for Numerical Program FamiliesNASA Formal Methods10.1007/978-3-030-76384-8_7(95-112)Online publication date: 19-May-2021
  • (2021)Memory-Efficient Fixpoint ComputationStatic Analysis10.1007/978-3-030-65474-0_3(35-64)Online publication date: 13-Jan-2021
  • (2020)Learning fast and precise numerical analysisProceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3385412.3386016(1112-1127)Online publication date: 11-Jun-2020
  • (2019)Simple and precise static analysis of untrusted Linux kernel extensionsProceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/3314221.3314590(1069-1084)Online publication date: 8-Jun-2019
  • (2019)A²I: abstract² interpretationProceedings of the ACM on Programming Languages10.1145/32903553:POPL(1-31)Online publication date: 2-Jan-2019
  • (2018)Automatically testing implementations of numerical abstract domainsProceedings of the 33rd ACM/IEEE International Conference on Automated Software Engineering10.1145/3238147.3240464(768-778)Online publication date: 3-Sep-2018
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media