Property-Directed k-Induction Dejan Jovanovi Bruno Dutertre SRI - - PowerPoint PPT Presentation

property directed k induction
SMART_READER_LITE
LIVE PREVIEW

Property-Directed k-Induction Dejan Jovanovi Bruno Dutertre SRI - - PowerPoint PPT Presentation

Property-Directed k-Induction Dejan Jovanovi Bruno Dutertre SRI International FMCAD 2016, Mountain View, CA Thanks to NASA Outline Introduction 1 Property-Directed k-Induction 2 Experimental Evaluation 3 Outline Introduction 1


slide-1
SLIDE 1

Property-Directed k-Induction

Dejan Jovanović Bruno Dutertre

SRI International

FMCAD 2016, Mountain View, CA

Thanks to NASA

slide-2
SLIDE 2

Outline

1

Introduction

2

Property-Directed k-Induction

3

Experimental Evaluation

slide-3
SLIDE 3

Outline

1

Introduction

2

Property-Directed k-Induction

3

Experimental Evaluation

slide-4
SLIDE 4

Introduction

the problem

Given a transition system S = ⟨I, T⟩ with ⃗ x: state variables, I(⃗ x): initial state formula, T(⃗ x,⃗ x′): state transition formula, check whether all reachable states satisfy a property P.

Example: Zeno

Given S = ⟨I, T⟩ with I ≡ (x = 0) ∧ (y = 0.5) , T ≡ (x′ = x + y) ∧ (y′ = y/2) , check whether (x < 1).

slide-5
SLIDE 5

Introduction

the problem

Given a transition system S = ⟨I, T⟩ with ⃗ x: state variables, I(⃗ x): initial state formula, T(⃗ x,⃗ x′): state transition formula, check whether all reachable states satisfy a property P.

Example: Zeno

Given S = ⟨I, T⟩ with I ≡ (x = 0) ∧ (y = 0.5) , T ≡ (x′ = x + y) ∧ (y′ = y/2) , check whether (x < 1).

Automation goals

1

Find bugs

2

Prove properties

slide-6
SLIDE 6

Introduction

bounded model checking

Can find bugs, can not prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive Finite reachability

slide-7
SLIDE 7

Introduction

bounded model checking

I(⃗ x0) ∧ ¬P(⃗ x0)

Can find bugs, can not prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive Finite reachability

slide-8
SLIDE 8

Introduction

bounded model checking

I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ ¬P(⃗ x1)

Can find bugs, can not prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive Finite reachability

slide-9
SLIDE 9

Introduction

bounded model checking

I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ T(⃗ x1,⃗ x2) ∧ ¬P(⃗ x2)

Can find bugs, can not prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive Finite reachability

slide-10
SLIDE 10

Introduction

bounded model checking

I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ T(⃗ x1,⃗ x2) ∧ T(⃗ x2,⃗ x3) ∧ ¬P(⃗ x3)

Can find bugs, can not prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive Finite reachability

slide-11
SLIDE 11

Introduction

bounded model checking

I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ T(⃗ x1,⃗ x2) ∧ T(⃗ x2,⃗ x3) ∧ ¬P(⃗ x3)

Can find bugs, can not prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive Finite reachability

slide-12
SLIDE 12

Introduction

bounded model checking

I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ T(⃗ x1,⃗ x2) ∧ T(⃗ x2,⃗ x3) ∧ ¬P(⃗ x3)

Can find bugs, can not prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive Finite reachability

slide-13
SLIDE 13

Introduction

induction

I x P x P x T x x P x

Can prove properties Can use ofg-the-shelf SAT/SMT solver

slide-14
SLIDE 14

Introduction

induction

I(⃗ x0) ⇒ P(⃗ x0) P x T x x P x

Can prove properties Can use ofg-the-shelf SAT/SMT solver

P

I

slide-15
SLIDE 15

Introduction

induction

I(⃗ x0) ⇒ P(⃗ x0) P(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1)

Can prove properties Can use ofg-the-shelf SAT/SMT solver

P P T

slide-16
SLIDE 16

Introduction

induction

I(⃗ x0) ⇒ P(⃗ x0) P(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1)

Can prove properties Can use ofg-the-shelf SAT/SMT solver

P P P T T

slide-17
SLIDE 17

Introduction

induction

