410 likes | 475 Views
The Relative Power of Semantics and Unification. David A. Plaisted UNC Chapel Hill. Goal. Attempt to understand in a formal way the influence of semantics on OSHL Relate the benefit to be obtained from semantics to that of unification. Current theorem provers. Largely syntactic
E N D
The Relative Power of Semantics and Unification David A. Plaisted UNC Chapel Hill
Goal • Attempt to understand in a formal way the influence of semantics on OSHL • Relate the benefit to be obtained from semantics to that of unification
Current theorem provers • Largely syntactic • Resolution or ME (tableau) based • First-order provers are often poor on non-Horn clauses • Rarely can solve hard problems • Human interaction needed for hard problems
How do humans prove theorems? • Semantics • Case analysis • Sequential search through space of possible structures • Focus on the theorem
“Systematic methods can now routinely solve verification problems with thousands or tens of thousands of variables, while local search methods can solve hard random 3SAT problems with millions of variables.” (from a conference announcement)
DPLL Example {p,r},{p,q,r},{p,r} p=T p=F {T,r},{T,q,r},{T,r} {F,r},{F,q,r},{F,r} SIMPLIFY SIMPLIFY {q,r} {r},{r} SIMPLIFY {}
Eliminating Duplication with the Hyper-Linking Strategy, Shie-Jue Lee and David A. Plaisted, Journal of Automated Reasoning 9 (1992) 25-42.
Replacement Rules with Definition Detection, David A. Plaisted and Yunshan Zhu, in Caferra and Salzer, eds., Automated Deduction in Classical and Non-Classical Logics, LNAI 1761 (1998) 80-94.
More DefinitionsS1 S2 … Sn=Sn Sn-1 … S1Left Associative
More Definitions Similar results for other definitions: S1 S2 … Sn=Sn Sn-1 … S1, left side left associated, right side right associated S1 S2 … Sn=S1 S2 … Sn S1 S2 … Sn, both sides associated to the left S1 S2 … Sn=S1 S2 … Sn S1 S2 … Sn, left side left associated, right side right associated Similar results for ∩
Later propositional strategies • Billon’s disconnection calculus, derived from hyper-linking • Disconnection calculus theorem prover (DCTP), derived from Billon’s work • FDPLL
Performance of DCTP on TPTP, 2003 • DCTP 1.3 first in EPS and EPR (largely propositional) • DCTP 10.2p third in FNE (first-order, no equality) solving same number as best provers • DCTP 10.2p fourth in FOF and FEQ (all first-order formulae, and formulae with equality) • DCTP 1.3 is a single strategy prover.
Semantics • Gelernter 1959 Geometry Theorem Prover • Adapt semantics to clause form: • An interpretation (semantics) I is an assignment of truth values to literals so that I assigns opposite truth values to L and L for atoms L. • The literals L and L are said to be complementary.
Semantics ╨ • We write I C (IsatisfiesC) to indicate that semantics I makes the clause C true. • If C is a ground clause then I satisfies C if I satisfies at least one of its literals. • Otherwise I satisfies C if I satisfies all ground instances D of C. (Herbrand interpretations.) • If I does not satisfy C then we say IfalsifiesC.
Example Semantics • Specify I by interpreting symbols • Interpret predicate p(x,y) as x = y • Interpret function f(x,y) as x + y • Interpret a as 1, b as 2, c as 3 • Then p(f(a,b),c) interprets to TRUE but p(a,b) interprets to FALSE • Thus I satisfies p(f(a,b),c) but I falsifies p(a,b)
Obtaining Semantics • Humans using mathematical knowledge • Automatic methods (finite models) • Trivial semantics
Goal of OSHL • First-order logic • Clause form • Propositional efficiency • Semantics • Requires ground decidability
Structure of OSHL • Goal sensitivity if semantics chosen properly • Choose initial semantics to satisfy axioms • Use of natural semantics • For group theory problems, can specify a group • Sequential search through possible interpretations • Thus similar to Davis and Putnam’s method • Propositional Efficiency • Constructs a semantic tree
I0 I1 I2 I3 … D0 D1 D2 T • unsatisfiable Ordered Semantic Hyperlinking (Oshl) • Reduce first-order logic problem to propositional problem • Imports propositional efficiency into first-order logic • The algorithm • Imposes an ordering on clauses • Progresses by generating instances and refining interpretations
OSHL • I0 is specified by the user • Di is chosen minimal so that Ii falsifies Di • Di is an instance of a clause in S • Ii is chosen minimal so that Ii satisfies Dj for all j < i • Let Ti be {D0,D1, …, Di-1}. • Ii falsifies Di but satisfies Ti • When Ti is unsatisfiable OSHL stops and reports that S is unsatisfiable.
Clause Ordering • ||L||lin • ||P(f(x),g(x,c))||lin = 6 • ||L||dag • ||P(f(x),f(x))||dag = 4 • Extend to clauses additively, ignoring negations • OSHL chooses Di minimal in such an ordering
Alternate version of OSHL • Want to keep the size of T small • Do this by throwing away clauses of T subject to the condition: • The minimal model of Ti+1 is larger than the minimal model of Ti for all i. • This guarantees completeness. • Leads to a formulation using sequences of clauses and resolutions between clauses.
Rules of OSHL Start with empty sequence (C1,C2, …, Cn), D minimal contradict I, I minimal model (C1,C2, …, Cn,D) (C1,C2, …, Cn, D), Cn not needed (C1,C2, …, Cn-1,D) (C1,C2, …, Cn,D), max resolution possible (C1,C2, …, Cn-1,res(Cn,D,L)) Proof if empty clause derived
╨ Propositional Example (p I0 p) () ({-p1, -p2, -p3}) I0[-p3] ({-p1, -p2, -p3}, {-p4, -p5, -p6}) I0[-p3,-p6] ({…}, {…}, {-p7}) I0[-p3,-p6,-p7] ({…}, {…}, {-p7}, {p3, p7}) ({…}, {-p4, -p5, -p6}, {p3}) ({-p1, -p2, -p3},{p3}) ({-p1, -p2 }) I0[-p2]
Semantics Ordering • <t a well founded ordering on atoms, extended to literals • Extend <t to interpretations as follows: • I and J agree on L if they interpret L the same • Suppose I0 is given • I <t J if I and J are not identical, A is the minimal atom on which they disagree, and I agrees with I0 on A
Semantics Ordering • <t is not a well founded ordering on interpretations. But <t minimal models of T always exist. • Ii is always chosen as the <t minimal model of T. • Theorem: Such Ii always has the form I0[L1 … Lm] where Li are literals of clauses of T. • I0[L1 … Lm] L iff at(L) {at(L1 … Ln)} and I0 L, or for some i L = Li. ╨ ╨
Instantiation Example • Suppose I0 interprets arithmetic in the standard way. • Suppose S contains axioms of arithmetic and the clause X+35. • Then the first instance chosen could be 2+35, (1+1)+35, (3-1)+35 et cetera but it could not be 3+35, nor could it be an instance of an axiom.
Instantiation Example • Suppose the first instance chosen is 2+35. • Then I1 is I0[2+35], which interprets all atoms as in standard arithmetic except that the statement 2+35 is true. • The next instance chosen might be 2+3-1 = 5-1 2+3 = 5. This contradicts I1. It is an instance of the clause X-1 = Y-1 X = Y and corresponds to generating the subgoal 2+3-1 = 5-1.
Semantics • Trivial semantics: • Positive: Choose I0 to falsify all atoms, first D is all positive • Negative: Choose I0 to satisfy all atoms, first D is all negative • Natural semantics: I0 chosen by user
Another Semantics Ordering • I ≤pos J if for all atoms A, I A implies J A. • J is ≤pos minimal model of S if J is a model of S and there is no model I of S such that I ≤pos J ╨ ╨
Theoretical Results: Benefit of Semantics • Two complementary unifiable literals • Horn Clauses • Unique interpretation • Arbitrary set of first-order clauses • A number of other results in the paper
Complementary unifiable literals • P(f(x),y), P(w,g(w)) • Resolution: Linear time • OSHL with trivial semantics, linear ordering: Double exponential time • OSHL with trivial semantics, dag ordering: Single exponential • OSHL with semantics as ≤pos minimal model of positive literal : Polynomial time
Unifiability • Suppose C = {L1 … Lm} is a clause in S. Let Unif(C) be {C : C1 … Cn S, literals M1 C1, …, Mn Cn s.t. is a most general simultaneous unifier of Li and Mii for all i where i are renamings of variables of Mi so that Li and Mi have no common variables} • Unifneg(C): {L1 … Lm} are the negative literals in C.
Summary of results • Several results show that OSHL with an appropriate semantics is implicitly performing unifications. Thus the choice of semantics has a profound effect on the operation of OSHL. • OSHL has some features of propositional methods and some features of unification-based methods.
Horn Clauses • Theorem. Suppose that S is an unsatisfiable set of Horn clauses and I0 is a ≤pos minimal model of the axioms of S. Then for all instances D generated by OSHL there is a clause D' in Unif(S) such that D is an instance of D'. • This shows that OSHL is implicitly performing unifications with this semantics.
Unique Model • Theorem. Suppose that S is an unsatisfiable set of clauses and T is a subset of S. Suppose that S – T has a unique Herbrand model. If I0 is chosen as this unique Herbrand model then for all instances D generated by OSHL there is a clause D' in Unif(S) such that D is an instance of D'. • Thus OSHL is implicitly unifying with this semantics.
General Case • Theorem. Suppose that S is an unsatisfiable set of clauses and T is a subset of S. Suppose that S – T is satisfiable. Let I0 be a ≤pos minimal model of S – T. Then for all instances D generated by OSHL there is a clause D' in Unifneg(S) such that D is an instance of D'. • Thus OSHL is implicitly performing unifications with this semantics.