Tree Interpolation in Vampire R egis Blanc (EPFL) Ashutosh Gupta - - PowerPoint PPT Presentation

tree interpolation in vampire
SMART_READER_LITE
LIVE PREVIEW

Tree Interpolation in Vampire R egis Blanc (EPFL) Ashutosh Gupta - - PowerPoint PPT Presentation

Tree Interpolation in Vampire R egis Blanc (EPFL) Ashutosh Gupta (IST Austria) Laura Kov acs (Chalmers) Bernhard Kragl (TU Vienna) Interpolation Craig/Binary Interpolant A B I 2 / 11 Interpolation Craig/Binary


slide-1
SLIDE 1

Tree Interpolation in Vampire

R´ egis Blanc (EPFL) Ashutosh Gupta (IST Austria) Laura Kov´ acs (Chalmers) Bernhard Kragl (TU Vienna)

slide-2
SLIDE 2

Interpolation

Craig/Binary Interpolant A ∧ B → ⊥ I

2 / 11

slide-3
SLIDE 3

Interpolation

Craig/Binary Interpolant A ∧ B → ⊥ I

2 / 11

slide-4
SLIDE 4

Interpolation

Craig/Binary Interpolant A ∧ B → ⊥ I

2 / 11

slide-5
SLIDE 5

Interpolation

Craig/Binary Interpolant A ∧ B → ⊥ I

I ∈ L(A) ∩ L(B)

2 / 11

slide-6
SLIDE 6

Interpolation

Craig/Binary Interpolant A ∧ B → ⊥ I

I ∈ L(A) ∩ L(B)

Sequence Interpolant A1 ∧ A2 ∧ A3 ∧ . . . ∧ An → ⊥

2 / 11

slide-7
SLIDE 7

Interpolation

Craig/Binary Interpolant A ∧ B → ⊥ I

I ∈ L(A) ∩ L(B)

Sequence Interpolant A1 ∧ A2 ∧ A3 ∧ . . . ∧ An → ⊥ I1 I2 . . . In−1

2 / 11

slide-8
SLIDE 8

Interpolation

Craig/Binary Interpolant A ∧ B → ⊥ I

I ∈ L(A) ∩ L(B)

Sequence Interpolant A1 ∧ A2 ∧ A3 ∧ . . . ∧ An → ⊥ I1 I2 . . . In−1

2 / 11

slide-9
SLIDE 9

Interpolation

Craig/Binary Interpolant A ∧ B → ⊥ I

I ∈ L(A) ∩ L(B)

Sequence Interpolant A1 ∧ A2 ∧ A3 ∧ . . . ∧ An → ⊥ → I1 I2 . . . In−1

2 / 11

slide-10
SLIDE 10

Interpolation

Craig/Binary Interpolant A ∧ B → ⊥ I

I ∈ L(A) ∩ L(B)

Sequence Interpolant A1 ∧ A2 ∧ A3 ∧ . . . ∧ An → ⊥ → → I1 I2 . . . In−1

2 / 11

slide-11
SLIDE 11

Interpolation

Craig/Binary Interpolant A ∧ B → ⊥ I

I ∈ L(A) ∩ L(B)

Sequence Interpolant A1 ∧ A2 ∧ A3 ∧ . . . ∧ An → ⊥ → → → I1 I2 . . . In−1

2 / 11

slide-12
SLIDE 12

Interpolation

Craig/Binary Interpolant A ∧ B → ⊥ I

I ∈ L(A) ∩ L(B)

Sequence Interpolant A1 ∧ A2 ∧ A3 ∧ . . . ∧ An → ⊥ → → → I1 I2 . . . In−1

I1 ∈ L(A1) ∩ L(A2, . . . , An) I2 ∈ L(A1, A2) ∩ L(A3, . . . , An)In−1 ∈ L(A1, . . . , An−1) ∩ L(An)

2 / 11

slide-13
SLIDE 13

Tree interpolation

A0 ∧ A1 ∧ A2 ∧ A3 ∧ A4 → ⊥ A4 A3 A2 A1 A0

3 / 11

slide-14
SLIDE 14

Tree interpolation

A0 ∧ A1 ∧ A2 ∧ A3 ∧ A4 → ⊥ A4 I4 A3 I3 A2 I2 A1 I1 A0 ⊥

3 / 11