I(⃗ x0) ⇒ P(⃗ x0) P(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1)

Can prove properties Can use ofg-the-shelf SAT/SMT solver

P P P P T T T

slide-18
SLIDE 18

Introduction

induction

I(⃗ x0) ⇒ P(⃗ x0) P(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1)

Can prove properties Can use ofg-the-shelf SAT/SMT solver

slide-19
SLIDE 19

Introduction

induction

I(⃗ x0) ⇒ P(⃗ x0) P(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1)

Can prove properties Can use ofg-the-shelf SAT/SMT solver Zeno: property (x < 1) is not inductive

Zeno

I ≡ (x = 0) ∧ (y = 0.5) T ≡ (x′ = x + y) ∧ (y′ = y/2) P ≡ (x < 1)

slide-20
SLIDE 20

Introduction

induction

I(⃗ x0) ⇒ P(⃗ x0) P(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1)

Can prove properties Can use ofg-the-shelf SAT/SMT solver Zeno: property (x < 1) ∧ (x + 2y ≤ 1) is inductive

Zeno

I ≡ (x = 0) ∧ (y = 0.5) T ≡ (x′ = x + y) ∧ (y′ = y/2) P ≡ (x < 1)

slide-21
SLIDE 21

Introduction

k-induction

I x P x I x T x x P x I x T x x T x x P x P x T x x P x T x x P x T x x P x

Can find bugs, can prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive

slide-22
SLIDE 22

Introduction

k-induction

I(⃗ x0) ⇒ P(⃗ x0) I x T x x P x I x T x x T x x P x P x T x x P x T x x P x T x x P x

Can find bugs, can prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive

P

I

slide-23
SLIDE 23

Introduction

k-induction

I(⃗ x0) ⇒ P(⃗ x0) I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1) I x T x x T x x P x P x T x x P x T x x P x T x x P x

Can find bugs, can prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive

P P T

I

slide-24
SLIDE 24

Introduction

k-induction

I(⃗ x0) ⇒ P(⃗ x0) I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1) I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ T(⃗ x1,⃗ x2) ⇒ P(⃗ x2) P x T x x P x T x x P x T x x P x

Can find bugs, can prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive

P P P T T

I

slide-25
SLIDE 25

Introduction

k-induction

