Unification with Abstraction and Theory Instantiation in - - PowerPoint PPT Presentation

unification with abstraction and theory instantiation in
SMART_READER_LITE
LIVE PREVIEW

Unification with Abstraction and Theory Instantiation in - - PowerPoint PPT Presentation

Unification with Abstraction and Theory Instantiation in Saturation-based Reasoning Giles Reger 1 , Martin Suda 2 , and Andrei Voronkov 1 , 2 , 3 1 School of Computer Science, University of Manchester, UK 2 TU Wien, Vienna, Austria 3 Easychair


slide-1
SLIDE 1

1/32

Unification with Abstraction and Theory Instantiation in Saturation-based Reasoning

Giles Reger1, Martin Suda2, and Andrei Voronkov1,2,3

1School of Computer Science, University of Manchester, UK 2TU Wien, Vienna, Austria 3Easychair

Matryoshka 2018

slide-2
SLIDE 2

1/32

This is a (slightly) extended version of the talk given at TACAS 2018 Thank you to Martin Suda for preparing the slides I also stole some from Martin Riener All mistakes are my own

slide-3
SLIDE 3

2/32

Introduction What is Vampire:

Automatic Theorem Prover (ATP) for first-order logic Main paradigm: superposition calculus + saturation Also:

efficient term indexing use of incomplete strategies strategy scheduling and theory reasoning

slide-4
SLIDE 4

2/32

Introduction What is Vampire:

Automatic Theorem Prover (ATP) for first-order logic Main paradigm: superposition calculus + saturation Also:

efficient term indexing use of incomplete strategies strategy scheduling and theory reasoning

Reasoning with Theories huge application demand:

program analysis, software verification, . . .

inherently hard, especially with quantifiers ! Now available! http://vprover.github.io (License applies)

slide-5
SLIDE 5

3/32

Competitions

Regular successful participation at the CASC competition Since 2016 also participating in SMT-COMP But it would be nice to get more ‘real’ benchmarks to demonstrate that these results generalise – SMT-COMP is better than CASC for

  • this. Submit your problems to the libraries (if allowed)!
slide-6
SLIDE 6

4/32

Reasoning with Quantifiers and Theories

Two Dimensions of Complexity

SMT

∀∃

Z/R: +-*/ ATP

E-matching

...

theory axioms

... select/store gnd AVATAR

mod

Theories DANGER ZONE

slide-7
SLIDE 7

4/32

Reasoning with Quantifiers and Theories

Two Dimensions of Complexity

∀∃

Z/R: +-*/ select/store gnd ATP

slide-8
SLIDE 8

4/32

Reasoning with Quantifiers and Theories

Two Dimensions of Complexity

∀∃

Z/R: +-*/ select/store gnd ATP SMT

slide-9
SLIDE 9

4/32

Reasoning with Quantifiers and Theories

Two Dimensions of Complexity

select/store Z/R: +-*/

∀∃

gnd ATP SMT E SPASS VAMPIRE ... CVC4 veriT Z3 ...

slide-10
SLIDE 10

4/32

Reasoning with Quantifiers and Theories

Two Dimensions of Complexity

∀∃

Z/R: +-*/ select/store gnd ATP SMT

slide-11
SLIDE 11

4/32

Reasoning with Quantifiers and Theories

Two Dimensions of Complexity

SMT

∀∃

Z/R: +-*/

E-matching

... select/store gnd ATP

slide-12
SLIDE 12

4/32

Reasoning with Quantifiers and Theories

Two Dimensions of Complexity

SMT

∀∃

Z/R: +-*/ ATP

E-matching

...

theory axioms

... select/store gnd

slide-13
SLIDE 13

4/32

Reasoning with Quantifiers and Theories

Two Dimensions of Complexity

SMT

∀∃

Z/R: +-*/ ATP

E-matching

...

theory axioms

... select/store gnd AVATAR

mod

Theories

slide-14
SLIDE 14

5/32

Our Paper in One Slide

Contribution 1: Theory Instantiation Rule

slide-15
SLIDE 15

5/32

Our Paper in One Slide

Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause

