Back to Program Verification Index | Previous: (y-15) Correctness via Assert Statements | Next: (y-17) Infeasibility Proofs and CEGAR
Mental Model for Abstractions
- The State Space Explosion: Programs have too many states to check individually. Abstraction allows us to group many concrete states into one “abstract” state.
- Predicates as Buckets: We use a finite set of formulas (Predicates) to categorize states. For example, if , we only care if is positive or not.
- Finite Approximation: This analogy helps understand how we map an infinite number of concrete states (all possible values of ) into a finite set of “buckets” defined by our predicates.
- Abstract Reachability Graph (ARG): A graph where each node is an Abstract Configuration . It represents “at location , the program state satisfies .”
- Safety Proof: If we can build an ARG where no node has a satisfiable , we have proven the program safe.
Abstract Strongest Post ()

The standard can produce complex formulas. The Abstract Strongest Post forces the result to be a conjunction of formulas from our set .
- Intuition: We take the real strongest postcondition and “round it up” to the nearest combination of predicates we already know.
- This ensures the number of possible abstract states remains finite.
Abstract Reachability Graphs (ARG)

An ARG is a way to systematically explore the abstract state space of a program.
Formal Definition
An ARG is a pair where:
- : A set of abstract configurations , where is a program location and is a set of states (represented by a formula).
- : A set of abstract transitions .
Construction Algorithm
- Start at the initial location with the precondition: .
- Explore: For each outgoing edge in the CFG, compute the new abstract state using .
- Worklist: Continue until no new abstract configurations are discovered.
Safety in the ARG
An ARG is a Safety Proof if:
- For every location (an error location), the corresponding formula in is
false. - This means that within our abstraction , it is impossible to reach the error state.
💡 Intuition: Precision vs. Scalability
- If is too small (e.g., ), the ARG will be small but might say the program is “unsafe” even if it’s actually safe (a False Positive).
- If is too large, the ARG might be too big for a computer to handle, but it will be more precise.
Summary
- Abstraction simplifies the program by focusing on a few key properties (Predicates).
- keeps the reasoning within the bounds of our chosen predicates.
- ARG is the graph of all reachable abstract states.
- A program is Safe if its ARG never reaches an error state with a satisfiable formula.
- The Guesswork: The main challenge in verification is finding a “good” set that is precise enough to prove safety but small enough to be efficient.
Self-Check
- What role does the predicate set play in abstract interpretation, and why must it be finite?
Answer
is the finite vocabulary the abstraction is allowed to use. Every abstract state is a conjunction of predicates drawn from (or their negations), which makes the set of possible abstract states finite. Finiteness is what guarantees the ARG construction terminates, even when the concrete state space is infinite.
- Define and explain what “rounding up” means.
Answer
is the conjunction of all such that . It takes the concrete strongest postcondition and replaces it with the strongest combination of -predicates that is still implied by it, which is generally weaker than the real . That weakening is the “rounding up” that keeps results inside the predicate vocabulary.
- What are the two components of an ARG node, and what does the node mean?
Answer
A node is an abstract configuration where is a CFG location and is a formula (a -state) representing a set of concrete states. The node asserts: “when the program reaches , the actual state satisfies ”.
- Under what condition does an ARG constitute a safety proof?
Answer
Every node at an error location must have equivalent to
false. That means in the abstraction, no concrete state can be witnessing an assertion failure, and since the ARG over-approximates real reachability, the program is genuinely safe.
- Describe the trade-off involved in choosing the predicate set .
Answer
A small yields a small ARG that may be too coarse to prove safety, producing false alarms (the abstraction says an error state is reachable when concretely it is not). A large gives more precision but explodes the abstract state space and cost. The “guesswork” is finding a precise enough to prove the property and small enough to scale.
Back to Program Verification Index | Previous: (y-15) Correctness via Assert Statements | Next: (y-17) Infeasibility Proofs and CEGAR | (y) Return to Notes | (y) Return to Home