Pretending to be an SMT Solver with Vampire (and How We Do Instantiation)

Size: px
Start display at page:

Download "Pretending to be an SMT Solver with Vampire (and How We Do Instantiation)"

Transcription

1 Pretending to be an SMT Solver with Vampire (and How We Do Instantiation) Giles Reger 1, Martin Suda 2, and Andrei Voronkov 1,2 1 School of Computer Science, University of Manchester, UK 2 TU Wien, Vienna, Austria SMT 2017 Heidelberg, July 22, /19

2 Introducing Vampire Automatic Theorem Prover (ATP) for first-order logic Main paradigm: superposition calculus + saturation a.k.f.: indexing, incomplete strategies, strategy scheduling 1/19

3 Introducing Vampire Automatic Theorem Prover (ATP) for first-order logic Main paradigm: superposition calculus + saturation a.k.f.: indexing, incomplete strategies, strategy scheduling 1/19

4 Introducing Vampire Automatic Theorem Prover (ATP) for first-order logic Main paradigm: superposition calculus + saturation a.k.f.: indexing, incomplete strategies, strategy scheduling Reasoning with Theories since 2010: progressively adding support for theories since 2016: participating in SMT-COMP 1/19

5 Reasoning with quantifiers and theories Two Dimensions of Complexity gnd Z/R: + / select/store 2/19

6 Reasoning with quantifiers and theories Two Dimensions of Complexity ATP gnd Z/R: + / select/store 2/19

7 Reasoning with quantifiers and theories Two Dimensions of Complexity ATP gnd SMT Z/R: + / select/store 2/19

8 Reasoning with quantifiers and theories Two Dimensions of Complexity ATP E SPASS VAMPIRE... CVC4 verit Z3... gnd SMT Z/R: + / select/store 2/19

9 Reasoning with quantifiers and theories Two Dimensions of Complexity ATP gnd SMT Z/R: + / select/store 2/19

10 Reasoning with quantifiers and theories Two Dimensions of Complexity ATP gnd SMT Instantiation... Z/R: + / select/store 2/19

11 Reasoning with quantifiers and theories Two Dimensions of Complexity ATP theory axioms... gnd SMT Instantiation... Z/R: + / select/store 2/19

12 Reasoning with quantifiers and theories Two Dimensions of Complexity ATP theory axioms...? gnd SMT Instantiation... Z/R: + / select/store 2/19

13 Outline 1 A Brief Introduction to Saturation-Based Proving 2 Theory Reasoning in Vampire 3 Theory Instantiation and Unification with Abstraction 4 Where We Currently Stand 3/19

14 Theorem Proving Pipeline in One Slide Standard form of the input: F := (Axiom 1... Axiom n ) Conjecture 4/19

15 Theorem Proving Pipeline in One Slide Standard form of the input: F := (Axiom 1... Axiom n ) Conjecture 1 Negate F to seek a refutation: F := Axiom 1... Axiom n Conjecture 4/19

16 Theorem Proving Pipeline in One Slide Standard form of the input: F := (Axiom 1... Axiom n ) Conjecture 1 Negate F to seek a refutation: F := Axiom 1... Axiom n Conjecture 2 Preprocess and transform F to clause normal form (CNF) S := {C 1,..., C n } 4/19

17 Theorem Proving Pipeline in One Slide Standard form of the input: F := (Axiom 1... Axiom n ) Conjecture 1 Negate F to seek a refutation: F := Axiom 1... Axiom n Conjecture 2 Preprocess and transform F to clause normal form (CNF) S := {C 1,..., C n } 3 saturate S with respect to the superposition calculus aiming to derive the obvious contradiction 4/19

18 Saturation = fixed-point computation Given Clause Algorithm: Active Passive Unprocessed set of active clauses is stored in indexing structures passive works like a priority queue the process is explosive in nature 5/19

19 Controlling the Growth of the Search Space Superposition rule l r C 1 L[s] p C 2 (L[r] p C 1 C 2)θ or l r C 1 t[s] p t C 2 (t[r] p t C 1 C 2)θ 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]θ, 6/19

20 Controlling the Growth of the Search Space Superposition rule l r C 1 L[s] p C 2 (L[r] p C 1 C 2)θ or l r C 1 t[s] p t C 2 (t[r] p t C 1 C 2)θ 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 6/19

21 Controlling the Growth of the Search Space Superposition rule l r C 1 L[s] p C 2 (L[r] p C 1 C 2)θ or l r C 1 t[s] p t C 2 (t[r] p t C 1 C 2)θ 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 6/19

22 Outline 1 A Brief Introduction to Saturation-Based Proving 2 Theory Reasoning in Vampire 3 Theory Instantiation and Unification with Abstraction 4 Where We Currently Stand 7/19

23 Basic Support for Theories Normalization of interpreted operations, e.g. t 1 t 2 (t 1 < t 2 ) a b a + ( b) Evaluation of ground interpreted terms, e.g. f (1 + 2) f (3) f (x + 0) f (x) < 4 true Balancing interpreted literals, e.g. 4 = 2 (x + 1) (4 div 2) 1 = x x = 1 Interpreted operations treated specially by ordering 8/19

24 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 ongoing research on how to tame them [IWIL17] 9/19