slide-16
SLIDE 16

5/32

Our Paper in One Slide

Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14x ≃ x2 + 49 ∨ p(x)

slide-17
SLIDE 17

5/32

Our Paper in One Slide

Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14x ≃ x2 + 49 ∨ p(x) = ⇒ p(7)

slide-18
SLIDE 18

5/32

Our Paper in One Slide

Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14x ≃ x2 + 49 ∨ p(x) = ⇒ p(7) by utilising ground SMT solving

slide-19
SLIDE 19

5/32

Our Paper in One Slide

Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14x ≃ x2 + 49 ∨ p(x) = ⇒ p(7) by utilising ground SMT solving (current) limitation: complete theories (e.g. arithmetic)

slide-20
SLIDE 20

5/32

Our Paper in One Slide

Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14x ≃ x2 + 49 ∨ p(x) = ⇒ p(7) by utilising ground SMT solving (current) limitation: complete theories (e.g. arithmetic) Contribution 2: Unification with Abstraction extension of unification that introduces theory constraints

slide-21
SLIDE 21

5/32

Our Paper in One Slide

Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14x ≃ x2 + 49 ∨ p(x) = ⇒ p(7) by utilising ground SMT solving (current) limitation: complete theories (e.g. arithmetic) Contribution 2: Unification with Abstraction extension of unification that introduces theory constraints p(2x) against ¬p(10)

slide-22
SLIDE 22

5/32

Our Paper in One Slide

Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14x ≃ x2 + 49 ∨ p(x) = ⇒ p(7) by utilising ground SMT solving (current) limitation: complete theories (e.g. arithmetic) Contribution 2: Unification with Abstraction extension of unification that introduces theory constraints p(2x) against ¬p(10) = ⇒ 2x ≃ 10

slide-23
SLIDE 23

5/32

Our Paper in One Slide

Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14x ≃ x2 + 49 ∨ p(x) = ⇒ p(7) by utilising ground SMT solving (current) limitation: complete theories (e.g. arithmetic) Contribution 2: Unification with Abstraction extension of unification that introduces theory constraints p(2x) against ¬p(10) = ⇒ 2x ≃ 10 a lazy approach to abstraction

slide-24
SLIDE 24

5/32

Our Paper in One Slide

Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14x ≃ x2 + 49 ∨ p(x) = ⇒ p(7) by utilising ground SMT solving (current) limitation: complete theories (e.g. arithmetic) Contribution 2: Unification with Abstraction extension of unification that introduces theory constraints p(2x) against ¬p(10) = ⇒ 2x ≃ 10 a lazy approach to abstraction new constrains can be often “discharged” by 1.

slide-25
SLIDE 25

6/32

Outline

1

A Brief Introduction to Saturation-Based Proving

2

Previous Methods for Theory Reasoning in Vampire

3

Theory Instantiation and Unification with Abstraction

4

Experimental Results

5

Ongoing and Future Work

slide-26
SLIDE 26

7/32

Theorem Proving Pipeline in One Slide

Standard form of the input: F := (Axiom1 ∧ . . . ∧ Axiomn) → Conjecture

slide-27
SLIDE 27

7/32

Theorem Proving Pipeline in One Slide

Standard form of the input: F := (Axiom1 ∧ . . . ∧ Axiomn) → Conjecture

1 Negate F to seek a refutation:

¬F := Axiom1 ∧ . . . ∧ Axiomn ∧ ¬Conjecture

slide-28
SLIDE 28

7/32

Theorem Proving Pipeline in One Slide

Standard form of the input: F := (Axiom1 ∧ . . . ∧ Axiomn) → Conjecture

1 Negate F to seek a refutation:

¬F := Axiom1 ∧ . . . ∧ Axiomn ∧ ¬Conjecture

2 Preprocess and transform ¬F to clause normal form (CNF)

S := {C1, . . . , Cn}

slide-29
SLIDE 29

7/32

Theorem Proving Pipeline in One Slide

Standard form of the input: F := (Axiom1 ∧ . . . ∧ Axiomn) → Conjecture

1 Negate F to seek a refutation:

¬F := Axiom1 ∧ . . . ∧ Axiomn ∧ ¬Conjecture

2 Preprocess and transform ¬F to clause normal form (CNF)

S := {C1, . . . , Cn}

3 saturate S with respect to the superposition calculus

aiming to derive the obvious contradiction ⊥

slide-30
SLIDE 30

8/32

Saturation = fixed-point computation

Given Clause Algorithm: set of active clauses is stored in indexing structures passive works like a priority queue the process is “explosive” in nature

slide-31
SLIDE 31

9/32

Controlling the Growth of the Search Space

Superposition rule

l ≃ r ∨ C1 L[s]p ∨ C2 (L[r]p ∨ C1 ∨ C2)θ

  • r

l ≃ r ∨ C1 t[s]p ⊗ t′ ∨ C2 (t[r]p ⊗ t′ ∨ C1 ∨ C2)θ , where θ = mgu(l, s) and rθ lθ and, for the left rule L[s] is not an equality literal, and for the right rule ⊗ stands either for ≃ or ≃ and t′θ t[s]θ

slide-32
SLIDE 32

9/32

Controlling the Growth of the Search Space

Superposition rule

l ≃ r ∨ C1 L[s]p ∨ C2 (L[r]p ∨ C1 ∨ C2)θ

  • r

l ≃ r ∨ C1 t[s]p ⊗ t′ ∨ C2 (t[r]p ⊗ t′ ∨ C1 ∨ C2)θ , where θ = mgu(l, s) and rθ lθ and, for the left rule L[s] is not an equality literal, and for the right rule ⊗ stands either for ≃ or ≃ and t′θ t[s]θ

Saturation up to Redundancy redundant clauses can be safely removed subsumption - an example reduction: remove C in the presence of D such that Dσ ⊂ C

slide-33
SLIDE 33

9/32

Controlling the Growth of the Search Space

Superposition rule

l ≃ r ∨ C1 L[s]p ∨ C2 (L[r]p ∨ C1 ∨ C2)θ

  • r

l ≃ r ∨ C1 t[s]p ⊗ t′ ∨ C2 (t[r]p ⊗ t′ ∨ C1 ∨ C2)θ , where θ = mgu(l, s) and rθ lθ and, for the left rule L[s] is not an equality literal, and for the right rule ⊗ stands either for ≃ or ≃ and t′θ t[s]θ

Saturation up to Redundancy redundant clauses can be safely removed subsumption - an example reduction: remove C in the presence of D such that Dσ ⊂ C Completeness considerations

slide-34
SLIDE 34

10/32

Outline

1

A Brief Introduction to Saturation-Based Proving

2

Previous Methods for Theory Reasoning in Vampire

3

Theory Instantiation and Unification with Abstraction

4

Experimental Results

5

Ongoing and Future Work

slide-35
SLIDE 35

11/32

Basic Support for Theories

Normalization of interpreted operations, e.g. t1 ≥ t2 ¬(t1 < t2) a − b a + (−b) Evaluation of ground interpreted terms, e.g. f (1 + 2) f (3) f (x + 0) f (x) 1 + 2 < 4 true Balancing interpreted literals, e.g. 4 = 2 × (x + 1) (4 div 2) − 1 = x x = 1 Interpreted operations treated specially by ordering

(make interpreted things small, do uninterpreted things first)

slide-36
SLIDE 36

12/32

Adding Theory Axioms

x + (y + z) = (x + y) + z x + 0 = x x + y = y + x −(x + y) = (−x + −y) − − x = x x + (−x) = 0 x ∗ 0 = 0 x ∗ (y ∗ z) = (x ∗ y) ∗ z x ∗ 1 = x x ∗ y = y ∗ x (x ∗ y) + (x ∗ z) = x ∗ (y + z) ¬(x < y) ∨ ¬(y < z) ∨ ¬(x < z) x < y ∨ y < x ∨ x = y ¬(x < y) ∨ ¬(y < x + 1) ¬(x < y) ∨ x + z < y + z ¬(x < x) x < y ∨ y < x + 1 (for ints) x = 0 ∨ (y ∗ x)/x = y (for reals) a handcrafted set subsets added based on the signature

  • ngoing research on how to tame them [IWIL17]