I(⃗ x0) ⇒ P(⃗ x0) I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1) I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ T(⃗ x1,⃗ x2) ⇒ P(⃗ x2) P(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ P(⃗ x1) ∧ T(⃗ x1,⃗ x2) ∧ P(⃗ x2) ∧ T(⃗ x2,⃗ x3) ⇒ P(⃗ x3)

Can find bugs, can prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive

P P P T T P T

slide-26
SLIDE 26

Introduction

k-induction

I(⃗ x0) ⇒ P(⃗ x0) I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1) I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ T(⃗ x1,⃗ x2) ⇒ P(⃗ x2) P(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ P(⃗ x1) ∧ T(⃗ x1,⃗ x2) ∧ P(⃗ x2) ∧ T(⃗ x2,⃗ x3) ⇒ P(⃗ x3)

Can find bugs, can prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive

P P P T T P T P T

slide-27
SLIDE 27

Introduction

k-induction

I(⃗ x0) ⇒ P(⃗ x0) I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1) I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ T(⃗ x1,⃗ x2) ⇒ P(⃗ x2) P(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ P(⃗ x1) ∧ T(⃗ x1,⃗ x2) ∧ P(⃗ x2) ∧ T(⃗ x2,⃗ x3) ⇒ P(⃗ x3)

Can find bugs, can prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive

slide-28
SLIDE 28

Introduction

k-induction

I(⃗ x0) ⇒ P(⃗ x0) I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1) I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ T(⃗ x1,⃗ x2) ⇒ P(⃗ x2) P(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ P(⃗ x1) ∧ T(⃗ x1,⃗ x2) ∧ P(⃗ x2) ∧ T(⃗ x2,⃗ x3) ⇒ P(⃗ x3)

Can find bugs, can prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive Example: property (|x| < 1) is not inductive

Stronger

I ≡ (x = 0) ∧ (y = 0) T ≡ (x′ = 3 5x + 2 5y) ∧ (|y′| < 1) P ≡ (|x| < 1)

slide-29
SLIDE 29

Introduction

k-induction

I(⃗ x0) ⇒ P(⃗ x0) I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1) I(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ T(⃗ x1,⃗ x2) ⇒ P(⃗ x2) P(⃗ x0) ∧ T(⃗ x0,⃗ x1) ∧ P(⃗ x1) ∧ T(⃗ x1,⃗ x2) ∧ P(⃗ x2) ∧ T(⃗ x2,⃗ x3) ⇒ P(⃗ x3)

Can find bugs, can prove properties Can use ofg-the-shelf SAT/SMT solver For non-trivial systems unrolling can be expensive Example: property (|x| < 1) is 2-inductive

Stronger

I ≡ (x = 0) ∧ (y = 0) T ≡ (x′ = 3 5x + 2 5y) ∧ (|y′| < 1) P ≡ (|x| < 1)

slide-30
SLIDE 30

Introduction

strengthening

Key problem: find a strengthening that proves the property

I(⃗ x0) ⇒ P(⃗ x0) P(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ P(⃗ x1) x P x

T P P

Same for k-induction Is k-induction stronger?

slide-31
SLIDE 31

Introduction

strengthening

Key problem: find a strengthening that proves the property

I(⃗ x0) ⇒ F(⃗ x0) F(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ F(⃗ x1) F(⃗ x) ⇒ P(⃗ x)

T P L1

F

P L1

F

Same for k-induction Is k-induction stronger?

slide-32
SLIDE 32

Introduction

strengthening

Key problem: find a strengthening that proves the property

I(⃗ x0) ⇒ F(⃗ x0) F(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ F(⃗ x1) F(⃗ x) ⇒ P(⃗ x)

T P L1 L2

F

P L2 L1

F

Same for k-induction Is k-induction stronger?

slide-33
SLIDE 33

Introduction

strengthening

Key problem: find a strengthening that proves the property

I(⃗ x0) ⇒ F(⃗ x0) F(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ F(⃗ x1) F(⃗ x) ⇒ P(⃗ x)

T P L1 L2 L3

F

P L2 L3 L1

F

Same for k-induction Is k-induction stronger?

slide-34
SLIDE 34

Introduction

strengthening

Key problem: find a strengthening that proves the property

I(⃗ x0) ⇒ F(⃗ x0) F(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ F(⃗ x1) F(⃗ x) ⇒ P(⃗ x)

T P L1 L2 L3

F

P L2 L3 L1

F

P L1 L2 L3

F

Same for k-induction Is k-induction stronger?

slide-35
SLIDE 35

Introduction

strengthening

Key problem: find a strengthening that proves the property

I(⃗ x0) ⇒ F(⃗ x0) F(⃗ x0) ∧ T(⃗ x0,⃗ x1) ⇒ F(⃗ x1) F(⃗ x) ⇒ P(⃗ x)

T P L1 L2 L3

F

P L2 L3 L1

F

P L1 L2 L3

F

Same for k-induction Is k-induction stronger?

slide-36
SLIDE 36

Introduction

timeline

Induction Bounded model checking [BCCZ99] k-induction [SSS00] Interpolation-based model checking [McM03] IC3/PDR [Bra11]

based on induction incremental strengthening no unrolling: lots of “easy” queries interpolation-based learning

Lots of work on SMT-based extensions [HB12, CG12, KGC14, CGMT14]

slide-37
SLIDE 37

Introduction

timeline

Induction Bounded model checking [BCCZ99] k-induction [SSS00] Interpolation-based model checking [McM03] IC3/PDR [Bra11]

based on induction incremental strengthening no unrolling: lots of “easy” queries interpolation-based learning

Lots of work on SMT-based extensions [HB12, CG12, KGC14, CGMT14]

slide-38
SLIDE 38

Introduction

timeline

Induction Bounded model checking [BCCZ99] k-induction [SSS00] Interpolation-based model checking [McM03] IC3/PDR [Bra11]

based on induction incremental strengthening no unrolling: lots of “easy” queries interpolation-based learning

Lots of work on SMT-based extensions [HB12, CG12, KGC14, CGMT14]

slide-39
SLIDE 39

Outline

1

Introduction

2

Property-Directed k-Induction

3

Experimental Evaluation

slide-40
SLIDE 40

Property-Directed k-Induction

modules

SMT solving

more than SAT/UNSAT

1-step reachability

more than reachable/unreachable

k-step reachability

more than reachable/unreachable

k-induction

search for a strengthening and learn from failures

slide-41
SLIDE 41

Property-Directed k-Induction

1-step reachability

R F T

Basic satisfiability query

R(⃗ x) ∧ T(⃗ x,⃗ x′) ∧ F(⃗ x′) SAT : generalize the counterexample to G YICES2 with [KGC14] UNSAT: interpolate, with J refuting F MATHSAT5

slide-42
SLIDE 42

Property-Directed k-Induction

1-step reachability

R F T

Basic satisfiability query

R(⃗ x) ∧ T(⃗ x,⃗ x′) ∧ F(⃗ x′) SAT : generalize the counterexample to G YICES2 with [KGC14] UNSAT: interpolate, with J refuting F MATHSAT5

slide-43
SLIDE 43

Property-Directed k-Induction

1-step reachability

R F T G

Basic satisfiability query

R(⃗ x) ∧ T(⃗ x,⃗ x′) ∧ F(⃗ x′) SAT : generalize the counterexample to G YICES2 with [KGC14] UNSAT: interpolate, with J refuting F MATHSAT5

slide-44
SLIDE 44

Property-Directed k-Induction

1-step reachability

R F T J

Basic satisfiability query

R(⃗ x) ∧ T(⃗ x,⃗ x′) ∧ F(⃗ x′) SAT : generalize the counterexample to G YICES2 with [KGC14] UNSAT: interpolate, with J refuting F MATHSAT5

slide-45
SLIDE 45

Property-Directed k-Induction

k-step reachability

Reachability in k steps

Given F that is not reachable in < k steps, check if it’s reachable in k steps.

R0 R1 R2 T T T

Ri valid up to i 1-step backward search learn and refine

i

all the way: reachable unreachable: learn learned fact valid up to k

slide-46
SLIDE 46

Property-Directed k-Induction

k-step reachability

Reachability in k steps

Given F that is not reachable in < k steps, check if it’s reachable in k steps.

R0 R1 R2 T T T

Ri valid up to i 1-step backward search learn and refine

i

all the way: reachable unreachable: learn learned fact valid up to k

slide-47
SLIDE 47

Property-Directed k-Induction

k-step reachability

Reachability in k steps

Given F that is not reachable in < k steps, check if it’s reachable in k steps.

R0 R1 R2 T T T

Ri valid up to i 1-step backward search learn and refine Ri all the way: reachable unreachable: learn learned fact valid up to k

slide-48
SLIDE 48

Property-Directed k-Induction

k-step reachability

Reachability in k steps

Given F that is not reachable in < k steps, check if it’s reachable in k steps.

R0 R1 R2 T T T

Ri valid up to i 1-step backward search learn and refine Ri all the way: reachable unreachable: learn learned fact valid up to k

slide-49
SLIDE 49

Property-Directed k-Induction

k-step reachability

Reachability in k steps

Given F that is not reachable in < k steps, check if it’s reachable in k steps.

R0 R1 R2 T T T

Ri valid up to i 1-step backward search learn and refine Ri all the way: reachable unreachable: learn learned fact valid up to k

slide-50
SLIDE 50

Property-Directed k-Induction

k-step reachability

Reachability in k steps

Given F that is not reachable in < k steps, check if it’s reachable in k steps.

R0 R1 R2 T T T

Ri valid up to i 1-step backward search learn and refine Ri all the way: reachable unreachable: learn learned fact valid up to k

slide-51
SLIDE 51

Property-Directed k-Induction

main procedure

Require: S = ⟨I, T⟩ and I ⇒ P

1 function PD-KIND(S, P) 2

n ← 0

3

F ← {(P, ¬P)}

4

loop

5

pick k-induction depth 1 ≤ k ≤ n + 1

6

⟨F, G, np⟩ ← PUSH(S, F, P, n, k)

7

if P marked invalid then return invalid

8

if F = G then return valid

9

n ← np

10

F ← G

Setup

single reasoning frame reasoning index n

  • bligations FABS FCEX

FABS is valid up to n FCEX P, FABS refutes FCEX

Initially

P is valid up to n P P, P refutes P

slide-52
SLIDE 52

Property-Directed k-Induction

main procedure

Require: S = ⟨I, T⟩ and I ⇒ P

1 function PD-KIND(S, P) 2

n ← 0

3

F ← {(P, ¬P)}

4

loop

5

pick k-induction depth 1 ≤ k ≤ n + 1

6

⟨F, G, np⟩ ← PUSH(S, F, P, n, k)

7

if P marked invalid then return invalid

8

if F = G then return valid

9

n ← np

10

F ← G

Setup

single reasoning frame F reasoning index n

  • bligations FABS FCEX

FABS is valid up to n FCEX P, FABS refutes FCEX

Initially

P is valid up to n P P, P refutes P

slide-53
SLIDE 53

Property-Directed k-Induction

main procedure

Require: S = ⟨I, T⟩ and I ⇒ P

1 function PD-KIND(S, P) 2

n ← 0

3

F ← {(P, ¬P)}

4

loop

5

pick k-induction depth 1 ≤ k ≤ n + 1

6

⟨F, G, np⟩ ← PUSH(S, F, P, n, k)

7

if P marked invalid then return invalid

8

if F = G then return valid

9

n ← np

10

F ← G

Setup

single reasoning frame F reasoning index n

  • bligations FABS FCEX

FABS is valid up to n FCEX P, FABS refutes FCEX

Initially

P is valid up to n P P, P refutes P

slide-54
SLIDE 54

Property-Directed k-Induction

main procedure

Require: S = ⟨I, T⟩ and I ⇒ P

1 function PD-KIND(S, P) 2

n ← 0

3

F ← {(P, ¬P)}

4

loop

5

pick k-induction depth 1 ≤ k ≤ n + 1

6

⟨F, G, np⟩ ← PUSH(S, F, P, n, k)

7

if P marked invalid then return invalid

8

if F = G then return valid

9

n ← np

10

F ← G

Setup

single reasoning frame F reasoning index n

  • bligations (FABS, FCEX) ∈ F

FABS is valid up to n FCEX P, FABS refutes FCEX

Initially

P is valid up to n P P, P refutes P

slide-55
SLIDE 55

Property-Directed k-Induction

main procedure

Require: S = ⟨I, T⟩ and I ⇒ P

1 function PD-KIND(S, P) 2

n ← 0

3

F ← {(P, ¬P)}

4

loop

5

pick k-induction depth 1 ≤ k ≤ n + 1

6

⟨F, G, np⟩ ← PUSH(S, F, P, n, k)

7

if P marked invalid then return invalid

8

if F = G then return valid

9

n ← np

10

F ← G

Setup

single reasoning frame F reasoning index n

  • bligations (FABS, FCEX) ∈ F

FABS is valid up to n FCEX P, FABS refutes FCEX

Initially

P is valid up to n P P, P refutes P

slide-56
SLIDE 56

Property-Directed k-Induction

main procedure

Require: S = ⟨I, T⟩ and I ⇒ P

1 function PD-KIND(S, P) 2

n ← 0

3

F ← {(P, ¬P)}

4

loop

5

pick k-induction depth 1 ≤ k ≤ n + 1

6

⟨F, G, np⟩ ← PUSH(S, F, P, n, k)

7

if P marked invalid then return invalid

8

if F = G then return valid

9

n ← np

10

F ← G

Setup

single reasoning frame F reasoning index n

  • bligations (FABS, FCEX) ∈ F

FABS is valid up to n FCEX ¬P, FABS refutes FCEX

Initially

P is valid up to n P P, P refutes P

slide-57
SLIDE 57

Property-Directed k-Induction

main procedure

Require: S = ⟨I, T⟩ and I ⇒ P

1 function PD-KIND(S, P) 2

n ← 0

3

F ← {(P, ¬P)}

4

loop

5

pick k-induction depth 1 ≤ k ≤ n + 1

6

⟨F, G, np⟩ ← PUSH(S, F, P, n, k)

7

if P marked invalid then return invalid

8

if F = G then return valid

9

n ← np

10

F ← G

Setup

single reasoning frame F reasoning index n

  • bligations (FABS, FCEX) ∈ F

FABS is valid up to n FCEX ¬P, FABS refutes FCEX

Initially

P is valid up to n = 0 ¬P ¬P, P refutes ¬P

slide-58
SLIDE 58

Property-Directed k-Induction

main procedure

Require: S = ⟨I, T⟩ and I ⇒ P

1 function PD-KIND(S, P) 2

n ← 0

3

F ← {(P, ¬P)}

4

loop

5

pick k-induction depth 1 ≤ k ≤ n + 1

6

⟨F, G, np⟩ ← PUSH(S, F, P, n, k)

7

if P marked invalid then return invalid

8

if F = G then return valid

9

n ← np

10

F ← G

Setup

single reasoning frame F reasoning index n

  • bligations (FABS, FCEX) ∈ F

FABS is valid up to n FCEX ¬P, FABS refutes FCEX

Initially

P is valid up to n P P, P refutes P

slide-59
SLIDE 59

Property-Directed k-Induction

main procedure

Require: S = ⟨I, T⟩ and I ⇒ P

1 function PD-KIND(S, P) 2

n ← 0

3

F ← {(P, ¬P)}

4

loop

5

pick k-induction depth 1 ≤ k ≤ n + 1

6

⟨F, G, np⟩ ← PUSH(S, F, P, n, k)

7

if P marked invalid then return invalid

8

if F = G then return valid

9

n ← np

10

F ← G

Setup

single reasoning frame F reasoning index n

  • bligations (FABS, FCEX) ∈ F

FABS is valid up to n FCEX ¬P, FABS refutes FCEX

Initially

P is valid up to n P P, P refutes P

slide-60
SLIDE 60

Property-Directed k-Induction

main procedure

Require: S = ⟨I, T⟩ and I ⇒ P

1 function PD-KIND(S, P) 2

n ← 0

3

F ← {(P, ¬P)}

4

loop

5

pick k-induction depth 1 ≤ k ≤ n + 1

6

⟨F, G, np⟩ ← PUSH(S, F, P, n, k)

7

if P marked invalid then return invalid

8

if F = G then return valid

9

n ← np

10

F ← G

Setup

single reasoning frame F reasoning index n

  • bligations (FABS, FCEX) ∈ F

FABS is valid up to n FCEX ¬P, FABS refutes FCEX

Initially

P is valid up to n P P, P refutes P

slide-61
SLIDE 61

Property-Directed k-Induction

main procedure

Require: S = ⟨I, T⟩ and I ⇒ P

1 function PD-KIND(S, P) 2

n ← 0

3

F ← {(P, ¬P)}

4

loop

5

pick k-induction depth 1 ≤ k ≤ n + 1

6

⟨F, G, np⟩ ← PUSH(S, F, P, n, k)

7

if P marked invalid then return invalid

8

if F = G then return valid

9

n ← np

10

F ← G

Setup

single reasoning frame F reasoning index n

  • bligations (FABS, FCEX) ∈ F

FABS is valid up to n FCEX ¬P, FABS refutes FCEX

Initially

P is valid up to n P P, P refutes P

slide-62
SLIDE 62

Property-Directed k-Induction

main procedure

Require: S = ⟨I, T⟩ and I ⇒ P

1 function PD-KIND(S, P) 2

n ← 0

3

F ← {(P, ¬P)}

4

loop

5

pick k-induction depth 1 ≤ k ≤ n + 1

6

⟨F, G, np⟩ ← PUSH(S, F, P, n, k)

7

if P marked invalid then return invalid

8

if F = G then return valid

9

n ← np

10

F ← G

Setup

single reasoning frame F reasoning index n

  • bligations (FABS, FCEX) ∈ F

FABS is valid up to n FCEX ¬P, FABS refutes FCEX

Initially

P is valid up to n P P, P refutes P

slide-63
SLIDE 63

Property-Directed k-Induction

main procedure

F F F

valid in frames 0, ..., n induction check T

F F F

slide-64
SLIDE 64

Property-Directed k-Induction

main procedure

F F F

valid in frames 0, ..., n k-induction check T F T F ... T F T

F F F

slide-65
SLIDE 65

Property-Directed k-Induction

main procedure

F F F

valid in frames 0, ..., n k-induction check T F T F ... T F T

F F F

slide-66
SLIDE 66

Property-Directed k-Induction

main procedure

F

valid in frames 0, ..., n n+1, ..., npF

slide-67
SLIDE 67

Property-Directed k-Induction

main procedure

F

valid in frames 0, ..., n

G

n+1, ..., npF

slide-68
SLIDE 68

Property-Directed k-induction

the PUSH procedure

Pick an obligation (FABS, FCEX) ∈ F

T T FABS T T FCEX

slide-69
SLIDE 69

Property-Directed k-induction

the PUSH procedure

Pick an obligation (FABS, FCEX) ∈ F

F ∧ T ∧ . . . ∧ F ∧ T ⇒ FABS T T FCEX

Is FABS k-inductive relative to F?

slide-70
SLIDE 70

Property-Directed k-induction

the PUSH procedure

Pick an obligation (FABS, FCEX) ∈ F

F ∧ T ∧ . . . ∧ F ∧ T ⇒ FABS T T FCEX

Is FABS k-inductive relative to F? If yes, push it

slide-71
SLIDE 71

Property-Directed k-induction

the PUSH procedure

Pick an obligation (FABS, FCEX) ∈ F

F ∧ T ∧ . . . ∧ F ∧ T ⇒ FABS T T FCEX

Is FABS k-inductive relative to F? If no, get the generalization GCTI of the CTI

slide-72
SLIDE 72

Property-Directed k-induction

the PUSH procedure

Pick an obligation (FABS, FCEX) ∈ F

T T FABS F ∧ T ∧ . . . ∧ F ∧ T ∧ FCEX

Can we get to FCEX? If yes, then generalize to GCEX If GCEX reachable, then we have a counter-example to P If GCEX not reachable, learn lemma to eliminate GCEX

slide-73
SLIDE 73

Property-Directed k-induction

the PUSH procedure

Pick an obligation (FABS, FCEX) ∈ F

T T FABS F ∧ T ∧ . . . ∧ F ∧ T ∧ FCEX

Can we get to FCEX? If yes, then generalize to GCEX If GCEX reachable, then we have a counter-example to P If GCEX not reachable, learn lemma to eliminate GCEX

slide-74
SLIDE 74

Property-Directed k-induction

the PUSH procedure

Pick an obligation (FABS, FCEX) ∈ F

F ∧ T ∧ . . . ∧ F ∧ T ⇒ FABS F ∧ T ∧ . . . ∧ F ∧ T ∧ FCEX

We have a generalization GCTI of the CTI, and can not get to FCEX If GCTI reachable, weaken FABS to FCEX If GCTI not reachable, learn lemma and strengthen FABS

slide-75
SLIDE 75

Property-Directed k-induction

the PUSH procedure

Pick an obligation (FABS, FCEX) ∈ F

F ∧ T ∧ . . . ∧ F ∧ T ⇒ FABS F ∧ T ∧ . . . ∧ F ∧ T ∧ FCEX

We have a generalization GCTI of the CTI, and can not get to FCEX If GCTI reachable, weaken FABS to ¬FCEX If GCTI not reachable, learn lemma and strengthen FABS

slide-76
SLIDE 76

Outline

1

Introduction

2

Property-Directed k-Induction

3

Experimental Evaluation

slide-77
SLIDE 77

Experimental Evaluation

  • verall

Z3 SPACER NUXMV PD-KIND problem set

  • ⊤/⊥

time

  • ⊤/⊥

time

  • ⊤/⊥

time

  • ⊤/⊥

time approximate-agreement (9) 9 8/1 213 7 6/1 1150 9 8/1 2174 9 8/1 164 azadmanesh-kieckhafer (20) 20 17/3 3404 20 17/3 4678 20 17/3 294 20 17/3 192 cav12 (99) 69 48/21 2102 71 49/22 3529 72 50/22 7443 71 49/22 4990 conc (6) 4 4/0 128 4 4/0 655 6 6/0 421 4 4/0 270 ctigar (110) 64 44/20 1683 72 52/20 4249 76 56/20 1342 77 57/20 2823 hacms (5) 1 1/0 11 1 1/0 4 4 3/1 388 5 3/2 1661 lustre (790) 757 421/336 1888 763 427/336 2263 760 424/336 7660 774 438/336 3494

  • ral-messages (9)

9 7/2 16 9 7/2 44 9 7/2 161 9 7/2 2 tta-startup (3) 1 1/0 9 1 1/0 8 1 1/0 17 1 1/0 8 tte-synchro (6) 6 3/3 969 6 3/3 445 5 2/3 405 6 3/3 21 unified-approx (11) 8 5/3 2928 11 8/3 589 11 8/3 139 11 8/3 217 948 559/389 13351 965 575/390 17614 973 582/391 20444 987 595/392 13842

timeout of 20 minutes, Z3 [HB12], NUXMV [CGMT14], SPACER [KGC14]

slide-78
SLIDE 78

Experimental Evaluation

as a variant of IC3/PDR

Z3 SPACER NUXMV PD-KIND∞ PD-KIND1 problem set

  • ⊤/⊥

time

  • ⊤/⊥

time

  • ⊤/⊥

time

  • ⊤/⊥

time

  • ⊤/⊥

time approximate-agreement (9) 9 8/1 213 7 6/1 1150 9 8/1 2174 9 8/1 164 9 8/1 155 azadmanesh-kieckhafer (20) 20 17/3 3404 20 17/3 4678 20 17/3 294 20 17/3 192 20 17/3 107 cav12 (99) 69 48/21 2102 71 49/22 3529 72 50/22 7443 71 49/22 4990 74 50/24 6404 conc (6) 4 4/0 128 4 4/0 655 6 6/0 421 4 4/0 270 5 5/0 164 ctigar (110) 64 44/20 1683 72 52/20 4249 76 56/20 1342 77 57/20 2823 73 53/20 4920 hacms (5) 1 1/0 11 1 1/0 4 4 3/1 388 5 3/2 1661 1 1/0 2 lustre (790) 757 421/336 1888 763 427/336 2263 760 424/336 7660 774 438/336 3494 769 431/338 2019

  • ral-messages (9)

9 7/2 16 9 7/2 44 9 7/2 161 9 7/2 2 9 7/2 74 tta-startup (3) 1 1/0 9 1 1/0 8 1 1/0 17 1 1/0 8 2 1/1 742 tte-synchro (6) 6 3/3 969 6 3/3 445 5 2/3 405 6 3/3 21 6 3/3 60 unified-approx (11) 8 5/3 2928 11 8/3 589 11 8/3 139 11 8/3 217 11 8/3 158 948 559/389 13351 965 575/390 17614 973 582/391 20444 987 595/392 13842 979 584/395 14805

timeout of 20 minutes, Z3 [HB12], NUXMV [CGMT14], SPACER [KGC14]

slide-79
SLIDE 79

Experimental Evaluation

  • verall

Efgective and robust on real-world problems Good at both proving properties and finding bugs k-induction: can prove properties using a smaller strengthening k-induction: the only engine that can prove all k-inductive properties k-induction: efgective bug-finder due to the longer steps of k-induction

slide-80
SLIDE 80

Experimental Evaluation

k-induction

slide-81
SLIDE 81

Summary

New method for infinite-state systems: variant of IC3/PDR based on k-induction efgective in practice: proofs and bugs focuses on induction rather than bugs no SMT query lefu behind more powerful than k-induction modular: tunable, amenable to heuristics implemented in SALLY (fork me at GitHub)

slide-82
SLIDE 82

References I

[BCCZ99] Armin Biere, Alessandro Cimatti, Edmund Clarke, and Yunshan Zhu. Symbolic model checking without BDDs. Tools and Algorithms for the Construction and Analysis of Systems, pages 193–207, 1999. [Bra11] Aaron R Bradley. SAT-based model checking without unrolling. In Verification, Model Checking, and Abstract Interpretation, pages 70–87, 2011. [CG12] Alessandro Cimatti and Alberto Griggio. Sofuware model checking via IC3. In Computer Aided Verification, pages 277–293, 2012. [CGMT14] Alessandro Cimatti, Alberto Griggio, Sergio Mover, and Stefano Tonetta. IC3 modulo theories via implicit predicate abstraction. In Tools and Algorithms for the Construction and Analysis of Systems, pages 46–61. 2014. [HB12] Kryštof Hoder and Nikolaj Bjørner. Generalized property directed reachability. In Theory and Applications of Satisfiability Testing, pages 157–171. 2012. [KGC14] Anvesh Komuravelli, Arie Gurfinkel, and Sagar Chaki. SMT-based model checking for recursive programs. In Computer Aided Verification, pages 17–34, 2014.

slide-83
SLIDE 83

References II

[McM03] Kenneth L McMillan. Interpolation and SAT-based model checking. In International Conference on Computer Aided Verification, pages 1–13, 2003. [SSS00] Mary Sheeran, Satnam Singh, and Gunnar Stålmarck. Checking safety properties using induction and a SAT-solver. In Formal Methods in Computer-Aided Design, pages 127–144, 2000.