slide-15
SLIDE 15

Tree interpolation

A0 ∧ A1 ∧ A2 ∧ A3 ∧ A4 → ⊥ A4 I4 A3 I3 A2 I2 A1 I1 A0 ⊥ node ∧ child Itps → Itp A4 → I4 A3 → I3 A1 → I1 A2 ∧ I4 ∧ I3 → I2 A0 ∧ I2 ∧ I1 → ⊥

3 / 11

slide-16
SLIDE 16

Tree interpolation

A0 ∧ A1 ∧ A2 ∧ A3 ∧ A4 → ⊥ A4 I4 A3 I3 A2 I2 A1 I1 A0 ⊥ node ∧ child Itps → Itp A4 → I4 A3 → I3 A1 → I1 A2 ∧ I4 ∧ I3 → I2 A0 ∧ I2 ∧ I1 → ⊥ Language restrictions

I4 ∈ L(A4) ∩ L(A3, A2, A1, A0) I3 ∈ L(A3) ∩ L(A4, A2, A1, A0) I2 ∈ L(A4, A3, A2) ∩ L(A1, A0) I1 ∈ L(A1) ∩ L(A3, A2, A1, A0)

3 / 11

slide-17
SLIDE 17

Related Work

Solving recursion-free Horn clauses

[Gupta, Popeea, Rybalchenko POPL ’11]

Interpolants for procedure summarization

[McMillan, Rybalchenko MSR-TR’13]

Generalized property directed reachability

[Hoder, Bjørner SAT’12]

Interpolation and Horn Clauses

[Hojjat, R¨ ummer, Kuncak CAV’13]

Nested Interpolants

[Heizmann, Hoenicke, Podelski POPL ’10] and many more ...

4 / 11

slide-18
SLIDE 18

Important questions

Do interpolants always exist?

Yes, in first-order logic (also with respect to a theory)

Is a logic closed under interpolation? (e.g. quantifier free fragments)

Not necessarily, consider a = 2b + 1 ∧ a = 2c over Z

5 / 11

slide-19
SLIDE 19

Important questions

Do interpolants always exist?

Yes, in first-order logic (also with respect to a theory)

Is a logic closed under interpolation? (e.g. quantifier free fragments)

Not necessarily, consider a = 2b + 1 ∧ a = 2c over Z

How to interpolate efficiently? How to obtain “good” interpolants?

5 / 11

slide-20
SLIDE 20

Proof-based interpolation

Refutations (should) capture the cause of unsatisfiability Extensive literature on interpolant extraction for various theories

☞ Notion of local proof

6 / 11

slide-21
SLIDE 21

Proof-based interpolation

Refutations (should) capture the cause of unsatisfiability Extensive literature on interpolant extraction for various theories

☞ Notion of local proof

Consider a = b ∧ b = c and c = d ∧ a = d

6 / 11

slide-22
SLIDE 22

Proof-based interpolation

Refutations (should) capture the cause of unsatisfiability Extensive literature on interpolant extraction for various theories

☞ Notion of local proof

Consider a = b ∧ b = c and c = d ∧ a = d

a = b b = c c = d b = d a = b a = d ⊥

6 / 11

slide-23
SLIDE 23

Proof-based interpolation

Refutations (should) capture the cause of unsatisfiability Extensive literature on interpolant extraction for various theories

☞ Notion of local proof

Consider a = b ∧ b = c and c = d ∧ a = d

a = b b = c c = d b = d a = b a = d ⊥ a = b b = c a = c c = d a = d a = d ⊥

6 / 11

slide-24
SLIDE 24

Proof-based interpolation

Refutations (should) capture the cause of unsatisfiability Extensive literature on interpolant extraction for various theories

☞ Notion of local proof

Consider a = b ∧ b = c and c = d ∧ a = d

a = b b = c c = d b = d a = b a = d ⊥ a = b b = c a = c c = d a = d a = d ⊥

interpolant: a = c

6 / 11

slide-25
SLIDE 25

Vampire

Vampire is one of the best first-order theorem provers Recent developments/extensions:

Invariant generation [FASE’09, MICAI’11] Interpolation and Symbol Elimination [CADE’09, IJCAR’10] Interpolant minimization & Theory independent proof localization [POPL ’12] Incremental tree interpolation [today]

7 / 11

slide-26
SLIDE 26

