Introduction
Software model checking is a critical technique for ensuring the reliability of complex systems. At its core, predicate abstraction simplifies programs by mapping data variables to a finite set of Boolean predicates. This abstraction is typically refined through the Counterexample-Guided Abstraction Refinement (CEGAR) loop. However, a significant bottleneck arises when programs contain loops: standard tools often unroll loops one iteration at a time, leading to a "state space explosion." This paper presents a novel approach that leverages symbolic recurrence equations to "jump" through loop iterations, significantly accelerating the verification process.
The Augmented CEGAR Framework
The traditional CEGAR loop involves calculating an abstraction, checking the property on that abstraction, and refining it if a spurious counterexample is found. The proposed method enhances this by integrating symbolic loop analysis directly into the refinement cycle.
As shown in the architecture above, the process introduces two specialized phases:
- Symbolic Loop Analysis: Instead of treating loops as linear paths, the tool identifies cycles and extracts recurrence equations.
- Feasibility Analysis: It solves these equations to determine the exact number of iterations required to reach a potential error state, then verifies this path against the concrete program.
Looping Counterexample Detection
A key innovation is the detection of "looping counterexamples." Traditional model checkers are optimized to find the shortest path to an error, which often misses the cyclic nature of program execution. By modifying the model checker (specifically Boppo) to identify cycles in the abstract model, the tool can represent an infinite set of potential paths as a single looping structure.
In the figure above, the looping counterexample (c) captures the repetitive nature of the program's state transitions (L2 through L6). This representation allows the symbolic engine to reason about the loop as a whole rather than as a sequence of individual steps.
Symbolic Analysis and Recurrence Equations
Once a looping counterexample is identified, the tool converts the loop body into Static Single Assignment (SSA) form. This transformation allows for the extraction of recurrence equations for program variables. For example, a simple increment i = i + 1 becomes the recurrence $i_{n} = i_{n-1} + 1$.
The tool then attempts to find closed-form solutions for these equations. By passing these solutions to a SAT solver, the system can solve for the specific iteration count $n$ that triggers a property violation (e.g., a buffer overflow). This shifts the verification burden from exhaustive search to algebraic solving.
Experimental Evaluation
The proposed method was evaluated using the Aeon 0.02a mail transfer agent, which contains a known buffer overflow vulnerability (CVE-2005-1019). The benchmark compared the new "SatAbs + loops" approach against industry standards SLAM and BLAST.
The results demonstrated remarkable scalability. While SLAM required over six hours to verify a buffer size of 200, the symbolic loop approach handled a buffer size of 512 in just 254.5 seconds. Crucially, the overhead for detecting loops was found to be negligible, typically accounting for less than 1% of the total execution time.
Conclusion
By treating loops as symbolic entities rather than sequences of states, this research provides a powerful solution to the state space explosion problem in predicate abstraction. The ability to "jump" directly to the relevant number of iterations transforms software verification from a tedious unrolling process into an efficient algebraic calculation, paving the way for more scalable automated bug-finding tools.
Summary updated