qf bv property directed reachability with mixed type atomic … · 2014. 3. 12. · qf bv property...

76
QF BV Property Directed Reachability with Mixed Type Atomic Reasoning Units Tobias Welp and Andreas Kuehlmann

Upload: others

Post on 04-Feb-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

  • QF BV Property Directed Reachability

    with Mixed Type Atomic Reasoning Units

    Tobias Welp and Andreas Kuehlmann

  • Outliney

    1. Introduction

    2. QF BV Property Directed Reachability

    3. Mixed Type Atomic Reasoning Units

    4. Experimental Results

    5. Summary

    1 January 23, 2014 c©Tobias Welp

  • Motivation for Property Directed Reachabilityy

    • In 2011, Bradley proposed Property Directed Reachability (a.k.a

    IC3) for model checking [Brad11].

    • Experiments indicate that PDR outperforms model checking based

    on Interpolation [McMi03] on representative benchmark sets.

    0 100 200 300 400 500 600

    020

    040

    060

    0

    Time (s)

    Num

    ber

    Sol

    ved

    Inst

    ance

    s

    PDRInterpolation

    [EénM11]

    2 January 23, 2014 c©Tobias Welp

  • Other Favorable Properties of PDRy

    , No unrolling of transition relation.

    , Parallizable.

    , Allows for initialization with known invariants.

    , Good for finding counterexamples and proving that none exists.

    3 January 23, 2014 c©Tobias Welp

  • Research Pertaining PDRy

    Property Directed

    ReachabilityAnalysis

    Understanding

    IC3

    [Brad12]

    Where

    Monolithic/

    Incremental

    Meet

    [Some11]

    Generalization

    QF LA

    [Hode12]

    QF BV

    [Welp13]

    timed

    systems

    [Kind12]

    WSTS

    [Kloo13]

    push-down

    systems

    [Hode12]

    Optimizations

    PDR with

    Non-State

    Variables

    [Back13]

    Ternary

    Simulation

    [EénM11]

    4 January 23, 2014 c©Tobias Welp

  • Model Checkingy

    • Given are

    – A set of initial states: I(x)

    – A set of bad states: B(x)

    – A transition relation: T (x,x′)

    • Question: Is a bad state reachable from an initial state using valid

    transitions?

    5 January 23, 2014 c©Tobias Welp

  • Model Checking with PDRy

    PDR

    No

    Yes

    Counterexample Sequence

    ...

    badstate 1init

    PDR Trace

    init

    0 1 2 3

    x1 = 1

    x2 = 0

    x1 = 0

    x2 = 1

    x1 = 1

    x2 = 1

    I, T, B

    T T T

    6 January 23, 2014 c©Tobias Welp

  • Proving a Safety Property with PDRy

    Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    bad

    0

    • Can bad be reached within zero steps?

    7 January 23, 2014 c©Tobias Welp

  • Proving a Safety Property with PDRy

    Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    init

    0

    • No, only the initial set is reachable within zero steps.

    • Everything else is covered , i.e. not reachable.

    8 January 23, 2014 c©Tobias Welp

  • Proving a Safety Property with PDRy

    Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    init

    bad

    0 1

    • Can bad be reached within one step?

    • Conservatively, we initially assume that everything is reachable .

    9 January 23, 2014 c©Tobias Welp

  • Proving a Safety Property with PDRy

    Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    init

    bad

    0 1

    • Find a point in bad that is not yet covered .

    10 January 23, 2014 c©Tobias Welp

  • Proving a Safety Property with PDRy

    Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    init

    bad

    0 1

    • Expand proof obligation using simulation.

    11 January 23, 2014 c©Tobias Welp

  • Proving a Safety Property with PDRy

    Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    init

    bad

    0 1

    • The cube cannot be reached from the reachable area in frame 0.

    12 January 23, 2014 c©Tobias Welp

  • Proving a Safety Property with PDRy

    Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    init

    bad

    0 1

    • Hence, we can consider the proof obligation covered .

    13 January 23, 2014 c©Tobias Welp

  • Proving a Safety Property with PDRy

    Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    init

    bad

    0 1

    • Expand the covered cube as much as possible.

    14 January 23, 2014 c©Tobias Welp

  • Proving a Safety Property with PDRy

    Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    bad

    init

    0 1

    • Repeat with finding a new point in bad that is not covered .

    15 January 23, 2014 c©Tobias Welp

  • Proving a Safety Property with PDRy

    Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    bad

    init

    0 1

    • Again, the point cannot be reached from the reachable area in

    the previous frame.

    • Expand the covered cube.

    • Now, bad is completely covered .

    16 January 23, 2014 c©Tobias Welp

  • Proving a Safety Property with PDRy

    Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    bad

    init

    0 1 2

    • Can bad be reached within two steps?

    17 January 23, 2014 c©Tobias Welp

  • Proving a Safety Property with PDRy

    . . .

    18 January 23, 2014 c©Tobias Welp

  • Proving a Safety Property with PDRy

    Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    init

    0 1 2 3

    • Identified an inductive invariant disjoint from bad .

    • This proves the property.

    19 January 23, 2014 c©Tobias Welp

  • Outliney

    1. Introduction

    2. QF BV Property Directed Reachability

    3. Mixed Type Atomic Reasoning Units

    4. Experimental Results

    5. Summary

    20 January 23, 2014 c©Tobias Welp

  • Property Directed Reachability for QF BVy

    Original QF BV QF BV

    Formulation Polytopes Hybrid

    Atomic Reasoning BooleanPolytopes

    Boolean Cubes

    Unit Cubes and Polytopes

    Expansion of bad Ternary Interval Hybrid

    Proof Obligations Simulation Simulation Simulation

    Strengths logic arithmeticarithmetic

    logic

    Weaknesses arithmetic logic -

    21 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    22 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    23 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    24 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    25 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    26 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    27 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    28 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    29 January 23, 2014 c©Tobias Welp

  • Property Directed Reachability for QF BVy

    Original Polytopes QF BV

    Formulation [Welp13] Hybrid

    Atomic Reasoning BooleanPolytopes

    Boolean Cubes

    Unit Cubes and Polytopes

    Expansion of bad Ternary Interval Hybrid

    Proof Obligations Simulation Simulation Simulation

    Strengths logic arithmeticarithmetic

    logic

    Weaknesses arithmetic logic -

    30 January 23, 2014 c©Tobias Welp

  • Property Directed Reachability for QF BVy

    Original Polytopes QF BV

    Formulation [Welp13] Hybrid

    Atomic Reasoning BooleanPolytopes

    Boolean Cubes

    Unit Cubes and Polytopes

    Expansion of bad Ternary Interval Hybrid

    Proof Obligations Simulation Simulation Simulation

    Strengths logic arithmeticarithmetic

    logic

    Weaknesses arithmetic logic -

    31 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    32 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    33 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    34 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    35 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    36 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    37 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    38 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    39 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    40 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    41 January 23, 2014 c©Tobias Welp

  • Property Directed Reachability for QF BVy

    Original Polytopes QF BV

    Formulation [Welp13] Hybrid

    Atomic Reasoning BooleanPolytopes

    Boolean Cubes

    Unit Cubes and Polytopes

    Expansion of bad Ternary Interval Hybrid

    Proof Obligations Simulation Simulation Simulation

    Strengths logic arithmeticarithmetic

    logic

    Weaknesses arithmetic logic -

    42 January 23, 2014 c©Tobias Welp

  • Outliney

    1. Introduction

    2. QF BV Property Directed Reachability

    3. Mixed Type Atomic Reasoning Units

    4. Experimental Results

    5. Summary

    43 January 23, 2014 c©Tobias Welp

  • Property Directed Reachability for QF BVy

    Original PolytopesHybrid

    Formulation [Welp13]

    Atomic Reasoning BooleanPolytopes

    Boolean Cubes

    Unit Cubes and Polytopes

    Expansion of bad Ternary Interval Hybrid

    Proof Obligations Simulation Simulation Simulation

    Strengths logic arithmeticarithmetic

    logic

    Weaknesses arithmetic logic -

    44 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    45 January 23, 2014 c©Tobias Welp

  • Example Hybrid Invarianty

    I := (2× y ≡ x) ∧ (x+ y ≤ 3)

    T := (y′ ≡ y + 1) ∧ (x′ ≡ x− 2) ∧ (y′ > y) ∧ (x′ < x)

    B := (x+ y ≥ 4) ∨ (x mod 2 ≡ 1)

    4 2 4 6 x

    2

    4

    6

    yf0

    4 2 4 6 x

    2

    4

    6

    yf1 Legend:

    Initial set I

    Bad set B

    Proof oblig.

    Cover

    46 January 23, 2014 c©Tobias Welp

  • Probabilistic Specializationy

    4 2 4 6 x

    2

    4

    6

    yf1

    4 2 4 6 x

    2

    4

    6

    yf1

    4 2 4 6 x

    2

    4

    6

    yf1

    ւspecialize to Boolean

    cube with probability c

    specialize to polytope

    with probability 1− cց

    47 January 23, 2014 c©Tobias Welp

  • Probabilistic Specializationy

    4 2 4 6 x

    2

    4

    6

    yf1

    4 2 4 6 x

    2

    4

    6

    yf1

    4 2 4 6 x

    2

    4

    6

    yf1

    ւspecialize to Boolean

    cube with probability c

    specialize to polytope

    with probability 1− cց

    48 January 23, 2014 c©Tobias Welp

  • Probabilistic Specializationy

    4 2 4 6 x

    2

    4

    6

    yf1

    4 2 4 6 x

    2

    4

    6

    yf1

    4 2 4 6 x

    2

    4

    6

    yf1

    ւspecialize to Boolean

    cube with probability c

    specialize to polytope

    with probability 1− cց

    49 January 23, 2014 c©Tobias Welp

  • Probabilistic Specializationy

    • The favorable event can be expected to happen in a constant

    number of steps.

    E{trials until Boolean cube specialization} = c∞∑

    i=1

    i(1−c)i−1 =1

    c

    • Analogously, one calculates

    E{trials until polytope specialization} = (1−c)∞∑

    i=1

    ici−1 =1

    1− c

    50 January 23, 2014 c©Tobias Welp

  • Simulation-based Expansiony

    Simulation-based expansion of proof obligations is e.g. used to expand

    a bad ARU that is not yet covered:

    bad

    1

    51 January 23, 2014 c©Tobias Welp

  • Simulation-based Expansiony

    Simulation-based expansion of proof obligations is e.g. used to expand

    a bad ARU that is not yet covered:

    bad

    1

    52 January 23, 2014 c©Tobias Welp

  • Simulation-based Expansiony

    The check whether or not an expansion is valid can be reduced to

    simulation on sets of points [EénM11].

    Assume bad is defined as e1 < 2 and we already

    covered e1 < −1 with

    e1 := (x1 − x2 + 2) ∧ (y1 ∨ y2)

    bad

    1

    Then we may expand an ARU to a larger ARU â if

    e := (e1 < 2)︸ ︷︷ ︸

    bad

    ∧¬ (e1 < −1)︸ ︷︷ ︸

    covered

    evaluates to true for all values in â.

    53 January 23, 2014 c©Tobias Welp

  • Ternary Simulationy

    Let â := (1 ≤ x1 ≤ 5) ∧ (0 ≤ x2 ≤ 3) ∧ (y1 ∈ -00-) ∧ (y2 ∈ 100-)

    ∧ ∧

    2

    ∨<

    2

    0−

    +

    0 - - -

    - 0 0 -

    1 0 0 -

    0 0 - -

    x1

    x2

    y1

    y2

    Φ Ternary Simulation

    Φ Interval Simulation

    Φ Hybrid Simulation

    54 January 23, 2014 c©Tobias Welp

  • Ternary Simulationy

    Let â := (1 ≤ x1 ≤ 5) ∧ (0 ≤ x2 ≤ 3) ∧ (y1 ∈ -00-) ∧ (y2 ∈ 100-)

    ∧ ∧

    2

    y1

    y2

    <

    2

    0−

    x1

    x2+

    0 - - -

    - 0 0 -

    1 0 0 -

    1 0 0 -

    0 0 - -

    Φ Ternary Simulation

    Φ Interval Simulation

    Φ Hybrid Simulation

    55 January 23, 2014 c©Tobias Welp

  • Ternary Simulationy

    Let â := (1 ≤ x1 ≤ 5) ∧ (0 ≤ x2 ≤ 3) ∧ (y1 ∈ -00-) ∧ (y2 ∈ 100-)

    ∧ ∧

    2

    y1

    y2

    <

    2

    0−

    x1

    x2+

    0 - - -

    - - - -

    - 0 0 -

    1 0 0 -

    1 0 0 -

    0 0 - -

    Φ Ternary Simulation

    Φ Interval Simulation

    Φ Hybrid Simulation

    56 January 23, 2014 c©Tobias Welp

  • Ternary Simulationy

    Let â := (1 ≤ x1 ≤ 5) ∧ (0 ≤ x2 ≤ 3) ∧ (y1 ∈ -00-) ∧ (y2 ∈ 100-)

    ∧ ∧

    2

    y1

    y2

    <

    2

    0−

    x1

    x2+

    0 - - -

    - - - - 0 0 0 0

    0 0 - -

    0 0 1 0

    - 0 0 -

    1 0 0 -

    1 0 0 -

    0 0 1 0

    1

    - 0 0 -

    - - - -

    Φ Ternary Simulation

    Φ Interval Simulation

    Φ Hybrid Simulation

    57 January 23, 2014 c©Tobias Welp

  • Simulation-based Expansiony

    The check whether or not an expansion is valid can be reduced to

    simulation on sets of points [EénM11].

    Assume bad is defined as e1 < 2 and we already

    covered e1 < −1 with

    e1 := (x1 − x2 + 2) ∧ (y1 ∨ y2)

    bad

    1

    Then we may expand an ARU to a larger ARU â if

    e := (e1 < 2)︸ ︷︷ ︸

    bad

    ∧¬ (e1 < −1)︸ ︷︷ ︸

    covered

    evaluates to true for all values in â.

    58 January 23, 2014 c©Tobias Welp

  • Interval Simulationy

    Let â := (1 ≤ x1 ≤ 5) ∧ (0 ≤ x2 ≤ 3) ∧ (y1 ∈ -00-) ∧ (y2 ∈ 100-)

    ∧ ∧

    2

    y1

    y2

    <

    2

    0−

    x1

    x2+

    [1, 5]

    [0, 3]

    [−2, 5]

    [0, 7]

    [0, 0]

    [1, 1]

    [0, 1]

    [0, 1]

    [2, 2]

    [0, 7]

    [−8, 7][−8, 1]

    [2, 2]

    [−8,−7]

    0 - - -

    - - - - 0 0 0 0

    0 0 - -

    0 0 1 0

    - 0 0 -

    1 0 0 -

    1 0 0 -

    0 0 1 0

    1

    - 0 0 -

    - - - -

    Φ Ternary Simulation

    Φ Interval Simulation

    Φ Hybrid Simulation

    59 January 23, 2014 c©Tobias Welp

  • Hybrid Simulationy

    Let â := (1 ≤ x1 ≤ 5) ∧ (0 ≤ x2 ≤ 3) ∧ (y1 ∈ -00-) ∧ (y2 ∈ 100-)

    ∧ ∧

    2

    y1

    y2

    <

    2

    0−

    x1

    x2+

    [1, 5]

    [−2, 5] [0, 0]

    1

    1

    1

    [2, 2]1 0 0 -

    - 0 0 -

    [2, 2]

    [0, 3][0, 7] → 0 - - -

    0 0 0 - → [0, 1]

    [1, 5]

    [0, 3]

    [−2, 5]

    [0, 7]

    [0, 0]

    [1, 1]

    [0, 1]

    [0, 1]

    [2, 2]

    [0, 7]

    [−8, 7][−8, 1]

    [2, 2]

    [−8,−7]

    1 0 0 -

    0 - - -

    - - - - 0 0 0 0

    0 0 - -

    0 0 1 0

    - 0 0 -

    1 0 0 -

    1 0 0 -

    0 0 1 0

    1

    - 0 0 -

    - - - -

    Φ Ternary Simulation

    Φ Interval Simulation

    Φ Hybrid Simulation

    60 January 23, 2014 c©Tobias Welp

  • Property Directed Reachability for QF BVy

    Original PolytopesHybrid

    Formulation [Welp13]

    Atomic Reasoning BooleanPolytopes

    Boolean Cubes

    Unit Cubes and Polytopes

    Expansion of bad Ternary Interval Hybrid

    Proof Obligations Simulation Simulation Simulation

    Strengths logic arithmeticarithmetic

    logic

    Weaknesses arithmetic logic -

    61 January 23, 2014 c©Tobias Welp

  • Outliney

    1. Introduction

    2. QF BV Property Directed Reachability

    3. Mixed Type Atomic Reasoning Units

    4. Experimental Results

    5. Summary

    62 January 23, 2014 c©Tobias Welp

  • Experimental Setupy

    Verifier

    int

    foo

    {while(x)

    {x--;

    }assert(!x);

    }

    Program

    MCI

    MCI

    2

    1

    3

    MCI

    63 January 23, 2014 c©Tobias Welp

  • Benchmark Setsy

    Bitvector set of SV-Comp [Beye12]

    int

    {int x = 1;

    while(1)

    {x += 2*n;

    assert(x);

    }

    foo(int n)

    }

    Mostly Logic Invariants

    InvGen-Benchmarks [Gupt09]

    int

    {int x = 0;

    assume(n>=0);

    while(x < n)

    {x--;

    }

    foo(int n)

    assert(x

  • Overall Performancey

    SV-COMP

    [Beye12]

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

    c

    Num

    ber

    Solv

    ed I

    nsta

    nces

    010

    2030

    40[0s,0.5s](0.5s,5s](5s,50s](50s,500s]

    InvGen

    [Gupt09]

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

    c

    Num

    ber

    Solv

    ed I

    nsta

    nces

    010

    2030

    40

    [0s,0.5s](0.5s,5s](5s,50s](50s,500s]

    65 January 23, 2014 c©Tobias Welp

  • Overall Performancey

    All

    0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

    c

    Num

    ber

    Solv

    ed I

    nsta

    nces

    020

    4060

    80

    [0s,0.5s](0.5s,5s](5s,50s](50s,500s]

    66 January 23, 2014 c©Tobias Welp

  • Impact of Simulation Typey

    SV-COMP

    [Beye12]

    1 2 5 10 20 50 100 200 500

    010

    2030

    4050

    Time (s)

    Num

    ber

    Solv

    ed I

    nsta

    nces

    Ternary SimulationInterval SimulationHybrid Simulation

    InvGen

    [Gupt09]

    1 2 5 10 20 50 100 200 500

    010

    2030

    4050

    Time (s)

    Num

    ber

    Solv

    ed I

    nsta

    nces

    Ternary SimulationInterval SimulationHybrid Simulation

    67 January 23, 2014 c©Tobias Welp

  • Impact of Simulation Typey

    All

    1 2 5 10 20 50 100 200 500

    020

    4060

    8010

    0

    Time (s)

    Num

    ber

    Solv

    ed I

    nsta

    nces

    Ternary SimulationInterval SimulationHybrid Simulation

    68 January 23, 2014 c©Tobias Welp

  • Comparison vs ABC PDRy

    Solving Time QF_BV PDR (s)

    Sol

    ving

    Tim

    e A

    BC

    (s)

    0.1 1 10 100

    0.1

    1

    10

    100

    timeout

    timeout

    69 January 23, 2014 c©Tobias Welp

  • Outliney

    1. Introduction

    2. Property Directed Reachability

    3. Generalization of PDR to QF BV

    4. Experimental Results

    5. Summary

    70 January 23, 2014 c©Tobias Welp

  • Summaryy

    • PDR is an efficient algorithm for

    solving model checking problems.

    0 100 200 300 400 500 600

    020

    040

    060

    0

    Time (s)

    Num

    ber

    Sol

    ved

    Inst

    ance

    s

    PDRInterpolation

    • PDR with Boolean cubes performances

    poorly with arithmetic invariants.

    • PDR with polytopes performances poorly

    with bit-level invariants.4 2 4 6 x

    2

    4

    6

    yf1

    • The hybrid formulation outperforms

    the pure versions.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

    c

    Num

    ber

    Solv

    ed I

    nsta

    nces

    020

    4060

    80

    [0s,0.5s](0.5s,5s](5s,50s](50s,500s]

    71 January 23, 2014 c©Tobias Welp

  • Blay

    Thank you!for your

    attention

    [email protected]

    72 January 23, 2014 c©Tobias Welp

  • Referencesy

    References[Some11] F. Somenzi, A. R. Bradley: IC3: Where Monolithic

    and Incremental Meet., FMCAD 2011.

    [Brad12] A. R. Bradley: Understanding IC3., SAT 2012.

    [Welp13] T. Welp: QF BV Model Checking with PropertyDirected Reachability. DATE 2013.

    [Brad11] A. R. Bradley, Z. Manna: SAT-based modelchecking without unrolling., VMCAI 2011.

    [EénM11] N. Eén, A. Mishchenko, R. Brayton: EfficientImplementation of Property Directed Reachability,FMCAD 2011.

    73 January 23, 2014 c©Tobias Welp

  • Referencesy

    References[McMi03] K. L. McMillan: Interpolation and SAT-based

    Model Checking, CAV 2003.

    [Kind12] R. Kindermann, T. Junttila, I. Niemelä: SMT-basedInduction Methods for Timed Systems, FORMATS2012.

    [Hode12] K. Hoder, N. Bjørner: Generalized PropertyDirected Reachability, SAT 2012.

    [Kloo13] J. Kloos, R. Majumdar, F. Niksic and R. Piskac:Incremental, Inductive Coverability, CAV 2013.

    [Back13] J. Backes, M. Riedel: Using Cubes of Non-stateVariables With Property Directed Reachability,DATE 2013.

    74 January 23, 2014 c©Tobias Welp

  • Referencesy

    References[Beye12] D. Beyer: Competition on Software Verification,

    TACAS 2012.

    [Gupt09] A. Gupta, A. Rybalchenko: InvGen: An EfficientInvariant Generator, CAV 2009.

    75 January 23, 2014 c©Tobias Welp