Incremental tree interpolation

Visit tree nodes in topological order Per node: partition the tree and compute binary interpolant Crucial: reuse previously computed interpolants

L(X1, X2, X3, X4, X5) ∩ {a, b, c, d} = ∅

a = b ∧ X1 b = c ∧ X2 X3 a = d ∧ X4 c = d ∧ X5

8 / 11

slide-27
SLIDE 27

Incremental tree interpolation

Visit tree nodes in topological order Per node: partition the tree and compute binary interpolant Crucial: reuse previously computed interpolants

L(X1, X2, X3, X4, X5) ∩ {a, b, c, d} = ∅

a = b ∧ X1 b = c ∧ X2 X3 a = d ∧ X4 c = d ∧ X5

8 / 11

slide-28
SLIDE 28

Incremental tree interpolation

Visit tree nodes in topological order Per node: partition the tree and compute binary interpolant Crucial: reuse previously computed interpolants

L(X1, X2, X3, X4, X5) ∩ {a, b, c, d} = ∅

a = b ∧ X1 a = b b = c ∧ X2 X3 a = d ∧ X4 c = d ∧ X5

8 / 11

slide-29
SLIDE 29

Incremental tree interpolation

Visit tree nodes in topological order Per node: partition the tree and compute binary interpolant Crucial: reuse previously computed interpolants

L(X1, X2, X3, X4, X5) ∩ {a, b, c, d} = ∅

a = b ∧ X1 a = b b = c ∧ X2 X3 a = d ∧ X4 c = d ∧ X5

8 / 11

slide-30
SLIDE 30

Incremental tree interpolation

Visit tree nodes in topological order Per node: partition the tree and compute binary interpolant Crucial: reuse previously computed interpolants

L(X1, X2, X3, X4, X5) ∩ {a, b, c, d} = ∅

a = b ∧ X1 a = b b = c ∧ X2 b = c X3 a = d ∧ X4 c = d ∧ X5

8 / 11

slide-31
SLIDE 31

Incremental tree interpolation

Visit tree nodes in topological order Per node: partition the tree and compute binary interpolant Crucial: reuse previously computed interpolants

L(X1, X2, X3, X4, X5) ∩ {a, b, c, d} = ∅

a = b ∧ X1 a = b b = c ∧ X2 b = c X3 a = d ∧ X4 c = d ∧ X5

8 / 11

slide-32
SLIDE 32

Incremental tree interpolation

Visit tree nodes in topological order Per node: partition the tree and compute binary interpolant Crucial: reuse previously computed interpolants

L(X1, X2, X3, X4, X5) ∩ {a, b, c, d} = ∅

a = b ∧ X1 a = b b = c ∧ X2 b = c X3 a = c a = d ∧ X4 c = d ∧ X5

8 / 11

slide-33
SLIDE 33

Incremental tree interpolation

Visit tree nodes in topological order Per node: partition the tree and compute binary interpolant Crucial: reuse previously computed interpolants

L(X1, X2, X3, X4, X5) ∩ {a, b, c, d} = ∅

a = b ∧ X1 a = b b = c ∧ X2 b = c X3 a = c a = d ∧ X4 c = d ∧ X5

8 / 11

slide-34
SLIDE 34

Incremental tree interpolation

Visit tree nodes in topological order Per node: partition the tree and compute binary interpolant Crucial: reuse previously computed interpolants

L(X1, X2, X3, X4, X5) ∩ {a, b, c, d} = ∅

a = b ∧ X1 a = b b = c ∧ X2 b = c X3 a = c a = d ∧ X4 a = d c = d ∧ X5

8 / 11

slide-35
SLIDE 35

Incremental tree interpolation

Visit tree nodes in topological order Per node: partition the tree and compute binary interpolant Crucial: reuse previously computed interpolants

L(X1, X2, X3, X4, X5) ∩ {a, b, c, d} = ∅

a = b ∧ X1 a = b b = c ∧ X2 b = c X3 a = c a = d ∧ X4 a = d c = d ∧ X5 ⊥

8 / 11

slide-36
SLIDE 36

Tool usage

n1 : a = b n2 : b = c n3 : ⊤ n4 : a = d n5 : c = d

9 / 11

slide-37
SLIDE 37

Tool usage

