The Model Evolution Calculus Peter Baumgartner, MPI Saarbruecken and U Koblenz Cesare Tinelli, U Iowa Background • Recent research in propositional satisfiability (SAT) has been very successful. • An effective method for SAT was pioneered by Davis, Putman, Logemann, and Loveland (DPLL). • The best modern SAT solvers (MiniSat, zChaff, Berkmin,…) are based on DPLL. Baumgarter & Tinelli: The Model Evolution Calculus The DPLL Procedure: Main Idea { p q, q r s, p q, p r s, p } assert: p = T { q r s, q, r s } Baumgarter & Tinelli: The Model Evolution Calculus The DPLL Procedure: Main Idea { p q, q r s, p q, p r s, p } assert: p = T { q r s, q, r s } assert: q = F { r s, r s } Baumgarter & Tinelli: The Model Evolution Calculus The DPLL Procedure: Main Idea { p q, q r s, p q, p r s, p } assert: p = T { q r s, q, r s } assert: q = F { r s, r s } guess: r = T { s, s } Baumgarter & Tinelli: The Model Evolution Calculus The DPLL Procedure: Main Idea { p q, q r s, p q, p r s, p } assert: p = T { q r s, q, r s } assert: q = F { r s, r s } guess: r = T { s, s } contradiction! Baumgarter & Tinelli: The Model Evolution Calculus The DPLL Procedure: Main Idea { p q, q r s, p q, p r s, p } assert: p = T { q r s, q, r s } assert: q = F { r s, r s } guess: r = F {} satisfiable! Baumgarter & Tinelli: The Model Evolution Calculus Correctness of DPLL method Prop. A formula is satisfiable iff there is a sequence of guesses such that DPLL() = Baumgarter & Tinelli: The Model Evolution Calculus Research Questions • Can we lift DPLL to the first-order level? • Can we combine successful SAT techniques (unit propagation, backjumping, learning,…) with successful first-order techniques (unification, subsumption, ...)? Baumgarter & Tinelli: The Model Evolution Calculus Previous Work • Instance based methods - (O)SHL [Plaisted], - Disconnection method [Billon], [Letz, Stenz], - Hyper Tableaux Next Generation [Baumgartner], - Primal/Dual approach [Hooker et al], - Ganzinger-Korovin method • First-Order DPLL [Baumgartner] - proper lifting of split rule Baumgarter & Tinelli: The Model Evolution Calculus This Work The Model Evolution Calculus ≈ First-Order DPLL + DPLL’s simplification rules + Universal variables The calculus is a direct lifting of the whole DPLL to the first-order level. Baumgarter & Tinelli: The Model Evolution Calculus Overview • The DPLL method as a sequent-style calculus • A model generation view of DPLL • The Model Evolution calculus as a lifting of the DPLL calculus • Properties of the ME calculus • Further Work Baumgarter & Tinelli: The Model Evolution Calculus The DPLL Calculus {literals} {clauses} Context (asserted literals) Baumgarter & Tinelli: The Model Evolution Calculus The DPLL Calculus {literals} L literal {clauses} empty clause C clause subsume , L C if L resolve , L C , C if L close , Baumgarter & Tinelli: The Model Evolution Calculus The DPLL Calculus {literals} L literal {clauses} empty clause C clause subsume , L C if L resolve , L C , C if L close , L1 ... Ln Baumgarter & Tinelli: The Model Evolution Calculus if L1 ,..., Ln The DPLL Calculus (cont.) {literals} L literal assert split {clauses} empty clause C clause , L , L , L L if L L C, , L L C , , L L C , Baumgarter & Tinelli: The Model Evolution Calculus C if L L The DPLL Calculus: Key Insight can be seen as a finite representation of a Herbrand interpretation: I { L | L is positive} If I does not satisfy , “repair” it by adding literals to Baumgarter & Tinelli: The Model Evolution Calculus Some Notation I || iff I | and there is no ' s.t. I ' | permanently satisfies Examples: Note: at the prop. level I{ p} | p q but not I { p} || p q I || L iff L I{p} | p q and I {p} || p q Baumgarter & Tinelli: The Model Evolution Calculus The DPLL Calculus Revisited: A Model Evolution View subsume , L C if I || L resolve , L C , C if I || L close , C Baumgarter & Tinelli: The Model Evolution Calculus if I || C The DPLL Calculus Revisited: A Model Evolution View split L C, if (*) , L L C , , L L C , 1) not I | L C (*) 2) L not contradictory with 3) L not contradictory with Note: I , L || L (*) implies I , L || L Baumgarter & Tinelli: The Model Evolution Calculus I , L || L C not I , L | L C The DPLL Calculus Revisited: A Model Evolution View assert , L if (*) , L , L not I || L (*) L not contradictory with Baumgarter & Tinelli: The Model Evolution Calculus Lifting DPLL to First Order Logic Main questions: • How to use contexts to represent a FOL Herbrand interpretation • What is a contradictory context • How to check |= • How to check ||= • How to repair an interpretation Baumgarter & Tinelli: The Model Evolution Calculus First-order Contexts Sets of parametric literals L(u,v,..) and universal literals L(x,y,…) • parameters (u,v, …) and variables (x,y,…) both stand for ground terms • (roughly) a parametric literal L in denotes all of its ground instances, unless L’ for some instance L’ of L • a universal literal denotes all of its ground instances, unconditionally Baumgarter & Tinelli: The Model Evolution Calculus First-order Contexts: Examples = { p(u,v) } p(u,v) • produces every instance of p(u,v) Baumgarter & Tinelli: The Model Evolution Calculus First-order Contexts: Examples = {p(u,v), p(u,u)} p(u,v) p(u,u) • produces every instance of p(u,v) except the instances of p(u,u) • produces every instance of p(u,u) Baumgarter & Tinelli: The Model Evolution Calculus First-order Contexts: Examples = {p(u,v), p(u,u), p(f(u),f(u))} p(u,v) p(u,u) p(f(u),f(u)) Baumgarter & Tinelli: The Model Evolution Calculus First-order Contexts: Examples = {p(f(u),v), p(u,g(v))} p(f(u),v) OK p(u,g(v)) p(f(u),g(v)) Baumgarter & Tinelli: The Model Evolution Calculus First-order Contexts: Examples = {p(f(u),v), p(u,g(v)), p(b,g(v)) } p(f(u),v) OK p(u,g(v)) p(b,g(v)) Baumgarter & Tinelli: The Model Evolution Calculus First-order Contexts: Examples = {p(u,v), p(u,v)} p(u,v) p(u,v) Baumgarter & Tinelli: The Model Evolution Calculus Not OK! Contradictory First-order Contexts: Examples = {p(u,v), p(x,x)} p(u,v) p(x,x) produces every instance of p(x,x) with no possible exceptions Baumgarter & Tinelli: The Model Evolution Calculus First-order Contexts: Examples = {p(u,v), p(x,x), p(f(u),f(u)} p(u,v) p(x,x) p(f(u),f(u)) Baumgarter & Tinelli: The Model Evolution Calculus Not OK! Contradictory Initial Context = {v} v • Lambda produces no positive literals • We’ll consider only extensions of {v} Baumgarter & Tinelli: The Model Evolution Calculus Contexts and Interpretations Let be a non-contradictory context with parametric literals and universal literals denotes a Herbrand interpretation: L is ground and positive, I L L is produced by Baumgarter & Tinelli: The Model Evolution Calculus Checking |= Let be a non-contradictory context Let L1 ... Ln be a (parameter-free) clause If not I | L1 ... Ln then there are fresh variants K1 ,..., K n of literals in and a substitution such that is a simultaneous mgu of {K1 , L1},...,{K n , Ln } • is called a context unifier (of the clause against ) Baumgarter & Tinelli: The Model Evolution Calculus Checking ||= Let be a non-contradictory context Let L1 ... Ln be a (parameter-free) clause I || ( L1 ... Ln ) Example iff there are fresh variants K1 ,..., K n of literals in • I{p(u,v)} ||= (p(x,y) p(x,x)) and a substitution • equivalently, match such that {p(x,y), p(x,x)} against {p($,$)} 1. is a simultaneous mgu of {K1 , L1},...,{K n , Ln } 2. for each i, Pars( Ki ) Pars Baumgarter & Tinelli: The Model Evolution Calculus The Model Evolution Calculus: Semantical View assert subsume not I || L , L if , L , L L not contr. with , L C if I || L Exactly the same as in DPLL! resolve close , L C , C , C if I || L if I || C Baumgarter & Tinelli: The Model Evolution Calculus The Model Evolution Calculus: Semantical View split , C L if (*) sko , L , C L ,( L ) , C L 1) 2) (*) 3) 4) 5) is a context unifier of (C L) against is admissible L is not mixed No Longer L not contr. with ( L )sko not contr. with Baumgarter & Tinelli: The Model Evolution Calculus The Split Rule: Example First, identify falsified clause instance: Clauses: Now, split with x≥y y≥x abs(x)≥0 abs(x)≥u | abs(c)≥u (x≥y) (y≥z) (x≥z) Context: abs(x)≥0 v≥u v (abs(x)≥0) (0≥u) (abs(x)≥u) Permanenly falsified remainder admissible context unifier Baumgarter & Tinelli: The Model Evolution Calculus context unifier Example abs(u)≥a abs(x)≥a, ... assert abs(x)≥a, abs(u)≥a abs(x)≥a, ... compact abs(x)≥a abs(x)≥a, ... subsume abs(x)≥a abs(f(x))≥a p(x), ... resolve abs(x)≥a p(x), ... Baumgarter & Tinelli: The Model Evolution Calculus Further Notions • Derivation tree • Exhausted/closed branch • Derivation/refutation • Limit tree • Fair limit tree/derivation Baumgarter & Tinelli: The Model Evolution Calculus Main Results: Completeness Let ( i i )i ,with , be an exausted branch in a fair limit tree of 0 . Let i i j j and If then I | 0 . Baumgarter & Tinelli: The Model Evolution Calculus i i j j. Main Results: Soundness and Completeness A clause set 0 is unsatisfiable iff it has a refutation. Baumgarter & Tinelli: The Model Evolution Calculus Main Results: Proof Convergence If a clause set 0 is unsatisfiable then every fair derivation of 0 extends to a refutation. Baumgarter & Tinelli: The Model Evolution Calculus Making ME Efficient Well-known DPLL improvements: • Literal selection strategies Model Elimination: can exploit don’t care nondeterminism for remainer literal to split on • Learning (lemma generation) not trivial – future work • Intelligent backtracking (backjumping) Baumgarter & Tinelli: The Model Evolution Calculus Backjumping , L , L Baumgarter & Tinelli: The Model Evolution Calculus Backjumping , L S1 , L Sn Baumgarter & Tinelli: The Model Evolution Calculus L not used to close left subtree Conclusions • Full lifting of DPLL achieved • Properties of DPLL preserved – – – – – sound and complete proof convergent simplification rules model generation paradigm (no Commit rule as in FDPLL) • Abstract framework – Wide range for fair strategies – Semantically justified redundancy criteria Baumgarter & Tinelli: The Model Evolution Calculus Further Work • Implement the calculus! (in progress) • Lift DPLL optimizations (backjumping, lemma generation, …) • Add equality • Study decidable fragments • Add nonmonotonic features • Build-in theories • ... Baumgarter & Tinelli: The Model Evolution Calculus