slide-37
SLIDE 37

13/32

AVATAR modulo Theories (since 2015)

The AVATAR architecture [Voronkov 2014] modern architecture of first-order theorem provers combines saturation with SAT-solving efficient realization of the clause splitting rule ∀x, z, w. s(x) ∨ ¬r(x, z)

  • share x and z

∨ ¬q(w)

is disjoint

“propositional essence” of the problem delegated to SAT solver

slide-38
SLIDE 38

13/32

AVATAR modulo Theories (since 2015)

The AVATAR architecture [Voronkov 2014] modern architecture of first-order theorem provers combines saturation with SAT-solving efficient realization of the clause splitting rule ∀x, z, w. s(x) ∨ ¬r(x, z)

  • share x and z

∨ ¬q(w)

is disjoint

“propositional essence” of the problem delegated to SAT solver AVATAR modulo Theories [Reger et al. 2016] use an SMT solver instead of the SAT solver sub-problems considered are ground-theory-consistent implemented in Vampire using Z3

slide-39
SLIDE 39

14/32

One Slightly Imprecise View of AVATAR

Vampire SMT Solver CDCL SAT Solver Core Theory Solver for BitVectors Theory Solver for Arithmetic Theory Solver for Uninterpreted Functions Quantifier Instantiation Incremental Theory Solver for Quantified Formulas

slide-40
SLIDE 40

14/32

One Slightly Imprecise View of AVATAR

Vampire SMT Solver CDCL SAT Solver Core Theory Solver for BitVectors Theory Solver for Arithmetic Theory Solver for Uninterpreted Functions Quantifier Instantiation Incremental Theory Solver for Quantified Formulas

. . . but please remember: Vampire is the boss here!

slide-41
SLIDE 41

15/32

Outline

1

A Brief Introduction to Saturation-Based Proving

2

Previous Methods for Theory Reasoning in Vampire

3

Theory Instantiation and Unification with Abstraction

4

Experimental Results

5

Ongoing and Future Work

slide-42
SLIDE 42

16/32

Does Vampire Need Instantiation?

Example Consider the conjecture (∃x)(x + x ≃ 2) negated and clausified to x + x ≃ 2. It takes Vampire 15 s to solve using theory axioms deriving lemmas such as x + 1 ≃ y + 1 ∨ y + 1 ≤ x ∨ x + 1 ≤ y.

slide-43
SLIDE 43

16/32

Does Vampire Need Instantiation?

Example Consider the conjecture (∃x)(x + x ≃ 2) negated and clausified to x + x ≃ 2. It takes Vampire 15 s to solve using theory axioms deriving lemmas such as x + 1 ≃ y + 1 ∨ y + 1 ≤ x ∨ x + 1 ≤ y. Heuristic instantiation would help, but normally any instance

  • f a clause is immediately subsumed by the original!
slide-44
SLIDE 44

17/32

Another Example

Example Consider a problem containing 14x = x2 + 49 ∨ p(x) It takes a long time to derive p(7) whereas if we had guessed x = 7 we immediately get 14 · 7 = 72 + 49 ∨ p(7)

slide-45
SLIDE 45

17/32

Another Example

Example Consider a problem containing 14x = x2 + 49 ∨ p(x) It takes a long time to derive p(7) whereas if we had guessed x = 7 we immediately get 14 · 7 = 72 + 49 ∨ p(7)

  • evaluate

98 = 98 ∨ p(7)

slide-46
SLIDE 46

17/32

Another Example

Example Consider a problem containing 14x = x2 + 49 ∨ p(x) It takes a long time to derive p(7) whereas if we had guessed x = 7 we immediately get 14 · 7 = 72 + 49 ∨ p(7)

  • evaluate

98 = 98 ∨ p(7)

  • remove trivial inequality

p(7) How do we guess x = 7?

slide-47
SLIDE 47

17/32

Another Example