25 AVATAR modulo Theories The AVATAR architecture [Voronkov14] 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) q(w) }{{}}{{} share x and z is disjoint propositional essence of the problem delegated to SAT solver 10/19

26 AVATAR modulo Theories The AVATAR architecture [Voronkov14] 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) q(w) }{{}}{{} share x and z is disjoint propositional essence of the problem delegated to SAT solver AVATAR modulo Theories use an SMT solver instead of the SAT solver sub-problems considered are ground-theory-consistent implemented in Vampire using Z3 10/19

27 One Slightly Imprecise View of AVATAR Vampire Incremental Theory Solver for Quantified Formulas SMT Solver Theory Solver for Arithmetic Theory Solver for BitVectors Theory Solver for Uninterpreted Functions Core Quantifier Instantiation CDCL SAT Solver 11/19

28 One Slightly Imprecise View of AVATAR Vampire Incremental Theory Solver for Quantified Formulas SMT Solver Theory Solver for Arithmetic Theory Solver for BitVectors Theory Solver for Uninterpreted Functions Core Quantifier Instantiation CDCL SAT Solver... and please remember: Vampire is the boss here! 11/19

29 Outline 1 A Brief Introduction to Saturation-Based Proving 2 Theory Reasoning in Vampire 3 Theory Instantiation and Unification with Abstraction 4 Where We Currently Stand 12/19

30 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. 13/19

31 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 of a clause is immediately subsumed by the original! 13/19

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 of a clause is immediately subsumed by the original! 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. 13/19

33 The Theory Instantiation Instantiation which makes some theory literals immediately false 14/19

34 The Theory Instantiation Instantiation which makes some theory literals immediately false As an inference rule C (D[x])θ TheoryInst where T [x] D[x] is a (partial) abstraction of C and θ a substitution such thatt [x]θ is valid in the underlying theory 14/19

35 The Theory Instantiation Instantiation which makes some theory literals immediately false As an inference rule C (D[x])θ TheoryInst where T [x] D[x] is a (partial) abstraction of C and θ a substitution such thatt [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 14/19

36 The Theory Instantiation Instantiation which makes some theory literals immediately false As an inference rule C (D[x])θ TheoryInst where T [x] D[x] is a (partial) abstraction of C and θ a substitution such thatt [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 14/19

37 Unification with Abstraction Example Consider two clauses r(14y) r(x ) p(x) 15/19

38 Unification with Abstraction Example Consider two clauses r(14y) r(x ) p(x) We could fully abstract them to obtain: r(u) u 14y r(v) v x p(x), 15/19

39 Unification with Abstraction Example Consider two clauses r(14y) r(x ) p(x) We could fully abstract them to obtain: r(u) u 14y r(v) v x p(x), then resolve to get u 14y u x p(x) 15/19

40 Unification with Abstraction Example Consider two clauses r(14y) r(x ) p(x) We could fully abstract them to obtain: r(u) u 14y r(v) v x p(x), then resolve to get u 14y u x p(x) Finally, Theory Instantiation could produce p(7) 15/19

41 Unification with Abstraction Explicit abstraction may be harmful: fully abstracted clauses are typically much longer abstraction destroys ground literals theory part requires special treatment 16/19

42 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 16/19

43 Outline 1 A Brief Introduction to Saturation-Based Proving 2 Theory Reasoning in Vampire 3 Theory Instantiation and Unification with Abstraction 4 Where We Currently Stand 17/19

44 SMT-COMP 2017 results problems Logic Vampire VeriT CVC4 Z3 ALIA AUFDTLIA AUFLIA AUFLIRA AUFNIRA LIA LRA NIA NRA UF UFDT UFDTLIA UFIDL UFLIA UFLRA UFNIA /19

45 Conclusion Thank you for your attention! 19/19

First-Order Theorem Proving and Vampire

First-Order Theorem Proving and Vampire First-Order Theorem Proving and Vampire Laura Kovács 1,2 and Martin Suda 2 1 TU Wien 2 Chalmers Outline Introduction First-Order Logic and TPTP Inference Systems Saturation Algorithms Redundancy Elimination

More information

First-Order Theorem Proving and Vampire. Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester)

First-Order Theorem Proving and Vampire. Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester) First-Order Theorem Proving and Vampire Laura Kovács (Chalmers University of Technology) Andrei Voronkov (The University of Manchester) Outline Introduction First-Order Logic and TPTP Inference Systems

More information

Solving Quantified Verification Conditions using Satisfiability Modulo Theories

Solving Quantified Verification Conditions using Satisfiability Modulo Theories Solving Quantified Verification Conditions using Satisfiability Modulo Theories Yeting Ge, Clark Barrett, Cesare Tinelli Solving Quantified Verification Conditions using Satisfiability Modulo Theories

More information

Satisfiability Modulo Theories

Satisfiability Modulo Theories Satisfiability Modulo Theories Bruno Dutertre SRI International Leonardo de Moura Microsoft Research Satisfiability a > b + 2, a = 2c + 10, c + b 1000 SAT a = 0, b = 3, c = 5 Model 0 > 3 + 2, 0 = 2 5 +

More information

Automated Reasoning (in First Order Logic) Andrei Voronkov. University of Manchester

Automated Reasoning (in First Order Logic) Andrei Voronkov. University of Manchester Automated Reasoning (in First Order Logic) Andrei Voronkov University of Manchester 1 Overview Automated reasoning in first-order logic. Completeness. Theory of Resolution and Redundancy. From Theory to

More information

Propositional Reasoning

Propositional Reasoning Propositional Reasoning CS 440 / ECE 448 Introduction to Artificial Intelligence Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri Spring 2010 Intro to AI (CS

More information

Hierarchic Superposition With Weak Abstraction and the Beagle Theorem Prover

Hierarchic Superposition With Weak Abstraction and the Beagle Theorem Prover Hierarchic Superposition With Weak Abstraction and the Beagle Theorem Prover Peter Baumgartner NICTA and ANU, Canberra Uwe Waldmann MPI für Informatik, Saarbrücken Goal Automated deduction in hierarchic

More information

SAT/SMT/AR Introduction and Applications

SAT/SMT/AR Introduction and Applications SAT/SMT/AR Introduction and Applications Ákos Hajdu Budapest University of Technology and Economics Department of Measurement and Information Systems 1 Ákos Hajdu About me o PhD student at BME MIT (2016

More information

Unification with Abstraction and Theory Instantiation in Saturation-Based Reasoning

Unification with Abstraction and Theory Instantiation in Saturation-Based Reasoning Unification with Abstraction and Theory Instantiation in Saturation-Based Reasoning Giles Reger 1(B), Martin Suda 2, and Andrei Voronkov 1,2,3 1 University of Manchester, Manchester, UK giles.reger@manchester.ac.uk

More information

Quantifiers. Leonardo de Moura Microsoft Research

Quantifiers. Leonardo de Moura Microsoft Research Quantifiers Leonardo de Moura Microsoft Research Satisfiability a > b + 2, a = 2c + 10, c + b 1000 SAT a = 0, b = 3, c = 5 Model 0 > 3 + 2, 0 = 2 5 + 10, 5 + ( 3) 1000 Quantifiers x y x > 0 f x, y = 0

More information

Closed Book Examination. Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. M.Sc. in Advanced Computer Science

Closed Book Examination. Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE. M.Sc. in Advanced Computer Science Closed Book Examination COMP60121 Appendix: definition sheet (3 pages) Two hours UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE M.Sc. in Advanced Computer Science Automated Reasoning Tuesday 27 th

More information

LOGIC PROPOSITIONAL REASONING

LOGIC PROPOSITIONAL REASONING LOGIC PROPOSITIONAL REASONING WS 2017/2018 (342.208) Armin Biere Martina Seidl biere@jku.at martina.seidl@jku.at Institute for Formal Models and Verification Johannes Kepler Universität Linz Version 2018.1

More information

Propositional Logic: Evaluating the Formulas

Propositional Logic: Evaluating the Formulas Institute for Formal Models and Verification Johannes Kepler University Linz VL Logik (LVA-Nr. 342208) Winter Semester 2015/2016 Propositional Logic: Evaluating the Formulas Version 2015.2 Armin Biere

More information

ArgoCaLyPso SAT-Inspired Coherent Logic Prover

ArgoCaLyPso SAT-Inspired Coherent Logic Prover ArgoCaLyPso SAT-Inspired Coherent Logic Prover Mladen Nikolić and Predrag Janičić Automated Reasoning GrOup (ARGO) Faculty of Mathematics University of, February, 2011. Motivation Coherent logic (CL) (also

More information

Interpolation and Symbol Elimination in Vampire

Interpolation and Symbol Elimination in Vampire Interpolation and Symbol Elimination in Vampire Kryštof Hoder 1, Laura Kovács 2, and Andrei Voronkov 1 1 University of Manchester 2 TU Vienna Abstract. It has recently been shown that proofs in which some

More information

Leonardo de Moura Microsoft Research

Leonardo de Moura Microsoft Research Leonardo de Moura Microsoft Research Logic is The Calculus of Computer Science (Z. Manna). High computational complexity Naïve solutions will not scale Is formula F satisfiable modulo theory T? SMT solvers

More information

Combinations of Theories for Decidable Fragments of First-order Logic

Combinations of Theories for Decidable Fragments of First-order Logic Combinations of Theories for Decidable Fragments of First-order Logic Pascal Fontaine Loria, INRIA, Université de Nancy (France) Montreal August 2, 2009 Montreal, August 2, 2009 1 / 15 Context / Motivation

More information

Finding Conflicting Instances of Quantified Formulas in SMT. Andrew Reynolds Cesare Tinelli Leonardo De Moura July 18, 2014

Finding Conflicting Instances of Quantified Formulas in SMT. Andrew Reynolds Cesare Tinelli Leonardo De Moura July 18, 2014 Finding Conflicting Instances of Quantified Formulas in SMT Andrew Reynolds Cesare Tinelli Leonardo De Moura July 18, 2014 Outline of Talk SMT solvers: Efficient methods for ground constraints Heuristic

More information

Propositional and Predicate Logic - V

Propositional and Predicate Logic - V Propositional and Predicate Logic - V Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - V WS 2016/2017 1 / 21 Formal proof systems Hilbert s calculus

More information

Introduction Algorithms Applications MINISAT. Niklas Sörensson Chalmers University of Technology and Göteborg University

Introduction Algorithms Applications MINISAT. Niklas Sörensson Chalmers University of Technology and Göteborg University SAT ALGORITHMS AND APPLICATIONS nik@cschalmersse Chalmers University of Technology and Göteborg University Empirically Successful Classical Automated Reasoning a CADE-20 Workshop 22nd - 23th July, 2005

More information

Two hours. Examination definition sheet is available at the back of the examination. UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

Two hours. Examination definition sheet is available at the back of the examination. UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE COMP 60332 Two hours Examination definition sheet is available at the back of the examination. UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE Automated Reasoning and Verification Date: Wednesday 30th

More information

Tutorial 1: Modern SMT Solvers and Verification

Tutorial 1: Modern SMT Solvers and Verification University of Illinois at Urbana-Champaign Tutorial 1: Modern SMT Solvers and Verification Sayan Mitra Electrical & Computer Engineering Coordinated Science Laboratory University of Illinois at Urbana

More information

Constraint Solving for Finite Model Finding in SMT Solvers

Constraint Solving for Finite Model Finding in SMT Solvers myjournal manuscript No. (will be inserted by the editor) Constraint Solving for Finite Model Finding in SMT Solvers Andrew Reynolds Cesare Tinelli Clark Barrett Received: date / Accepted: date Abstract

More information

Satisfiability Modulo Theories (SMT)

Satisfiability Modulo Theories (SMT) Satisfiability Modulo Theories (SMT) Sylvain Conchon Cours 7 / 9 avril 2014 1 Road map The SMT problem Modern efficient SAT solvers CDCL(T) Examples of decision procedures: equality (CC) and difference

More information

Rewriting for Satisfiability Modulo Theories

Rewriting for Satisfiability Modulo Theories 1 Dipartimento di Informatica Università degli Studi di Verona Verona, Italy July 10, 2010 1 Joint work with Chris Lynch (Department of Mathematics and Computer Science, Clarkson University, NY, USA) and

More information

3.17 Semantic Tableaux for First-Order Logic

3.17 Semantic Tableaux for First-Order Logic 3.17 Semantic Tableaux for First-Order Logic There are two ways to extend the tableau calculus to quantified formulas: using ground instantiation using free variables Tableaux with Ground Instantiation

More information

Interpolation. Seminar Slides. Betim Musa. 27 th June Albert-Ludwigs-Universität Freiburg

Interpolation. Seminar Slides. Betim Musa. 27 th June Albert-Ludwigs-Universität Freiburg Interpolation Seminar Slides Albert-Ludwigs-Universität Freiburg Betim Musa 27 th June 2015 Motivation program add(int a, int b) { var x,i : int; l 0 assume(b 0); l 1 x := a; l 2 i := 0; while(i < b) {

More information

ME(LIA) - Model Evolution With Linear Integer Arithmetic Constraints

ME(LIA) - Model Evolution With Linear Integer Arithmetic Constraints ME(LIA) - Model Evolution With Linear Integer Arithmetic Constraints Peter Baumgartner NICTA, Canberra, Australia PeterBaumgartner@nictacomau Alexander Fuchs Department of Computer Science The University

More information

6. Logical Inference

6. Logical Inference Artificial Intelligence 6. Logical Inference Prof. Bojana Dalbelo Bašić Assoc. Prof. Jan Šnajder University of Zagreb Faculty of Electrical Engineering and Computing Academic Year 2016/2017 Creative Commons

More information

Vinter: A Vampire-Based Tool for Interpolation

Vinter: A Vampire-Based Tool for Interpolation Vinter: A Vampire-Based Tool for Interpolation Kryštof Hoder 1, Andreas Holzer 2, Laura Kovács 2, and Andrei Voronkov 1 1 University of Manchester 2 TU Vienna Abstract. This paper describes the Vinter

More information

ME(LIA) - Model Evolution With Linear Integer Arithmetic Constraints

ME(LIA) - Model Evolution With Linear Integer Arithmetic Constraints ME(LIA) - Model Evolution With Linear Integer Arithmetic Constraints Peter Baumgartner NICTA, Canberra, Australia PeterBaumgartner@nictacomau Alexander Fuchs Department of Computer Science The University

More information

Leonardo de Moura Microsoft Research

Leonardo de Moura Microsoft Research Leonardo de Moura Microsoft Research Is formula F satisfiable modulo theory T? SMT solvers have specialized algorithms for T b + 2 = c and f(read(write(a,b,3), c-2)) f(c-b+1) b + 2 = c and f(read(write(a,b,3),

More information

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30) Computational Logic Davide Martinenghi Free University of Bozen-Bolzano Spring 2010 Computational Logic Davide Martinenghi (1/30) Propositional Logic - sequent calculus To overcome the problems of natural

More information

Topics in Model-Based Reasoning

Topics in Model-Based Reasoning Towards Integration of Proving and Solving Dipartimento di Informatica Università degli Studi di Verona Verona, Italy March, 2014 Automated reasoning Artificial Intelligence Automated Reasoning Computational

More information

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning COMP9414, Monday 26 March, 2012 Propositional Logic 2 COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning Overview Proof systems (including soundness and completeness) Normal Forms

More information

Implementing Branch and Bound Algorithms in SMT. Andrew Reynolds Two Sigma July 12, 2016

Implementing Branch and Bound Algorithms in SMT. Andrew Reynolds Two Sigma July 12, 2016 Implementing Branch and Bound Algorithms in SMT Andrew Reynolds Two Sigma July 12, 2016 Overview Satisfiability Modulo Theories and DPLL(T) Finite Model Finding in SMT Branch and bound for finding small

More information

Internals of SMT Solvers. Leonardo de Moura Microsoft Research

Internals of SMT Solvers. Leonardo de Moura Microsoft Research Internals of SMT Solvers Leonardo de Moura Microsoft Research Acknowledgements Dejan Jovanovic (SRI International, NYU) Grant Passmore (Univ. Edinburgh) Herbrand Award 2013 Greg Nelson What is a SMT Solver?

More information

CSE507. Satisfiability Modulo Theories. Computer-Aided Reasoning for Software. Emina Torlak

CSE507. Satisfiability Modulo Theories. Computer-Aided Reasoning for Software. Emina Torlak Computer-Aided Reasoning for Software CSE507 Satisfiability Modulo Theories courses.cs.washington.edu/courses/cse507/18sp/ Emina Torlak emina@cs.washington.edu Today Last lecture Practical applications

More information

ME(LIA) - Model Evolution With Linear Integer Arithmetic Constraints

ME(LIA) - Model Evolution With Linear Integer Arithmetic Constraints ME(LIA) - Model Evolution With Linear Integer Arithmetic Constraints Peter Baumgartner 1, Alexander Fuchs 2, and Cesare Tinelli 2 1 National ICT Australia (NICTA), PeterBaumgartner@nictacomau 2 The University

More information

Deduction and Induction. Stephan Schulz. The Inference Engine. Machine Learning. A Match Made in Heaven

Deduction and Induction. Stephan Schulz. The Inference Engine. Machine Learning. A Match Made in Heaven Deduction and Induction A Match Made in Heaven Stephan Schulz The Inference Engine Machine Learning Deduction and Induction A Match Made in Heaven Stephan Schulz or a Deal with the Devil? The Inference

More information

Inf2D 13: Resolution-Based Inference

Inf2D 13: Resolution-Based Inference School of Informatics, University of Edinburgh 13/02/18 Slide Credits: Jacques Fleuriot, Michael Rovatsos, Michael Herrmann Last lecture: Forward and backward chaining Backward chaining: If Goal is known

More information

Satisfiability Modulo Theories

Satisfiability Modulo Theories Satisfiability Modulo Theories Summer School on Formal Methods Menlo College, 2011 Bruno Dutertre and Leonardo de Moura bruno@csl.sri.com, leonardo@microsoft.com SRI International, Microsoft Research SAT/SMT

More information

WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008

WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008 WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008 WHAT I LL TALK ABOUT Propositional Logic Terminology, Satisfiability, Decision Procedure First-Order Logic Terminology, Background Theories Satisfiability

More information

SMT and Z3. Nikolaj Bjørner Microsoft Research ReRISE Winter School, Linz, Austria February 5, 2014

SMT and Z3. Nikolaj Bjørner Microsoft Research ReRISE Winter School, Linz, Austria February 5, 2014 SMT and Z3 Nikolaj Bjørner Microsoft Research ReRISE Winter School, Linz, Austria February 5, 2014 Plan Mon An invitation to SMT with Z3 Tue Equalities and Theory Combination Wed Theories: Arithmetic,

More information

Warm-Up Problem. Is the following true or false? 1/35

Warm-Up Problem. Is the following true or false? 1/35 Warm-Up Problem Is the following true or false? 1/35 Propositional Logic: Resolution Carmen Bruni Lecture 6 Based on work by J Buss, A Gao, L Kari, A Lubiw, B Bonakdarpour, D Maftuleac, C Roberts, R Trefler,

More information

Classical Propositional Logic

Classical Propositional Logic Classical Propositional Logic Peter Baumgartner http://users.cecs.anu.edu.au/~baumgart/ Ph: 02 6218 3717 Data61/CSIRO and ANU July 2017 1 / 71 Classical Logic and Reasoning Problems A 1 : Socrates is a

More information

Towards Lightweight Integration of SMT Solvers

Towards Lightweight Integration of SMT Solvers Towards Lightweight Integration of SMT Solvers Andrei Lapets Boston University Boston, USA lapets@bu.edu Saber Mirzaei Boston University Boston, USA smirzaei@bu.edu 1 Introduction A large variety of SMT

More information

a > 3, (a = b a = b + 1), f(a) = 0, f(b) = 1

a > 3, (a = b a = b + 1), f(a) = 0, f(b) = 1 Yeting Ge New York University Leonardo de Moura Microsoft Research a > 3, (a = b a = b + 1), f(a) = 0, f(b) = 1 Dynamic symbolic execution (DART) Extended static checking Test-case generation Bounded model

More information

Logic and Inferences

Logic and Inferences Artificial Intelligence Logic and Inferences Readings: Chapter 7 of Russell & Norvig. Artificial Intelligence p.1/34 Components of Propositional Logic Logic constants: True (1), and False (0) Propositional

More information

Formal methods in analysis

Formal methods in analysis Formal methods in analysis Jeremy Avigad Department of Philosophy and Department of Mathematical Sciences Carnegie Mellon University May 2015 Sequence of lectures 1. Formal methods in mathematics 2. Automated

More information

Validating QBF Invalidity in HOL4

Validating QBF Invalidity in HOL4 Interactive Theorem Proving (ITP) 14 July, 2010 Quantified Boolean Formulae Quantified Boolean Formulae Motivation System Overview Related Work QBF = propositional logic + quantifiers over Boolean variables

More information

Satisfiability Modulo Theories (SMT)

Satisfiability Modulo Theories (SMT) CS510 Software Engineering Satisfiability Modulo Theories (SMT) Slides modified from those by Aarti Gupta Textbook: The Calculus of Computation by A. Bradley and Z. Manna 1 Satisfiability Modulo Theory

More information

Combining Instance Generation and Resolution

Combining Instance Generation and Resolution Combining Instance Generation and Resolution Christopher Lynch and Ralph Eric McGregor Clarkson University www.clarkson.edu/projects/carl Abstract. We present a new inference system for first-order logic,

More information

2.5.2 Basic CNF/DNF Transformation

2.5.2 Basic CNF/DNF Transformation 2.5. NORMAL FORMS 39 On the other hand, checking the unsatisfiability of CNF formulas or the validity of DNF formulas is conp-complete. For any propositional formula φ there is an equivalent formula in

More information

Symbolic Computation and Theorem Proving in Program Analysis

Symbolic Computation and Theorem Proving in Program Analysis Symbolic Computation and Theorem Proving in Program Analysis Laura Kovács Chalmers Outline Part 1: Weakest Precondition for Program Analysis and Verification Part 2: Polynomial Invariant Generation (TACAS

More information

Quantifier Instantiation Techniques for Finite Model Finding in SMT

Quantifier Instantiation Techniques for Finite Model Finding in SMT Quantifier Instantiation Techniques for Finite Model Finding in SMT Andrew Reynolds, Cesare Tinelli Amit Goel, Sava Krstic Morgan Deters, Clark Barrett Satisfiability Modulo Theories (SMT) SMT solvers

More information

An Introduction to Z3

An Introduction to Z3 An Introduction to Z3 Huixing Fang National Trusted Embedded Software Engineering Technology Research Center April 12, 2017 Outline 1 SMT 2 Z3 Huixing Fang (ECNU) An Introduction to Z3 April 12, 2017 2

More information

Proof Reconstruction for Z3 in Isabelle/HOL

Proof Reconstruction for Z3 in Isabelle/HOL Proof Reconstruction for Z3 in Isabelle/HOL Sascha Böhme Technische Universität München boehmes@in.tum.de Abstract Currently, only a few Satisfiability Modulo Theories (SMT) solvers are able to produce

More information

Hierarchic Superposition: Completeness without Compactness

Hierarchic Superposition: Completeness without Compactness Hierarchic Superposition: Completeness without Compactness Peter Baumgartner 1 and Uwe Waldmann 2 1 NICTA and Australian National University, Canberra, Australia Peter.Baumgartner@nicta.com.au 2 MPI für

More information

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber 15-414 Aug 31, 2011 Why study SAT solvers? Many problems reduce to SAT. Formal verification CAD, VLSI Optimization AI, planning, automated

More information

Deductive Systems. Lecture - 3

Deductive Systems. Lecture - 3 Deductive Systems Lecture - 3 Axiomatic System Axiomatic System (AS) for PL AS is based on the set of only three axioms and one rule of deduction. It is minimal in structure but as powerful as the truth

More information

Solving Quantified Linear Arithmetic by Counterexample- Guided Instantiation

Solving Quantified Linear Arithmetic by Counterexample- Guided Instantiation Noname manuscript No. (will be inserted by the editor) Solving Quantified Linear Arithmetic by Counterexample- Guided Instantiation Andrew Reynolds Tim King Viktor Kuncak Received: date / Accepted: date

More information

Convert to clause form:

Convert to clause form: Convert to clause form: Convert the following statement to clause form: x[b(x) ( y [ Q(x,y) P(y) ] y [ Q(x,y) Q(y,x) ] y [ B(y) E(x,y)] ) ] 1- Eliminate the implication ( ) E1 E2 = E1 E2 x[ B(x) ( y [

More information

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University

COMP 182 Algorithmic Thinking. Proofs. Luay Nakhleh Computer Science Rice University COMP 182 Algorithmic Thinking Proofs Luay Nakhleh Computer Science Rice University 1 Reading Material Chapter 1, Section 3, 6, 7, 8 Propositional Equivalences The compound propositions p and q are called

More information

Solving SAT Modulo Theories

Solving SAT Modulo Theories Solving SAT Modulo Theories R. Nieuwenhuis, A. Oliveras, and C.Tinelli. Solving SAT and SAT Modulo Theories: from an Abstract Davis-Putnam-Logemann-Loveland Procedure to DPLL(T) Mooly Sagiv Motivation

More information

On Interpolation in Automated Theorem Proving

On Interpolation in Automated Theorem Proving Journal of Automated Reasoning manuscript No. DOI 10.1007/s10817-014-9314-0 On Interpolation in Automated Theorem Proving Maria Paola Bonacina Moa Johansson Received: 24 August 2013 / Accepted: 7 October

More information

T -resolution: Refinements and Model Elimination

T -resolution: Refinements and Model Elimination T -resolution: Refinements and Model Elimination Andrea Formisano Univ. of Rome La Sapienza, Dept. of Computer Science, Via Salaria 113, 00198 ROMA (I) formisan@dsi.uniroma1.it Alberto Policriti Univ.

More information

Propositional Logic: Models and Proofs

Propositional Logic: Models and Proofs Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505

More information

Finite model finding in satisfiability modulo theories

Finite model finding in satisfiability modulo theories University of Iowa Iowa Research Online Theses and Dissertations Fall 2013 Finite model finding in satisfiability modulo theories Andrew Joseph Reynolds University of Iowa Copyright 2013 Andrew J. Reynolds

More information

Lecture 9: The Splitting Method for SAT

Lecture 9: The Splitting Method for SAT Lecture 9: The Splitting Method for SAT 1 Importance of SAT Cook-Levin Theorem: SAT is NP-complete. The reason why SAT is an important problem can be summarized as below: 1. A natural NP-Complete problem.

More information

Foundations of Lazy SMT and DPLL(T)

Foundations of Lazy SMT and DPLL(T) Foundations of Lazy SMT and DPLL(T) Cesare Tinelli The University of Iowa Foundations of Lazy SMT and DPLL(T) p.1/86 Acknowledgments: Many thanks to Albert Oliveras for contributing some of the material

More information

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig

First-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig First-Order Logic First-Order Theories Roopsha Samanta Partly based on slides by Aaron Bradley and Isil Dillig Roadmap Review: propositional logic Syntax and semantics of first-order logic (FOL) Semantic

More information

Prolog and Logic Programming. CS152 Chris Pollett Dec. 3, 2008.

Prolog and Logic Programming. CS152 Chris Pollett Dec. 3, 2008. Prolog and Logic Programming CS152 Chris Pollett Dec. 3, 2008. Outline Logic and Logic Programs Horn Clauses Resolution and Unification Prolog Introduction So far this semester we have considered three

More information

Foundations of Logic Programming

Foundations of Logic Programming Foundations of Logic Programming Deductive Logic e.g. of use: Gypsy specifications and proofs About deductive logic (Gödel, 1931) Interesting systems (with a finite number of axioms) are necessarily either:

More information

12th International Satisfiability Modulo Theories Competition SMT-COMP 2017

12th International Satisfiability Modulo Theories Competition SMT-COMP 2017 12th International Satisfiability Modulo Theories Competition SMT-COMP 2017 Matthias Heizmann (co-organizer) Giles Reger (co-organizer) Tjark Weber (chair) Outline Main changes over last competition Benchmarks

More information

Labelled Superposition for PLTL. Martin Suda and Christoph Weidenbach

Labelled Superposition for PLTL. Martin Suda and Christoph Weidenbach Labelled Superposition for PLTL Martin Suda and Christoph Weidenbach MPI I 2012 RG1-001 January 2012 Authors Addresses Martin Suda Max-Planck-Institut für Informatik Campus E1 4 66123 Saarbrücken Germany

More information

First-Order Logic. Resolution

First-Order Logic. Resolution First-Order Logic Resolution 1 Resolution for predicate logic Gilmore s algorithm is correct and complete, but useless in practice. We upgrade resolution to make it work for predicate logic. 2 Recall:

More information

Resolution for Predicate Logic

Resolution for Predicate Logic Resolution for Predicate Logic The connection between general satisfiability and Herbrand satisfiability provides the basis for a refutational approach to first-order theorem proving. Validity of a first-order

More information

Integrating a SAT Solver with an LCF-style Theorem Prover

Integrating a SAT Solver with an LCF-style Theorem Prover Integrating a SAT Solver with an LCF-style Theorem Prover A Fast Decision Procedure for Propositional Logic for the System Tjark Weber webertj@in.tum.de PDPAR 05, July 12, 2005 Integrating a SAT Solver

More information

Comp487/587 - Boolean Formulas

Comp487/587 - Boolean Formulas Comp487/587 - Boolean Formulas 1 Logic and SAT 1.1 What is a Boolean Formula Logic is a way through which we can analyze and reason about simple or complicated events. In particular, we are interested

More information

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 8: Procedures for First-Order Theories, Part 2

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 8: Procedures for First-Order Theories, Part 2 Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 8: Procedures for First-Order Theories, Part 2 Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson Theory Procedures

More information

A two-tier technique for supporting quantifiers in a lazily proof-explicating theorem prover

A two-tier technique for supporting quantifiers in a lazily proof-explicating theorem prover A two-tier technique for supporting quantifiers in a lazily proof-explicating theorem prover K. Rustan M. Leino 0, Madan Musuvathi 0, and Xinming Ou 1 0 Microsoft Research, Redmond, WA, USA {leino,madanm@microsoft.com

More information

On Theorem Proving for Program Checking

On Theorem Proving for Program Checking On Theorem Proving for Program Checking Historical perspective and recent developments Maria Paola Bonacina Dipartimento di Informatica Università degli Studi di Verona Strada Le Grazie 15, I-37134 Verona,

More information

Exploiting symmetry in SMT problems

Exploiting symmetry in SMT problems Exploiting symmetry in SMT problems David Déharbe, Pascal Fontaine 2, Stephan Merz 2, and Bruno Woltzenlogel Paleo 3 Universidade Federal do Rio Grande do Norte, Natal, RN, Brazil david@dimap.ufrn.br 2

More information

Model Evolution Based Theorem Proving

Model Evolution Based Theorem Proving 1 Model Evolution Based Theorem Proving Peter Baumgartner Abstract The area of Automated Theorem Proving is characterized by the development of numerous calculi and proof procedures, from general purpose

More information

On evaluating decision procedures for modal logic

On evaluating decision procedures for modal logic On evaluating decision procedures for modal logic Ullrich Hustadt and Renate A. Schmidt Max-Planck-Institut fur Informatik, 66123 Saarbriicken, Germany {hustadt, schmidt} topi-sb.mpg.de Abstract This paper

More information

The Model Evolution Calculus as a First-Order DPLL Method

The Model Evolution Calculus as a First-Order DPLL Method The Model Evolution Calculus as a First-Order DPLL Method Peter Baumgartner a a NICTA Canberra, ACT, Australia Cesare Tinelli b,1 b Department of Computer Science The University of Iowa Iowa City, IA,

More information

Lecture 1: Logical Foundations

Lecture 1: Logical Foundations Lecture 1: Logical Foundations Zak Kincaid January 13, 2016 Logics have two components: syntax and semantics Syntax: defines the well-formed phrases of the language. given by a formal grammar. Typically

More information

A Tableau Calculus for Minimal Modal Model Generation

A Tableau Calculus for Minimal Modal Model Generation M4M 2011 A Tableau Calculus for Minimal Modal Model Generation Fabio Papacchini 1 and Renate A. Schmidt 2 School of Computer Science, University of Manchester Abstract Model generation and minimal model

More information

Strong AI vs. Weak AI Automated Reasoning

Strong AI vs. Weak AI Automated Reasoning Strong AI vs. Weak AI Automated Reasoning George F Luger ARTIFICIAL INTELLIGENCE 6th edition Structures and Strategies for Complex Problem Solving Artificial intelligence can be classified into two categories:

More information

Solving Constrained Horn Clauses using Interpolation

Solving Constrained Horn Clauses using Interpolation Solving Constrained Horn Clauses using Interpolation MSR-TR-2013-6 Kenneth L. McMillan Micrsoft Research Andrey Rybalchenko Technische Universität München Abstract We present an interpolation-based method

More information

CTL-RP: A Computational Tree Logic Resolution Prover

CTL-RP: A Computational Tree Logic Resolution Prover 1 -RP: A Computational Tree Logic Resolution Prover Lan Zhang a,, Ullrich Hustadt a and Clare Dixon a a Department of Computer Science, University of Liverpool Liverpool, L69 3BX, UK E-mail: {Lan.Zhang,

More information

SyMT: finding symmetries in SMT formulas

SyMT: finding symmetries in SMT formulas SyMT: finding symmetries in SMT formulas Work in progress Carlos Areces, David Déharbe 2, Pascal Fontaine 3 and Ezequiel Orbe FaMAF, U. Nacional de Córdoba (Argentina) 2 Universidade Federal do Rio Grande

More information

1 FUNDAMENTALS OF LOGIC NO.10 HERBRAND THEOREM Tatsuya Hagino hagino@sfc.keio.ac.jp lecture URL https://vu5.sfc.keio.ac.jp/slide/ 2 So Far Propositional Logic Logical connectives (,,, ) Truth table Tautology

More information

SMT: Satisfiability Modulo Theories

SMT: Satisfiability Modulo Theories SMT: Satisfiability Modulo Theories Ranjit Jhala, UC San Diego April 9, 2013 Decision Procedures Last Time Propositional Logic Today 1. Combining SAT and Theory Solvers 2. Theory Solvers Theory of Equality

More information

Integrating Answer Set Programming and Satisfiability Modulo Theories

Integrating Answer Set Programming and Satisfiability Modulo Theories Integrating Answer Set Programming and Satisfiability Modulo Theories Ilkka Niemelä Helsinki University of Technology (TKK) Department of Information and Computer Science http://www.tcs.tkk.fi/ ini/ References:

More information

Knowledge Compilation and Theory Approximation. Henry Kautz and Bart Selman Presented by Kelvin Ku

Knowledge Compilation and Theory Approximation. Henry Kautz and Bart Selman Presented by Kelvin Ku Knowledge Compilation and Theory Approximation Henry Kautz and Bart Selman Presented by Kelvin Ku kelvin@cs.toronto.edu 1 Overview Problem Approach Horn Theory and Approximation Computing Horn Approximations

More information

A heuristic prover for real inequalities

A heuristic prover for real inequalities A heuristic prover for real inequalities Jeremy Avigad Department of Philosophy and Department of Mathematical Sciences Carnegie Mellon University joint work with Robert Y. Lewis and Cody Roux (many slides

More information

Proof Complexity of Quantified Boolean Formulas

Proof Complexity of Quantified Boolean Formulas Proof Complexity of Quantified Boolean Formulas Olaf Beyersdorff School of Computing, University of Leeds Olaf Beyersdorff Proof Complexity of Quantified Boolean Formulas 1 / 39 Proof complexity (in one

More information