recent improvements of theory reasoning in vampire
play

Recent Improvements of Theory Reasoning in Vampire Giles Reger 1 , - PowerPoint PPT Presentation

Recent Improvements of Theory Reasoning in Vampire Giles Reger 1 , Martin Suda 2 , Andrei Voronkov 3 , 4 1 University of Manchester, Manchester, UK 2 TU Wien, Vienna, Austria 3 Chalmers University of Technology, Gothenburg, Sweden 4 EasyChair IWIL


  1. Recent Improvements of Theory Reasoning in Vampire Giles Reger 1 , Martin Suda 2 , Andrei Voronkov 3 , 4 1 University of Manchester, Manchester, UK 2 TU Wien, Vienna, Austria 3 Chalmers University of Technology, Gothenburg, Sweden 4 EasyChair IWIL 2017 – Maun, May 7, 2017 1/24

  2. Reasoning with quantifiers and theories Two Dimensions of Complexity ∀∃ gnd Z / R: +-*/ select / store 1/24

  3. Reasoning with quantifiers and theories Two Dimensions of Complexity ∀∃ ATP gnd Z / R: +-*/ select / store 1/24

  4. Reasoning with quantifiers and theories Two Dimensions of Complexity ∀∃ ATP gnd SMT Z / R: +-*/ select / store 1/24

  5. Reasoning with quantifiers and theories Two Dimensions of Complexity ∀∃ E SPASS ATP VAMPIRE ... CVC4 veriT Z3 ... gnd SMT Z / R: +-*/ select / store 1/24

  6. Reasoning with quantifiers and theories Two Dimensions of Complexity ∀∃ ATP gnd SMT Z / R: +-*/ select / store 1/24

  7. Reasoning with quantifiers and theories Two Dimensions of Complexity ∀∃ ATP SMT E-matching ... gnd Z / R: +-*/ select / store 1/24

  8. Reasoning with quantifiers and theories Two Dimensions of Complexity ∀∃ ATP theory axioms ... SMT E-matching ... gnd Z / R: +-*/ select / store 1/24

  9. Reasoning with quantifiers and theories Two Dimensions of Complexity ∀∃ ATP theory axioms ... AVATAR mod Theories SMT E-matching ... gnd Z / R: +-*/ select / store 1/24

  10. Reasoning with quantifiers and theories Two Dimensions of Complexity ∀∃ ATP theory axioms ... SMT E-matching ... gnd Z / R: +-*/ select / store 1/24

  11. This talk in one slide Contribution 1: Theory Instantiation Rule 2/24

  12. This talk in one slide Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 2/24

  13. This talk in one slide Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14 x �≃ x 2 + 49 ∨ p ( x ) 2/24

  14. This talk in one slide Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14 x �≃ x 2 + 49 ∨ p ( x ) = ⇒ p ( 7 ) 2/24

  15. This talk in one slide Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14 x �≃ x 2 + 49 ∨ p ( x ) = ⇒ p ( 7 ) by utilising ground SMT solving 2/24

  16. This talk in one slide Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14 x �≃ x 2 + 49 ∨ p ( x ) = ⇒ p ( 7 ) by utilising ground SMT solving (current) limitation: complete theories (e.g. arithmetic) 2/24

  17. This talk in one slide Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14 x �≃ x 2 + 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 2/24

  18. This talk in one slide Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14 x �≃ x 2 + 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 ( 2 x ) against ¬ p ( 10 ) 2/24

  19. This talk in one slide Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14 x �≃ x 2 + 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 ( 2 x ) against ¬ p ( 10 ) = ⇒ 2 x �≃ 10 2/24

  20. This talk in one slide Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14 x �≃ x 2 + 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 ( 2 x ) against ¬ p ( 10 ) = ⇒ 2 x �≃ 10 a lazy approach to abstraction 2/24

  21. This talk in one slide Contribution 1: Theory Instantiation Rule derives a simplifying instance of a non-ground clause 14 x �≃ x 2 + 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 ( 2 x ) against ¬ p ( 10 ) = ⇒ 2 x �≃ 10 a lazy approach to abstraction new constrains can be often “discharged” by 1. 2/24

  22. Outline Short preliminaries 1 Theory instantiation 2 Abstraction through unification 3 Experiments 4 Conclusion 5 3/24

  23. Short preliminaries Main Arsenal for Theory reasoning in Vampire 4/24

  24. Short preliminaries Main Arsenal for Theory reasoning in Vampire evaluate ground terms: 1 + 1 = ⇒ 2 4/24

  25. Short preliminaries Main Arsenal for Theory reasoning in Vampire evaluate ground terms: 1 + 1 = ⇒ 2 add theory axioms: x + 0 = x , x + y = y + x , . . . 4/24

  26. Short preliminaries Main Arsenal for Theory reasoning in Vampire evaluate ground terms: 1 + 1 = ⇒ 2 add theory axioms: x + 0 = x , x + y = y + x , . . . AVATAR modulo theories 4/24

  27. Short preliminaries Main Arsenal for Theory reasoning in Vampire evaluate ground terms: 1 + 1 = ⇒ 2 add theory axioms: x + 0 = x , x + y = y + x , . . . AVATAR modulo theories Theory abstraction rule L [ t ] ∨ C = ⇒ x �≃ t ∨ L [ x ] ∨ C , where L is a theory literal, t a non-theory term, and x fresh. 4/24

  28. Short preliminaries Main Arsenal for Theory reasoning in Vampire evaluate ground terms: 1 + 1 = ⇒ 2 add theory axioms: x + 0 = x , x + y = y + x , . . . AVATAR modulo theories Theory 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 5 < f ( y ) ∨ p ( y ) = ⇒ x �≃ f ( y ) ∨ 5 < x ∨ p ( y ) 4/24

  29. Short preliminaries Main Arsenal for Theory reasoning in Vampire evaluate ground terms: 1 + 1 = ⇒ 2 add theory axioms: x + 0 = x , x + y = y + x , . . . AVATAR modulo theories Theory 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 5 < f ( y ) ∨ p ( y ) = ⇒ x �≃ f ( y ) ∨ 5 < x ∨ p ( y ) NB: abstraction can be “undone” by the equality factoring rule 4/24

  30. Outline Short preliminaries 1 Theory instantiation 2 Abstraction through unification 3 Experiments 4 Conclusion 5 5/24

  31. Theory instantiation by examples Example Consider the conjecture ( ∃ x )( x + x ≃ 2 ) negated and clausified to x + x �≃ 2 . It takes Vampire 15 seconds to solve using theory axioms deriving lemmas such as x + 1 ≃ y + 1 ∨ y + 1 ≤ x ∨ x + 1 ≤ y . 6/24

  32. Theory instantiation by examples Example Consider the conjecture ( ∃ x )( x + x ≃ 2 ) negated and clausified to x + x �≃ 2 . It takes Vampire 15 seconds to solve using theory axioms deriving lemmas such as x + 1 ≃ y + 1 ∨ y + 1 ≤ x ∨ x + 1 ≤ y . Example ( ARI120=1 ) Initial clauses: x ∗ x �≃ 4 ∨ x ≃ y ∨ ¬ p ( y ) p ( 2 ) 6/24

  33. Theory instantiation by examples Example Consider the conjecture ( ∃ x )( x + x ≃ 2 ) negated and clausified to x + x �≃ 2 . It takes Vampire 15 seconds to solve using theory axioms deriving lemmas such as x + 1 ≃ y + 1 ∨ y + 1 ≤ x ∨ x + 1 ≤ y . Example ( ARI120=1 ) Initial clauses: x ∗ x �≃ 4 ∨ x ≃ y ∨ ¬ p ( y ) p ( 2 ) immediately resolve to x ∗ x �≃ 4 ∨ 2 ≃ x , but this cannot be solved with axioms only in reasonable time. 6/24

  34. Theory instantiation more formally As an inference rule C ( D [ x ]) θ TheoryInst where A ( P ) ( C ) = T [ x ] → D [ x ] is a (partial) abstraction of C , and θ a subst. such that T [ x ] θ is valid in the underlying theory. 7/24

  35. Theory instantiation more formally As an inference rule C ( D [ x ]) θ TheoryInst where A ( P ) ( C ) = T [ x ] → D [ x ] is a (partial) abstraction of C , and θ a subst. such that T [ x ] θ is valid in the underlying theory. Implementation: Abstract relevant literals Collect relevant pure theory literals L 1 , . . . , L n Run an SMT solver on T [ x ] = ¬ L 1 ∧ . . . ∧ ¬ L n If the SMT solver returns a model, transform it into a substitution θ and produce an instance If the SMT solver returns unsatisfiable then C is a theory tautology and can be removed 7/24

  36. Theory instantiation more formally As an inference rule C ( D [ x ]) θ TheoryInst where A ( P ) ( C ) = T [ x ] → D [ x ] is a (partial) abstraction of C , and θ a subst. such that T [ x ] θ is valid in the underlying theory. Implementation: Abstract relevant literals Collect relevant pure theory literals L 1 , . . . , L n Run an SMT solver on T [ x ] = ¬ L 1 ∧ . . . ∧ ¬ L n If the SMT solver returns a model, transform it into a substitution θ and produce an instance If the SMT solver returns unsatisfiable then C is a theory tautology and can be removed 7/24

Recommend


More recommend