Example Consider a problem containing 14x = x2 + 49 ∨ p(x) It takes a long time to derive p(7) whereas if we had guessed x = 7 we immediately get 14 · 7 = 72 + 49 ∨ p(7)

  • evaluate

98 = 98 ∨ p(7)

  • remove trivial inequality

p(7) How do we guess x = 7?

slide-48
SLIDE 48

18/32

Theory Instantiation

Instantiation which makes some theory literals immediately false

slide-49
SLIDE 49

18/32

Theory Instantiation

Instantiation which makes some theory literals immediately false As an inference rule P ∨ D Dθ TheoryInst where P contains only pure theory literals and ¬Pθ is valid in T

slide-50
SLIDE 50

18/32

Theory Instantiation

Instantiation which makes some theory literals immediately false As an inference rule P ∨ D Dθ TheoryInst where P contains only pure theory literals and ¬Pθ is valid in T Implementation: Collect relevant pure theory literals L1, . . . , Ln Run an SMT solver on the ground ¬P[x] = ¬L1 ∧ . . . ∧ ¬Ln If the SMT solver returns a model, transform it into a substitution θ and produce an instance

slide-51
SLIDE 51

18/32

Theory Instantiation

Instantiation which makes some theory literals immediately false As an inference rule P ∨ D Dθ TheoryInst where P contains only pure theory literals and ¬Pθ is valid in T Implementation: Collect relevant pure theory literals L1, . . . , Ln Run an SMT solver on the ground ¬P[x] = ¬L1 ∧ . . . ∧ ¬Ln If the SMT solver returns a model, transform it into a substitution θ and produce an instance

slide-52
SLIDE 52

19/32

Problems with Abstraction

Suppose we want to resolve r(14y) ¬r(x2 + 49) ∨ p(x) ⇒ No pure literals

slide-53
SLIDE 53

19/32

Problems with Abstraction

Suppose we want to resolve r(14y) ¬r(x2 + 49) ∨ p(x) ⇒ No pure literals Abstract to z = 14y ∨ r(z) u = x2 + 49 ∨ ¬r(u) ∨ p(x) (We discuss abstraction more later) Instantiation undoes abstraction: p(1, 5)

  • abstract

x = 1 ∨ y = 5 ∨ p(x, y)

  • instantiate

p(1, 5)

slide-54
SLIDE 54

20/32

Updated Rule

P ∨ D Dθ theory instance Pθ unsatisfiable in the theory P pure P does not contain trivial literals A literal is trivial if Form: x = t (x not in t) Pure (only theory symbols) x only occurs in other trivial literals or other non-pure literals

slide-55
SLIDE 55

21/32

Flavours of Theory Instantiation

Example A possible instance: x ≃ 1 + y ∨ p(x, y) = ⇒ p(1, 0) vs. the “more general” instance p(y + 1, y)

slide-56
SLIDE 56

21/32

Flavours of Theory Instantiation

Example A possible instance: x ≃ 1 + y ∨ p(x, y) = ⇒ p(1, 0) vs. the “more general” instance p(y + 1, y) Example (some literals constrain less/more than others) (x ≃ 0) → p(x)

slide-57
SLIDE 57

21/32

Flavours of Theory Instantiation

Example A possible instance: x ≃ 1 + y ∨ p(x, y) = ⇒ p(1, 0) vs. the “more general” instance p(y + 1, y) Example (some literals constrain less/more than others) (x ≃ 0) → p(x) Three options for thi: strong: Only select strong literals where a literal is strong if it is a negative equality or an interpreted literal

  • verlap: Select all strong literals and additionally those

theory literals whose variables overlap with a strong literal all: Select all non-trivial pure theory literals

slide-58
SLIDE 58

22/32

Interacting with the SMT solver

Recall that we collect relevant pure theory literals L1, . . . , Ln to run an SMT solver on T[x] = ¬L1 ∧ . . . ∧ ¬Ln the negation step involves Skolemization the we just translate the terms via Z3 API

slide-59
SLIDE 59

22/32

Interacting with the SMT solver