n1 : a = b n2 : b = c n3 : ⊤ n4 : a = d n5 : c = d Tree interpolation problem in SMT-LIB 1.2 syntax using iZ3 convention ... :assumption (implies (and (= a b) ) n1 ) :assumption (implies (and (= b c) ) n2 ) :assumption (implies (and n1 n2 true ) n3 ) :assumption (implies (and (not (= a d)) ) n4 ) :formula (implies (and n3 n4 (= c d) ) false )

9 / 11

slide-38
SLIDE 38

Tool usage

n1 : a = b n2 : b = c n3 : ⊤ n4 : a = d n5 : c = d Tree interpolation problem in SMT-LIB 1.2 syntax using iZ3 convention ... :assumption (implies (and (= a b) ) n1 ) :assumption (implies (and (= b c) ) n2 ) :assumption (implies (and n1 n2 true ) n3 ) :assumption (implies (and (not (= a d)) ) n4 ) :formula (implies (and n3 n4 (= c d) ) false )

9 / 11

slide-39
SLIDE 39

Tool usage

n1 : a = b n2 : b = c n3 : ⊤ n4 : a = d n5 : c = d > vampire --show_interpolant tree x.smt Parsing SMTLIB file: x.smt Parsing terminated. Building Tree. Building Tree terminated. n1: (= a b) n2: (= b c) n3: (= a c) n4: (not (= a d)) Tree interpolation problem in SMT-LIB 1.2 syntax using iZ3 convention ... :assumption (implies (and (= a b) ) n1 ) :assumption (implies (and (= b c) ) n2 ) :assumption (implies (and n1 n2 true ) n3 ) :assumption (implies (and (not (= a d)) ) n4 ) :formula (implies (and n3 n4 (= c d) ) false )

9 / 11

slide-40
SLIDE 40

Evaluation

Quantifier-free benchmarks

175 QF AUFLIA problems from model checking Windows device drivers (90 nodes on average)

Quantified benchmarks

4 small AUFLIA problems

10 / 11

slide-41
SLIDE 41

Evaluation

Quantifier-free benchmarks

175 QF AUFLIA problems from model checking Windows device drivers (90 nodes on average)

Quantified benchmarks

4 small AUFLIA problems

Vampire/Vampire 101 141 Vampire/Z3 113 iZ3 175

10 / 11

slide-42
SLIDE 42

Evaluation

Quantifier-free benchmarks

175 QF AUFLIA problems from model checking Windows device drivers (90 nodes on average)

Quantified benchmarks

4 small AUFLIA problems

Vampire/Vampire 101 141 Vampire/Z3 113 iZ3 175

10 / 11

slide-43
SLIDE 43

Evaluation

Quantifier-free benchmarks

175 QF AUFLIA problems from model checking Windows device drivers (90 nodes on average)

Quantified benchmarks

4 small AUFLIA problems

Vampire/Vampire 101 141 Vampire/Z3 113 iZ3 175 b > a c > b ∧ A[c] = 5 sorted array(A) ∧ A[a] = 10

10 / 11

slide-44
SLIDE 44

Evaluation

Quantifier-free benchmarks

175 QF AUFLIA problems from model checking Windows device drivers (90 nodes on average)

Quantified benchmarks

4 small AUFLIA problems

Vampire/Vampire 101 141 Vampire/Z3 113 iZ3 175 b > a b > a c > b ∧ A[c] = 5 ¬∀i A[i] ≤ 10 → i ≤ b sorted array(A) ∧ A[a] = 10 ⊥

10 / 11

slide-45
SLIDE 45

Evaluation

Quantifier-free benchmarks

175 QF AUFLIA problems from model checking Windows device drivers (90 nodes on average)

Quantified benchmarks

4 small AUFLIA problems

Vampire/Vampire 101 141 Vampire/Z3 113 iZ3 175 Vampire/Vampire 4 iZ3 1

10 / 11

slide-46
SLIDE 46

Conclusion

Tree interpolation in Vampire Strength: reasoning with quantifiers Challenges: Theory specific reasoning Visit, try, utilize! http://vprover.org/tree_itp

11 / 11

slide-47
SLIDE 47

Conclusion

Tree interpolation in Vampire Strength: reasoning with quantifiers Challenges: Theory specific reasoning Visit, try, utilize! http://vprover.org/tree_itp

Thank you!

11 / 11