Model-Driven Decision Procedures for Arithmetic SYNASC 2013 Leonardo de Moura Microsoft Research Logic Engines as a Service SAGE ððððð ð3 Satisfiability Solution/Model ðĨ2 + ðĶ2 < 1 ððð ðĨðĶ > 0.1 ðĨ 2 + ðĶ 2 < 1 ððð ðĨðĶ > 1 = 7 8 unsat, Proof Is execution path P feasible? SAGE sat, ðĨ = 1 ,ðĶ 8 Is assertion X violated? W I T N E S S Is Formula F Satisfiable? The RISE of Model-Driven Techniques Saturation x Search Model-finding Proofs Proof-finding Models SAT ð1 ∨ ¬ð2, ð1 = ðĄððĒð, ¬ð1 ∨ ð2 ∨ ð3, ð2 = ðĄððĒð, ð3 ð3 = ðĄððĒð CNF is a set (conjunction) set of clauses Clause is a disjunction of literals Literal is an atom or the negation of an atom Two procedures Resolution Proof-finder Saturation DPLL Model-finder Search Resolution ðķ ∨ ð, ð· ∨ ¬ð ⇒ ðķ ∨ ð· ð, ¬ð ⇒ unsat Improvements Delete tautologies ð ∨ ¬ð ∨ ðķ Ordered Resolution Subsumption (delete redundant clauses) ðķ ð ðĒðð ðĒððð ðķ ∨ ð· … Resolution: Example Resolution: Example Resolution: Example Resolution: Example Resolution: Example Resolution: Problem Exponential time and space Unit Resolution ðķ ∨ ð, ¬ð ⇒ ðķ ðķ subsumes ðķ∨ð DPLL Split rule ð ð, ð ð, ¬ð DPLL = Unit Resolution + Split rule DPLL ðĨ ∨ ðĶ, ¬ðĨ ∨ ðĶ, ðĨ ∨ ðĶ, ¬ðĨ ∨ ðĶ, ðĨ ∨ ¬ðĶ, ¬ðĨ ∨ ¬ðĶ, ðĨ ðĨ ∨ ¬ðĶ, ¬ðĨ ∨ ¬ðĶ DPLL ðĨ ∨ ðĶ, ¬ðĨ ∨ ðĶ, ðĨ ∨ ðĶ, ¬ðĨ ∨ ðĶ, ðĨ ∨ ¬ðĶ, ¬ðĨ ∨ ¬ðĶ, ðĨ ðĨ ∨ ¬ðĶ, ¬ðĨ ∨ ¬ðĶ DPLL ðĨ ∨ ðĶ, ðĶ, ¬ðĶ, ðĨ ¬ðĨ ∨ ðĶ, ðĨ ∨ ¬ðĶ, ¬ðĨ ∨ ¬ðĶ DPLL ðĨ ∨ ðĶ, ¬ðĨ ∨ ðĶ, ðĶ, ¬ðĶ, ðĨ, ðĒðð ððĄ ðĨ ∨ ¬ðĶ, ¬ðĨ ∨ ¬ðĶ DPLL ðĨ ∨ ðĶ, ¬ðĨ ∨ ðĶ, ðĶ, ¬ðĶ, ðĨ, ðĒðð ððĄ ðĨ ∨ ¬ðĶ, ðĨ ∨ ðĶ, ¬ðĨ ∨ ðĶ, ðĨ ∨ ¬ðĶ, ¬ðĨ ∨ ¬ðĶ, ¬ðĨ ¬ðĨ ∨ ¬ðĶ DPLL ðĨ ∨ ðĶ, ¬ðĨ ∨ ðĶ, ðĶ, ¬ðĶ, ðĨ, ðĒðð ððĄ ðĨ ∨ ¬ðĶ, ðĨ ∨ ðĶ, ¬ðĨ ∨ ðĶ, ðĨ ∨ ¬ðĶ, ¬ðĨ ∨ ¬ðĶ, ¬ðĨ ¬ðĨ ∨ ¬ðĶ CDCL: Conflict Driven Clause Learning DPLL Resolution Model Proof Linear Arithmetic Fourier-Motzkin Proof-finder Saturation Simplex Model-finder Search Fourier-Motzkin ðĄ1 ≤ ððĨ, ððĄ1 ≤ ðððĨ, ððĨ ≤ ðĄ2 ðððĨ ≤ ððĄ2 ððĄ1 ≤ ððĄ2 Very similar to Resolution Exponential time and space Polynomial Constraints AKA Existential Theory of the Reals ïĪR ðĨ 2 − 4ðĨ + ðĶ 2 − ðĶ + 8 < 1 ðĨðĶ − 2ðĨ − 2ðĶ + 4 > 1 Applications CAD “Big Picture” 1. Project/Saturate set of polynomials 2. Lift/Search: Incrementally build assignment ðĢ: ðĨð → ðžð Isolate roots of polynomials ðð (ðķ, ðĨ) Select a feasible cell ðķ, and assign ðĨð some ðžð ∈ ðķ If there is no feasible cell, then backtrack CAD “Big Picture” 2 ðĨ4 − ðĨ2 + 1 2 ðĨ +ðĶ −1<0 ðĨðĶ −1>0 1. Saturate ðĨ2 − 1 ðĨ 2. Search (−∞, −ð) −ð (−ð, ð) ð (ð, ð) ð (ð, ∞) ðĨ4 − ðĨ2 + 1 + + + + + + + ðĨ2 − 1 + 0 - - - 0 + ðĨ - - - 0 + + + CAD “Big Picture” ð ðĨ4 − ðĨ2 + 1 ð ð +ð −ð<0 ðð −ð>0 1. Saturate ðĨ2 − 1 ðĨ ð (−∞, − ) ð ð ð − (− , ∞) ð ð 4 + ðĶ2 − 1 + + + −2y − 1 + 0 - ðïŪ − ð 2. Search (−∞, −ð) −ð (−ð, ð) ð (ð, ð) ð (ð, ∞) ðĨ4 − ðĨ2 + 1 + + + + + + + ðĨ2 − 1 + 0 - - - 0 + ðĨ - - - 0 + + + CAD “Big Picture” ð ðĨ4 − ðĨ2 + 1 ð ð +ð −ð<ð ðĨðĶ −1>0 1. Saturate ðĨ2 − 1 ðĨ ð (−∞, − ) ð ð ð − (− , ∞) ð ð ð + ðð − ð + + + −2y − 1 + 0 - ðïŪ − ð CONFLICT 2. Search (−∞, −ð) −ð (−ð, ð) ð (ð, ð) ð (ð, ∞) ðĨ4 − ðĨ2 + 1 + + + + + + + ðĨ2 − 1 + 0 - - - 0 + ðĨ - - - 0 + + + Models Static x Dynamic Optimistic approach Key ideas Proofs NLSAT: Model-Based Search Start the Search before Saturate/Project We saturate on demand Model guides the saturation NLSAT (1) Two kinds of decision 1. case-analysis (Boolean) ðĨ2 + ðĶ2 < 1 ∨ ð < ð ∨ ðĨ ðĶ > 1 2. model construction (CAD lifting) ðïŪ − ð (−∞, −ð) −ð (−ð, ð) ð (ð, ð) ð (ð, ∞) ðĨ4 − ðĨ2 + 1 + + + + + + + ðĨ2 − 1 + 0 - - - 0 + ðĨ - - - 0 + + + NLSAT (1) Two kinds of decision 1. case-analysis (Boolean) 2. model construction (CAD lifting) Parametric calculus: ððĨððððð ðđ, ð Finite basis explanation function Explanations may contain new literals They evaluate to false in the current state NLSAT (2) Key ideas: Use partial solution to guide the search Feasible Region ðĨ 3 + 2ðĨ 2 + 3ðĶ 2 − 5 < 0 Starting search Partial solution: ðĨ ← 0.5 −4ðĨðĶ − 4ðĨ + ðĶ > 1 What is the core? ðĨ2 + ðĶ2 < 1 Can we extend it to ðĶ? NLSAT (2) Key ideas: Use partial solution to guide the search Feasible Region ðĨ 3 + 2ðĨ 2 + 3ðĶ 2 − 5 < 0 Starting search Partial solution: ðĨ ← 0.5 −4ðĨðĶ − 4ðĨ + ðĶ > 1 What is the core? ðĨ2 + ðĶ2 < 1 Can we extend it to ðĶ? NLSAT (3) Key ideas: Solution based Project/Saturate Standard project operators are pessimistic. Coefficients can vanish! NLSAT (4) Key ideas: Lemma Learning Prevent a Conflict from happening again. Current assignment ðĨ → 0.75 ðĶ → 0.75 Conflict ðĨ2 + ðĶ2 + ð§2 < 1 Current assignments does not satisfy new constraint. Lemma −1 < ðĨ < 1 ∧ ðĶ > ððððĄ2 1 − ðĶ 2 − ðĨ 2 ⇒ ⊥ NLSAT (5) Key ideas: Nonchronological Backtracking Conflict ðĨðĪ=1 ð ð=1 The values chosen for ð§ and ðĶ are irrelevant. ð= ð ð=ð Machinery Multivariate & univariate Polynomials Basic operations, Pseudo-division, GCD, Resultant, PSC, Factorization, Root isolation algorithms, Sturm sequences Binary rationals ð 2ð Real Algebraic Numbers Experimental Results (1) OUR NEW ENGINE Experimental Results (2) OUR NEW ENGINE Other examples (for linear arithmetic) Generalizing DPLL to richer logics Fourier-Motzkin X [McMillan et al 2009] Conflict Resolution [Korovin et al 2009] Other examples Array Theory by Axiom Instantiation X Lemmas on Demand For Theory of Array [Brummayer-Biere 2009] ∀ð, ð, ðĢ: ð ð â ðĢ ð = ðĢ ∀ð, ð, ð, ðĢ: ð = ð ∨ ð ð â ðĢ ð = ð[ð] Saturation: successful instances Polynomial time procedures Gaussian Elimination Congruence Closure MCSat Model-Driven SMT Lift ideas from CDCL to SMT Generalize ideas found in model-driven approaches Easier to implement Model construction is explicit MCSat ðĨ ≥ 2, ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) MCSat ðĨ ≥ 2, ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĨ≥2 Propagations MCSat ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĨ≥1 Propagations MCSat ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ≥1 Propagations MCSat ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 Boolean Decisions MCSat ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 ðĨ → 2 Semantic Decisions MCSat ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 ðĨ → 2 Conflict We can’t find a value for ðĶ s.t. 4 + ðĶ 2 ≤ 1 MCSat ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 ðĨ → 2 Conflict We can’t find a value for ðĶ s.t. 4 + ðĶ 2 ≤ 1 Learning that ¬ ðĨ 2 + ðĶ 2 ≤ 1 ∨ ¬(ðĨ= 2) is not productive MCSat ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 ¬(ðĨ = 2) ¬ ðĨ 2 + ðĶ 2 ≤ 1 ∨ ¬(ðĨ = 2) Learning that ¬ ðĨ 2 + ðĶ 2 ≤ 1 ∨ ¬(ðĨ= 2) is not productive MCSat ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 ¬(ðĨ = 2) ðĨ → 3 ¬ ðĨ 2 + ðĶ 2 ≤ 1 ∨ ¬(ðĨ = 2) Learning that ¬ ðĨ 2 + ðĶ 2 ≤ 1 ∨ ¬(ðĨ= 2) is not productive MCSat ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 “Same” Conflict (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 ¬(ðĨ = 2) ðĨ → 3 ¬ ðĨ 2 + ðĶ 2 ≤ 1 ∨ ¬(ðĨ = 2) We can’t find a value for ðĶ s.t. 9 + ðĶ 2 ≤ 1 Learning that ¬ ðĨ 2 + ðĶ 2 ≤ 1 ∨ ¬(ðĨ= 2) is not productive ðĨ ≥ 2, ðĨ≥2 ðĶ (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 ðĨ → 2 Conflict ðĨ2 + ðĶ2 ≤ 1 ðĨ ðĨ→2 −1 ≤ ðĨ, ðĨ ≤ 1 ¬(ðĨ 2 + ðĶ 2 ≤ 1) ∨ ðĨ ≤ 1 MCSat ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 ðĨ≤1 ¬(ðĨ 2 + ðĶ 2 ≤ 1) ∨ ðĨ ≤ 1 MCSat ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 ðĨ≤1 ¬(ðĨ 2 + ðĶ 2 ≤ 1) ∨ ðĨ ≤ 1 Conflict ¬ ðĨ ≥ 2 ∨ ¬(ðĨ ≤ 1) MCSat ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 ¬(ðĨ 2 + ðĶ 2 ≤ 1) ∨ ðĨ ≤ 1 Learned by resolution ¬ ðĨ ≥ 2 ∨ ¬(ðĨ 2 + ðĶ 2 ≤ 1) MCSat ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ¬(ðĨ 2 + ðĶ 2 ≤ 1) ¬ ðĨ ≥ 2 ∨ ¬(ðĨ 2 + ðĶ 2 ≤ 1) ¬(ðĨ 2 + ðĶ 2 ≤ 1) ∨ ðĨ ≤ 1 MCSat: FM Example −ðĨ + ð§ + 1 ≤ 0 ð§ → 0 −ðĨ + ð§ + 1 ≤ 0, ≡ ð§ + 1 ≤ ðĨ, ðĨ−ðĶ ≤0 ðĨ−ðĶ ≤0 ðĶ→0 ð§ → 0, ðĨ≤ðĶ 1 ≤ ðĨ, ðĨ≤0 We can’t find a value of ðĨ ðĶ→0 MCSat: FM Example −ðĨ + ð§ + 1 ≤ 0 ð§ → 0 −ðĨ + ð§ + 1 ≤ 0, ðĨ−ðĶ ≤0 ðĨ−ðĶ ≤0 ðĶ→0 ð§ → 0, ðĶ→0 ∃ðĨ: −ðĨ + ð§ + 1 ≤ 0 ∧ ðĨ − ðĶ ≤ 0 ð§+1−ðĶ ≤0 Fourier-Motzkin ¬ −ðĨ + ð§ + 1 ≤ 0 ∨ ¬ ðĨ − ðĶ ≤ 0 ∨ ð§ + 1 − ðĶ ≤ 0 MCSat: FM Example −ðĨ + ð§ + 1 ≤ 0 ð§ → 0 ðĨ−ðĶ ≤0 ð§+1−ðĶ ≤0 ¬ −ðĨ + ð§ + 1 ≤ 0 ∨ ¬ ðĨ − ðĶ ≤ 0 ∨ ð§ + 1 − ðĶ ≤ 0 MCSat: FM Example −ðĨ + ð§ + 1 ≤ 0 ð§ → 0 ðĨ−ðĶ ≤0 ð§+1−ðĶ ≤0 ðĶ→1 ¬ −ðĨ + ð§ + 1 ≤ 0 ∨ ¬ ðĨ − ðĶ ≤ 0 ∨ ð§ + 1 − ðĶ ≤ 0 −ðĨ + ð§ + 1 ≤ 0, ≡ ð§ + 1 ≤ ðĨ, ðĨ−ðĶ ≤0 ð§ → 0, ðĨ≤ðĶ 1 ≤ ðĨ, ðĨ≤1 ðĶ→1 MCSat: FM Example −ðĨ + ð§ + 1 ≤ 0 ð§ → 0 ðĨ−ðĶ ≤0 ð§+1−ðĶ ≤0 ðĶ →1 ðĨ →1 ¬ −ðĨ + ð§ + 1 ≤ 0 ∨ ¬ ðĨ − ðĶ ≤ 0 ∨ ð§ + 1 − ðĶ ≤ 0 −ðĨ + ð§ + 1 ≤ 0, ≡ ð§ + 1 ≤ ðĨ, ðĨ−ðĶ ≤0 ð§ → 0, ðĨ≤ðĶ 1 ≤ ðĨ, ðĨ≤1 ðĶ→1 MCSat – Finite Basis Every theory that admits quantifier elimination has a finite basis (given a fixed assignment order) ðđ[ðĨ, ðĶ1 , … , ðĶð ] ðĶ1 → ðž1 , … , ðĶð → ðžð ∃ðĨ: ðđ[ðĨ, ðĶ1 , … , ðĶð ] ðķ1 [ðĶ1 , … , ðĶð ] ∧ âŊ ∧ ðķð [ðĶ1 , … , ðĶð ] ¬ðđ ðĨ, ðĶ1 , … , ðĶð ∨ ðķð [ðĶ1 , … , ðĶð ] MCSat – Finite Basis ðđð [ðĨ1, ðĨ2 , … , ðĨð−1 , ðĨð ] ðđð−1 [ðĨ1, ðĨ2 , … , ðĨð−1 ] … ðđ2 [ðĨ1, ðĨ2 ] ðđ1 [ðĨ1 ] MCSat – Finite Basis ðđð [ðĨ1, ðĨ2 , … , ðĨð−1 , ðĨð ] ðđð−1 [ðĨ1, ðĨ2 , … , ðĨð−1 ] … ðđ2 [ðĨ1, ðĨ2 ] ðđ1 [ðĨ1 ] MCSat – Finite Basis ðđð [ðĨ1, ðĨ2 , … , ðĨð−1 , ðĨð ] ðđð−1 [ðĨ1, ðĨ2 , … , ðĨð−1 ] … ðđ2 [ðĨ1, ðĨ2 ] ðđ1 [ðĨ1 ] MCSat – Finite Basis ðđð [ðĨ1, ðĨ2 , … , ðĨð−1 , ðĨð ] ðđð−1 [ðĨ1, ðĨ2 , … , ðĨð−1 ] … ðđ2 [ðĨ1, ðĨ2 ] ðđ1 [ðĨ1 ] MCSat – Finite Basis Every “finite” theory has a finite basis Example: Fixed size Bit-vectors ðđ[ðĨ, ðĶ1 , … , ðĶð ] ðĶ1 → ðž1 , … , ðĶð → ðžð ¬ðđ ðĨ, ðĶ1 , … , ðĶð ∨ ¬(ðĶ1 = ðž1 ) ∨ âŊ ∨ ¬(ðĶð = ðžð ) MCSat – Finite Basis Theory of uninterpreted functions has a finite basis Theory of arrays has a finite basis [Brummayer- Biere 2009] In both cases the Finite Basis is essentially composed of equalities between existing terms. MCSat: Uninterpreted Functions ð = ð + 1, ð ð − 1 < ð, ð ð > ð ð = ð + 1, ð ð < ð, ð ð > ð, ð = ð − 1 ð = ð + 1, ð ð < ð, ð ð > ð, ð = ð − 1 Treat ð(ð) and ð(ð) as variables Generalized variables MCSat: Uninterpreted Functions ð = ð + 1, ð ð < ð, ð ð > ð, ð = ð − 1 ð → 0 ð → 0 ð(ð) → 0 ð(ð) → 2 Conflict: ð ð and ð ð must be equal ¬ ð = ð ∨ ð ð = ð(ð) MCSat: Uninterpreted Functions ð = ð + 1, ð ð < ð, ð ð > ð, ð = ð − 1 ð → 0 ð → 0 ð(ð) → 0 ð = ð (Semantic) Propagation ¬ ð = ð ∨ ð ð = ð(ð) MCSat: Uninterpreted Functions ð = ð + 1, ð ð < ð, ð ð > ð, ð = ð − 1 ð → 0 ð → 0 ð(ð) → 0 ð = ð ð ð = ð(ð) ¬ ð = ð ∨ ð ð = ð(ð) MCSat: Uninterpreted Functions ð = ð + 1, ð ð < ð, ð ð > ð, ð = ð − 1 ð → 0 ð → 0 ð(ð) → 0 ð = ð ð ð = ð(ð) ð(ð) → 0 ¬ ð = ð ∨ ð ð = ð(ð) MCSat – Finite Basis We can also use literals from the finite basis in decisions. Application: simulate branch&bound for bounded linear integer arithmetic ðĨ2 6 LP solution: ðĨ1 ≤ 0 ðĨ1 = 0 ðĨ2 = 3 ðĨ1 = 0.8 ðĨ2 = 2.4 ðĨ1 ≥ 1 ðĨ1 = 1 ðĨ2 = 2 5 4 3 2 1 0 1 2 3 4 5 6 ðĨ1 MCSat: Termination Propagations Boolean Decisions Semantic Decisions MCSat âŧ Propagations Boolean Decisions Semantic Decisions MCSat âŧ Propagations Boolean Decisions Semantic Decisions MCSat Maximal Elements … |ðđððððĄððĩðð ðð | … ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 Conflict ¬ ðĨ ≥ 2 ∨ ¬(ðĨ ≤ 1) ðĨ≤1 ¬(ðĨ 2 + ðĶ 2 ≤ 1) ∨ ðĨ ≤ 1 ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 Conflict ¬ ðĨ ≥ 2 ∨ ¬(ðĨ ≤ 1) ðĨ ≥ 2, ðĨ≥2 ðĨ≤1 ¬(ðĨ 2 + ðĶ 2 ≤ 1) ∨ ðĨ ≤ 1 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ¬(ðĨ 2 + ðĶ 2 ≤ 1) ¬ ðĨ ≥ 2 ∨ ¬(ðĨ 2 + ðĶ 2 ≤ 1) ¬(ðĨ 2 + ðĶ 2 ≤ 1) ∨ ðĨ ≤ 1 ðĨ ≥ 2, ðĨ≥2 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 ðĶ ≥ 1 ðĨ2 + ðĶ2 ≤ 1 Conflict ¬ ðĨ ≥ 2 ∨ ¬(ðĨ ≤ 1) ðĨ ≥ 2, ðĨ≥2 ðĨ≤1 ¬(ðĨ 2 + ðĶ 2 ≤ 1) ∨ ðĨ ≤ 1 ¬ðĨ ≥ 1 ∨ ðĶ ≥ 1 , ðĨ≥1 (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) (ðĨ 2 + ðĶ 2 ≤ 1 ∨ ðĨðĶ > 1) ðĶ ≥ 1 ¬(ðĨ 2 + ðĶ 2 ≤ 1) ¬ ðĨ ≥ 2 ∨ ¬(ðĨ 2 + ðĶ 2 ≤ 1) ¬(ðĨ 2 + ðĶ 2 ≤ 1) ∨ ðĨ ≤ 1 MCSat ðĨ < 1 ∨ ð, ðĨ→1 ¬ð ∨ ðĨ = 2 MCSat ðĨ < 1 ∨ ð, ðĨ→1 ð ¬ð ∨ ðĨ = 2 MCSat ðĨ < 1 ∨ ð, ðĨ→1 ¬ð ∨ ðĨ = 2 ð Conflict (evaluates to false) MCSat ðĨ < 1 ∨ ð, ðĨ→1 ¬ð ∨ ðĨ = 2 ð New clause ðĨ <1∨ðĨ =2 MCSat ðĨ < 1 ∨ ð, ðĨ→1 ¬ð ∨ ðĨ = 2 ð New clause ðĨ <1∨ðĨ =2 ðĨ<1 MCSat ðĨ < 1 ∨ ð, ðĨ→1 ¬ð ∨ ðĨ = 2 ð New clause ðĨ <1∨ðĨ =2 ðĨ<1 MCSat: Architecture Arithmetic Arrays Boolean Lists MCSat prototype: 7k lines of code Deduction Rules Boolean Resolution Fourier-Motzkin Equality Split Ackermann expansion aka Congruence Normalization MCSat: preliminary results prototype: 7k lines of code QF_LRA MCSat: preliminary results prototype: 7k lines of code QF_UFLRA and QF_UFLIA Conclusion Logic as a Service Model-Based techniques are very promising MCSat http://z3.codeplex.com http://rise4fun.com/z3