Recall that we collect relevant pure theory literals L1, . . . , Ln to run an SMT solver on T[x] = ¬L1 ∧ . . . ∧ ¬Ln the negation step involves Skolemization the we just translate the terms via Z3 API Example (The Division by zero catch!) The following two clauses are satisfiable: 1/x ≃ 0 ∨ p(x) 1/x ≃ 0 ∨ ¬p(x).

slide-60
SLIDE 60

22/32

Interacting with the SMT solver

Recall that we collect relevant pure theory literals L1, . . . , Ln to run an SMT solver on T[x] = ¬L1 ∧ . . . ∧ ¬Ln the negation step involves Skolemization the we just translate the terms via Z3 API Example (The Division by zero catch!) The following two clauses are satisfiable: 1/x ≃ 0 ∨ p(x) 1/x ≃ 0 ∨ ¬p(x). However, instances p(0) and ¬p(0) could be obtained by an “unprotected” instantiation rule.

slide-61
SLIDE 61

22/32

Interacting with the SMT solver

Recall that we collect relevant pure theory literals L1, . . . , Ln to run an SMT solver on T[x] = ¬L1 ∧ . . . ∧ ¬Ln the negation step involves Skolemization the we just translate the terms via Z3 API Example (The Division by zero catch!) The following two clauses are satisfiable: 1/x ≃ 0 ∨ p(x) 1/x ≃ 0 ∨ ¬p(x). However, instances p(0) and ¬p(0) could be obtained by an “unprotected” instantiation rule. Evaluation may fail: result out of Vampire’s internal range result is a proper algebraic number

slide-62
SLIDE 62

23/32

Unification with Abstraction

Recall the abstraction rule L[t] ∨ C = ⇒ x ≃ t ∨ L[x] ∨ C, where L is a theory literal, t a non-theory term, and x fresh.

slide-63
SLIDE 63

23/32

Unification with Abstraction

Recall the abstraction rule L[t] ∨ C = ⇒ x ≃ t ∨ L[x] ∨ C, where L is a theory literal, t a non-theory term, and x fresh. Example Consider two clauses r(14y) ¬r(x2 + 49) ∨ p(x)

slide-64
SLIDE 64

23/32

Unification with Abstraction

Recall the abstraction rule L[t] ∨ C = ⇒ x ≃ t ∨ L[x] ∨ C, where L is a theory literal, t a non-theory term, and x fresh. Example Consider two clauses r(14y) ¬r(x2 + 49) ∨ p(x) We could fully abstract them to obtain: r(u) ∨ u ≃ 14y ¬r(v) ∨ v ≃ x2 + 49 ∨ p(x),

slide-65
SLIDE 65

23/32

Unification with Abstraction

Recall the abstraction rule L[t] ∨ C = ⇒ x ≃ t ∨ L[x] ∨ C, where L is a theory literal, t a non-theory term, and x fresh. Example Consider two clauses r(14y) ¬r(x2 + 49) ∨ p(x) We could fully abstract them to obtain: r(u) ∨ u ≃ 14y ¬r(v) ∨ v ≃ x2 + 49 ∨ p(x), then resolve to get u ≃ 14y ∨ u ≃ x2 + 49 ∨ p(x)

slide-66
SLIDE 66

24/32

Unification with Abstraction

Explicit abstraction may be harmful: fully abstracted clauses are typically much longer abstraction destroys ground literals theory part requires special treatment

slide-67
SLIDE 67

24/32

Unification with Abstraction

Explicit abstraction may be harmful: fully abstracted clauses are typically much longer abstraction destroys ground literals theory part requires special treatment Instead of full abstraction . . . incorporate the abstraction process into unification thus abstractions are “on demand” and lazy implemented by extending the substitution tree indexing

slide-68
SLIDE 68

24/32

Unification with Abstraction

Explicit abstraction may be harmful: fully abstracted clauses are typically much longer abstraction destroys ground literals theory part requires special treatment Instead of full abstraction . . . incorporate the abstraction process into unification thus abstractions are “on demand” and lazy implemented by extending the substitution tree indexing Now the whole Superposition calculus can be extended to use Unification with Abstraction instead of standard unification

