[Paper Review] PAGAI: a path sensitive static analyzer
PAGAI is a path-sensitive static analyzer built on the LLVM infrastructure that computes inductive invariants for numerical variables using abstract interpretation combined with SMT solving. It improves precision by focusing on loop headers and using path-sensitive analysis with decision procedures, achieving better results than classical methods in 8.29–9.86% of control points, especially with disjunctive invariants and convex polyhedra domains.
We describe the design and the implementation of PAGAI, a new static analyzer working over the LLVM compiler infrastructure, which computes inductive invariants on the numerical variables of the analyzed program. PAGAI implements various state-of-the-art algorithms combining abstract interpretation and decision procedures (SMT-solving), focusing on distinction of paths inside the control flow graph while avoiding systematic exponential enumerations. It is parametric in the abstract domain in use, the iteration algorithm, and the decision procedure. We compared the time and precision of various combinations of analysis algorithms and abstract domains, with extensive experiments both on personal benchmarks and widely available GNU programs.
Motivation & Objective
- To develop a fully automatic static analyzer that computes precise inductive invariants for numerical variables in C/C++ programs.
- To overcome precision loss in traditional abstract interpretation caused by convex hull operations at control flow merges.
- To enable efficient, path-sensitive analysis without enumerating all paths explicitly by using on-demand SMT queries.
- To support modular experimentation with different abstract domains, iteration strategies, and decision procedures.
- To evaluate the precision and performance trade-offs of various combinations of analysis techniques on real-world programs.
Proposed method
- PAGAI operates on LLVM bitcode, analyzing programs using abstract interpretation over user-selectable abstract domains.
- It computes invariants only at key control nodes—specifically, loop headers or feedback vertex set nodes—avoiding full control-flow graph propagation.
- Path-sensitive analysis is achieved via on-demand SMT solving: each path is explored only when necessary, triggered by satisfiability queries.
- The tool supports both conjunctive invariants (e.g., convex polyhedra, octagons) and disjunctive invariants (unions of abstract elements) via configurable iteration strategies.
- It integrates with SMT solvers to handle complex arithmetic constraints, though non-linear arithmetic can lead to 'unknown' results, requiring workarounds.
- The system is parametric: users can independently select abstract domain, iteration algorithm, and decision procedure for experimental comparison.
Experimental results
Research questions
- RQ1Can path-sensitive analysis using on-demand SMT solving improve the precision of inductive invariant computation without incurring exponential path enumeration?
- RQ2How do different abstract domains (e.g., convex polyhedra, octagons, intervals) compare in precision and performance when used with the same analysis technique?
- RQ3To what extent does using disjunctive invariants enhance precision, and what is the associated performance cost?
- RQ4How effective is the improved widening operator from Bagnara et al. in reducing over-approximation compared to classical widening?
- RQ5What are the limitations of current SMT solvers in handling non-linear arithmetic in real-world C/C++ programs, and how do they affect analysis completeness?
Key findings
- PAGAI achieves improved precision in 8.29% to 9.86% of control points compared to classical forward analysis with polyhedra and path focusing.
- The use of disjunctive invariants increases precision for 14.46% of control points in the benchmark set compared to the G+PF technique, albeit at a higher computational cost.
- The octagon domain outperforms intervals in 97.98% of cases, particularly due to its ability to express non-constant bounds on loop indices.
- The improved widening operator from Bagnara et al. yields more precise invariants than classical widening for 3.70% of control points.
- Lapack/Blas benchmarks showed high SMT solver failure rates (798/1602 functions skipped) due to non-linear floating-point arithmetic, indicating a key limitation in current SMT support.
- Path-focusing sometimes outperforms classical algorithms in execution time due to reduced computation over abstract values at fewer control points.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.