SMT-based Software Model Checking: Experimental Comparison of Four Algorithms
Matthias Dangl
Joint work with Dirk Beyer
University of Passau, Germany
SMT-based Software Model Checking: Experimental Comparison of Four - - PowerPoint PPT Presentation
SMT-based Software Model Checking: Experimental Comparison of Four Algorithms Matthias Dangl Joint work with Dirk Beyer University of Passau, Germany SMT-based Software Model Checking Bounded Model Checking ( Cbmc , CPAchecker , Esbmc ,
University of Passau, Germany
◮ Bounded Model Checking
◮ k-Induction
◮ Predicate Abstraction
◮ Impact
◮ Property-Directed Reachability (PDR, also known as IC3)
◮ ...
Matthias Dangl University of Passau, Germany 2 / 24
◮ Bounded Model Checking
◮ k-Induction
◮ Predicate Abstraction
◮ Impact
Matthias Dangl University of Passau, Germany 2 / 24
◮ Perform an extensive comparative evaluation ◮ Confirm intuitions about strengths ◮ Determine potential of extensions and combinations
Matthias Dangl University of Passau, Germany 3 / 24
◮ Understand, and, if necessary, re-formulate the algorithms ◮ Implement all algorithms in one tool (CPAchecker) ◮ Run the algorithms on a large set of benchmarks ◮ Measure efficiency and effectiveness
Matthias Dangl University of Passau, Germany 4 / 24
◮ Share same front-end code ◮ Share same utilities ◮ Share same SMT-solver integration ◮ Share algorithm-independent optimizations
Matthias Dangl University of Passau, Germany 5 / 24
◮ Bounded Model Checking:
◮ Biere, Cimatti, Clarke, Zhu: [TACAS’99] ◮ No abstraction ◮ Unroll loops up to a loop bound k ◮ Check that P holds in the first k iterations:
k
◮ Good for finding bugs Matthias Dangl University of Passau, Germany 6 / 24
◮ k-Induction generalizes the induction principle:
◮ No abstraction ◮ Base case: Check that P holds in the first k iterations:
◮ Step case: Check that the safety property is k-inductive:
k
◮ Add auxiliary invariants ◮ Kahsai, Tinelli: [PDMC’11] ◮ Heavy-weight proof technique Matthias Dangl University of Passau, Germany 7 / 24
1: k = 1 2: while !finished do 3:
4:
5:
1: prec = <weak> 2: invariants = ∅ 3: while !finished do 4:
5:
Matthias Dangl University of Passau, Germany 8 / 24
◮ Predicate Abstraction
◮ Graf, Saïdi: [CAV’97] ◮ Abstract-Interpretation technique ◮ Abstract domain constructed from a set of predicates π ◮ Use CEGAR to add predicates to π (refinement) ◮ Derive new predicates using Craig interpolation ◮ Good for finding proofs Matthias Dangl University of Passau, Germany 9 / 24
◮ Impact
◮ "Lazy Abstraction with Interpolants" ◮ McMillan: [CAV’06] ◮ Counter-draft to predicate abstraction ◮ Abstraction is derived dynamically/lazily ◮ Solution to avoiding expensive abstraction computations ◮ Compute fixed point over three operations ◮ Expand ◮ Refine ◮ Cover ◮ Quick exploration of the state space ◮ Good for finding bugs Matthias Dangl University of Passau, Germany 10 / 24
◮ 4 779 verification tasks taken from SV-COMP’16 ◮ 15 min timeout (CPU time) ◮ 15 GB memory ◮ Measured with BenchExec
Matthias Dangl University of Passau, Germany 11 / 24
1 10 100 1000 500 1000 1500 2000 2500 CPU time (s) n-th fastest correct proof BMC k-Induction Predicate abstraction Impact
Matthias Dangl University of Passau, Germany 12 / 24
1 10 100 1000 100 200 300 400 500 600 CPU time (s) n-th fastest correct alarm BMC k-Induction Predicate Abstraction Impact
Matthias Dangl University of Passau, Germany 13 / 24
◮ Several thousands LOC per task ◮ Complex structures ◮ Pointer arithmetics
Matthias Dangl University of Passau, Germany 14 / 24
1 10 100 1000 200 400 600 800 1000 1200 CPU time (s) n-th fastest correct result
BMC k-Induction Predicate Abstraction Impact
Matthias Dangl University of Passau, Germany 15 / 24
1 10 100 1000 10 20 30 40 50 CPU time (s) n-th fastest correct result
BMC k-Induction Predicate Abstraction Impact
Matthias Dangl University of Passau, Germany 16 / 24
◮ Several thousand LOC per task ◮ Auto-generated ◮ Only integer variables ◮ Linear and non-linear arithmetics ◮ Complex and dense control structure
Matthias Dangl University of Passau, Germany 17 / 24
◮ Several thousand LOC per task ◮ Auto-generated ◮ Only integer variables ◮ Linear and non-linear arithmetics ◮ Complex and dense control structure
Matthias Dangl University of Passau, Germany 17 / 24
1 10 100 1000 100 200 300 400 500 CPU time (s) n-th fastest correct result
k-Induction Predicate Abstraction Impact
Matthias Dangl University of Passau, Germany 18 / 24
Matthias Dangl University of Passau, Germany 19 / 24
◮ Several hundred LOC ◮ Mostly integer variables, some structs ◮ Mostly simple linear arithmetics ◮ Lots of property-independent code
Matthias Dangl University of Passau, Germany 20 / 24
1 10 100 1000 50 100 150 200 250 300 350 CPU time (s) n-th fastest correct result
BMC k-Induction Predicate abstraction Impact
Matthias Dangl University of Passau, Germany 21 / 24
1 10 100 1000 50 100 150 200 250 CPU time (s) n-th fastest correct result
BMC k-Induction Predicate abstraction Impact
Matthias Dangl University of Passau, Germany 22 / 24
◮ BMC is a good bug hunter ◮ k-Induction is a heavy-weight proof technique: effective,
◮ CEGAR makes abstraction techniques (Predicate
◮ Impact is lazy, and explores the state space and finds bugs
◮ Predicate Abstraction is eager, and prunes irrelevant parts
Matthias Dangl University of Passau, Germany 23 / 24
◮ Abstraction is required for scalability ◮ k-Induction needs some form of abstraction ◮ Maybe the ideas of k-Induction can be transferred to PDR
Matthias Dangl University of Passau, Germany 24 / 24