slide-69
SLIDE 69

25/32

When do we abstract?

Example (do not produce unsatisfiable constraints) Allowing p(1) and p(2) to unify under the constraint that 1 ≃ 2 is not useful in any context.

slide-70
SLIDE 70

25/32

When do we abstract?

Example (do not produce unsatisfiable constraints) Allowing p(1) and p(2) to unify under the constraint that 1 ≃ 2 is not useful in any context. Four option to choose from: interpreted_only: only produce a constraint if the top-level symbol of both terms is a theory-symbol,

  • ne_side_interpreted: only produce a constraint if the

top-level symbol of at least one term is a theory symbol,

  • ne_side_constant: as one_side_interpreted but if the
  • ther side is uninterpreted it must be a constant,

all: allow all terms of theory sort to unify and produce constraints.

slide-71
SLIDE 71

26/32

Implementation

Extend Substitution Trees to generate constraints when two things don’t match Also need to lookup next node by (interpreted) sort not just head symbol (a bit of book-keeping overhead) Need to get these constraints to work with how Vampire implements backtracking and variable renaming (was the hardest part)

slide-72
SLIDE 72

27/32

Outline

1

A Brief Introduction to Saturation-Based Proving

2

Previous Methods for Theory Reasoning in Vampire

3

Theory Instantiation and Unification with Abstraction

4

Experimental Results

5

Ongoing and Future Work

slide-73
SLIDE 73

28/32

Experiment with Vampire

Comparing New Options: uwa, thi, fta

slide-74
SLIDE 74

28/32

Experiment with Vampire

Comparing New Options: uwa, thi, fta Methodology: take hard, but solvable problems randomize (problem, other options), sample the sub-cube

slide-75
SLIDE 75

28/32

Experiment with Vampire

Comparing New Options: uwa, thi, fta Methodology: take hard, but solvable problems randomize (problem, other options), sample the sub-cube For this experiment: 24 reasonable combinations of option values: fta, uwa, thi

  • approx. 100 000 runs in total
slide-76
SLIDE 76

29/32

Comparison of Three Options

fta uwa thi solutions

  • n
  • ff

all 252

  • n
  • ff
  • verlap

265

  • n
  • ff

strong 266

  • n
  • ff
  • ff

276

  • ff

all all 333

  • ff

all

  • verlap

351

  • ff

all strong 354

  • ff
  • ne_side_interpreted

all 364

  • ff

all

  • ff

364

  • ff
  • ne_side_constant

all 374

  • ff

interpreted_only all 379

  • ff
  • ne_side_interpreted
  • verlap

385

  • ff
  • ne_side_interpreted

strong 387

  • ff
  • ff

all 392

  • ff
  • ne_side_constant

strong 397

  • ff
  • ne_side_constant
  • verlap

401

  • ff

interpreted_only

  • verlap

407

  • ff
  • ne_side_interpreted
  • ff

407

  • ff

interpreted_only strong 409

  • ff
  • ne_side_constant
  • ff

417

  • ff
  • ff
  • verlap

428

  • ff

interpreted_only

  • ff

430

  • ff
  • ff

strong 431

  • ff
  • ff
  • ff

450

slide-77
SLIDE 77

30/32

Contribution to Strategy Building

SMT-LIB Logic New solutions Uniquely solved ALIA 1 LIA 14 LRA 4 UFDTLIA 5 UFLIA 28 14 UFNIA 13 4 TPTP Category New solutions Uniquely solved ARI 13 NUM 1 1 SWW 3 1

slide-78
SLIDE 78

31/32

Ongoing and Future Work

More theories Currently just implemented for arithmetic Currently working on arrays and datatypes Higher-order logic as a theory? Handling uninterpreted symbols Tighter connection to AVATAR modulo theories Incorporate background knowledge about current model More general theory instantiation More than one solution (inequalities) All solutions? More ‘general’ solutions?

slide-79
SLIDE 79

32/32

Conclusion

Two new techniques for reasoning with theories and quantifiers theory instantiation unification with abstraction Experiment with Vampire: success on previously unsolved problems Watch this space