the relative power of semantics and unification
Post on 12-Feb-2016
29 Views
Preview:
DESCRIPTION
TRANSCRIPT
The Relative Power The Relative Power of Semantics and of Semantics and
UnificationUnificationDavid A. PlaistedDavid A. PlaistedUNC Chapel HillUNC Chapel Hill
GoalGoal
Attempt to understand in a Attempt to understand in a formal way the influence of formal way the influence of semantics on OSHLsemantics on OSHL
Relate the benefit to be Relate the benefit to be obtained from semantics to obtained from semantics to that of unificationthat of unification
04/22/23
Current theorem proversCurrent theorem proversLargely syntacticLargely syntacticResolution or ME (tableau) basedResolution or ME (tableau) basedFirst-order provers are often poor First-order provers are often poor
on non-Horn clauseson non-Horn clausesRarely can solve hard problemsRarely can solve hard problemsHuman interaction needed for Human interaction needed for
hard problemshard problems
How do humans prove How do humans prove theorems?theorems?
SemanticsSemanticsCase analysisCase analysisSequential search through space Sequential search through space
of possible structuresof possible structuresFocus on the theoremFocus on the theorem
““Systematic methods can Systematic methods can now routinely solve now routinely solve verification problems with verification problems with thousands or tens of thousands or tens of thousands of variables, thousands of variables, while local search methods while local search methods can solve hard random can solve hard random 3SAT problems with 3SAT problems with millions of variables.”millions of variables.”(from a conference (from a conference announcement)announcement)
DPLL ExampleDPLL Example
{p,r},{p,q,r},{p,r}
{T,r},{T,q,r},{T,r}
{F,r},{F,q,r},{F,r}
p=T p=F
{q,r} {r},{r}
{}
SIMPLIFY
SIMPLIFY
SIMPLIFY
Hyper LinkingHyper Linking
Problem Input Clauses
OTTER (sec)
Hyper Linking
Ph5 45 38606.76 1.8 Ph9 297 >24 hrs 2266.6 Latinsq 16 >24 hrs 56.4 Salt 44 1523.82 28.0 Zebra 128 >24 hrs 866.2
Eliminating Duplication with the Eliminating Duplication with the Hyper-Linking Strategy, Shie-Jue Hyper-Linking Strategy, Shie-Jue Lee and David A. Plaisted, Lee and David A. Plaisted, Journal of Automated Reasoning Journal of Automated Reasoning 9 (1992) 25-42.9 (1992) 25-42.
DefinitionDefinition DetectionDetection
Problem OSHL Time
Otter Time
Otter Clauses
P1 0.3 0.03 51 P2 2.3 1000+ 41867 P3 11.25 1000+ 27656 P4 1.35 1000+ 105244 P5 2.0 1000+ 54660
Replacement Rules with Definition Replacement Rules with Definition
Detection, David A. Plaisted and Detection, David A. Plaisted and Yunshan Zhu, in Caferra and Yunshan Zhu, in Caferra and Salzer, eds., Automated Salzer, eds., Automated Deduction in Classical and Non-Deduction in Classical and Non-Classical Logics, LNAI 1761 Classical Logics, LNAI 1761 (1998) 80-94.(1998) 80-94.
More DefinitionsMore DefinitionsSS1 1 S S2 2 … … S Snn=S=Sn n S Sn-1 n-1 … …
SS11
Left AssociativeLeft Associativenn OSHLOSHL OtterOtter VampireVampire E-E-SethSetheoeo
DCTDCTPP
timtimee
GeGenn
KepKeptt
timtimee
GeGenn
KepKeptt
timtimee
GenGen KepKeptt
timtimee
timtimee
22 0.10.17575
4141 3636 600600++
100310030303
2471247122
0.00.000
103103 9090 0.00.0 0.010.01
33 0.60.67878
8585 8080 600600++
6675667533
3149314966
70.70.11
36067360674242
5035038282
0.30.3 300300++
44 2.12.10707
141141 136136 600600++
4721472199
2211221199
300300++
2589825898955955
6836838585
0.30.3 300300++
55 5.35.31717
207207 202202 600600++
4605460544
2094209411
300300++
2529825298293293
6786786464
2.62.6 300300++
66 12.12.0202
283283 278278 600600++
6024602477
2292229233
300300++
2561225612105105
6846845757
300300++
300300++
77 38.38.9797
77 33 600600++
5629562999
1966196600
300300++
2564125641650650
6796797777
300300++
300300++
88 77.77.9494
77 33 600600++
5635563522
1893189322
300300++
2586325863117117
6856854242
300300++
300300++
More DefinitionsMore DefinitionsSimilar results for other definitions:Similar results for other definitions:SS1 1 S S2 2 … … S Snn=S=Sn n S Sn-1 n-1 … … S S11, left side left , left side left
associated, right side right associatedassociated, right side right associatedSS1 1 S S2 2 … … S Snn== SS1 1 S S2 2 … … S Sn n SS1 1 S S2 2 … …
SSnn, both sides associated to the left, both sides associated to the leftSS1 1 S S2 2 … … S Snn== SS1 1 S S2 2 … … S Sn n SS1 1 S S2 2 … …
SSnn, left side left associated, right side , left side left associated, right side right associatedright associated
Similar results for ∩Similar results for ∩
Later propositional Later propositional strategiesstrategies
Billon’s disconnection calculus, Billon’s disconnection calculus, derived from hyper-linkingderived from hyper-linking
Disconnection calculus theorem Disconnection calculus theorem prover (DCTP), derived from prover (DCTP), derived from Billon’s workBillon’s work
FDPLLFDPLL
Performance of DCTP on Performance of DCTP on TPTP, 2003TPTP, 2003
DCTP 1.3 first in EPS and EPR DCTP 1.3 first in EPS and EPR (largely propositional)(largely propositional)
DCTP 10.2p third in FNE (first-order, DCTP 10.2p third in FNE (first-order, no equality) solving same number no equality) solving same number as best proversas best provers
DCTP 10.2p fourth in FOF and FEQ DCTP 10.2p fourth in FOF and FEQ (all first-order formulae, and (all first-order formulae, and formulae with equality)formulae with equality)
DCTP 1.3 is a single strategy prover.DCTP 1.3 is a single strategy prover.
SemanticsSemanticsGelernter 1959 Geometry Theorem Gelernter 1959 Geometry Theorem
ProverProverAdapt semantics to clause form:Adapt semantics to clause form:An interpretation (semantics) An interpretation (semantics) II is an is an
assignment of truth values to assignment of truth values to literals so that literals so that I I assigns opposite assigns opposite truth values to truth values to LL and and LL for atoms for atoms LL..
The literals The literals LL and and LL are said to be are said to be complementarycomplementary..
SemanticsSemanticsWe write We write I CI C ( (II satisfiessatisfies CC) to ) to
indicate that semantics indicate that semantics I I makes the makes the clause clause CC true. true.
If If CC is a ground clause then is a ground clause then II satisfies satisfies C C if I satisfies at least one of its literals.if I satisfies at least one of its literals.
Otherwise Otherwise II satisfies satisfies CC if if I I satisfies all satisfies all ground instances ground instances DD of of CC. (Herbrand . (Herbrand interpretations.)interpretations.)
If If II does not satisfy does not satisfy CC then we say then we say II falsifiesfalsifies CC..
╨
Example SemanticsExample SemanticsSpecify I by interpreting symbolsSpecify I by interpreting symbolsInterpret predicate Interpret predicate p(x,y)p(x,y) as as x = yx = yInterpret function Interpret function f(x,y)f(x,y) as as x + yx + yInterpret a as 1, b as 2, c as 3Interpret a as 1, b as 2, c as 3Then Then p(f(a,b),c)p(f(a,b),c) interprets to TRUE interprets to TRUE
but but p(a,b)p(a,b) interprets to FALSE interprets to FALSEThus I satisfies Thus I satisfies p(f(a,b),c)p(f(a,b),c) but I but I
falsifies falsifies p(a,b)p(a,b)
Obtaining SemanticsObtaining Semantics
Humans using mathematical Humans using mathematical knowledgeknowledge
Automatic methods (finite models)Automatic methods (finite models)Trivial semanticsTrivial semantics
Goal of OSHLGoal of OSHL
First-order logicFirst-order logicClause formClause formPropositional efficiencyPropositional efficiencySemanticsSemantics
Requires ground decidabilityRequires ground decidability
Structure of OSHLStructure of OSHLGoal sensitivity if semantics chosen Goal sensitivity if semantics chosen
properlyproperlyChoose initial semantics to satisfy axiomsChoose initial semantics to satisfy axioms
Use of natural semanticsUse of natural semanticsFor group theory problems, can specify a For group theory problems, can specify a
groupgroupSequential search through possible Sequential search through possible
interpretationsinterpretationsThus similar to Davis and Putnam’s methodThus similar to Davis and Putnam’s methodPropositional EfficiencyPropositional Efficiency
Constructs a semantic treeConstructs a semantic tree
Ordered Semantic Hyperlinking (Oshl)Ordered Semantic Hyperlinking (Oshl)
Reduce first-order logic problem to Reduce first-order logic problem to propositional problem propositional problem
Imports propositional efficiency into first-Imports propositional efficiency into first-order logicorder logic
The algorithmThe algorithmImposes an ordering on clausesImposes an ordering on clausesProgresses by generating instances and refining Progresses by generating instances and refining
interpretationsinterpretations
unsatisfiable
I0 I1 I2 I3 …
D0 D1 D2 T
OSHLOSHLII00 is specified by the user is specified by the userDDii is chosen is chosen minimal minimal so that Iso that Iii falsifies falsifies
DDii
DDii is an instance of a clause in S is an instance of a clause in SIIii is chosen is chosen minimalminimal so that I so that Iii satisfies satisfies
DDjj for all j < i for all j < iLet TLet Tii be {D be {D00,D,D11, …, D, …, Di-1i-1}.}.
IIii falsifies D falsifies Di i but satisfies Tbut satisfies Tii
When TWhen Tii is unsatisfiable OSHL stops and is unsatisfiable OSHL stops and reports that S is unsatisfiable.reports that S is unsatisfiable.
Clause OrderingClause Ordering||L||||L||linlin
||P(f(x),g(x,c))||||P(f(x),g(x,c))||linlin = 6 = 6||L||||L||dagdag
||P(f(x),f(x))||||P(f(x),f(x))||dag dag = 4= 4Extend to clauses additively, ignoring Extend to clauses additively, ignoring
negationsnegationsOSHL chooses DOSHL chooses Dii minimal in such an minimal in such an
orderingordering
Alternate version of Alternate version of OSHLOSHL
Want to keep the size of T smallWant to keep the size of T smallDo this by throwing away clauses of T Do this by throwing away clauses of T
subject to the condition:subject to the condition:The minimal model of TThe minimal model of Ti+1i+1 is larger than is larger than
the minimal model of Tthe minimal model of Tii for all i. for all i.This guarantees completeness.This guarantees completeness.Leads to a formulation using Leads to a formulation using
sequences of clauses and sequences of clauses and resolutions between clauses.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 OrderingSemantics Ordering<<t t a well founded ordering on atoms, a well founded ordering on atoms,
extended to literalsextended to literalsExtend <Extend <t t to interpretations as follows:to interpretations as follows:I and J agree on L if they interpret L the I and J agree on L if they interpret L the
samesameSuppose ISuppose I00 is given is givenI <I <tt J if I and J are not identical, A is the J if I and J are not identical, A is the
minimal atom on which they disagree, minimal atom on which they disagree, and I agrees with Iand I agrees with I00 on A on A
Semantics OrderingSemantics Ordering
<<t t is not a well founded ordering on is not a well founded ordering on interpretations. But <interpretations. But <t t minimal minimal models of T always exist.models of T always exist.
IIii is always chosen as the < is always chosen as the <tt minimal minimal model of T.model of T.
Theorem: Such ITheorem: Such Iii always has the form always has the form II00[L[L11 … L … Lmm] where L] where Lii are literals of are literals of clauses of T.clauses of T.
II00[L[L11 … L … Lmm] L iff at(L) ] L iff at(L) {at(L {at(L11 … L … Lnn)} )} and Iand I0 0 L, or for some i L = LL, or for some i L = Lii..
╨
╨
Instantiation ExampleInstantiation ExampleSuppose ISuppose I00 interprets arithmetic in interprets arithmetic in
the standard way.the standard way.Suppose S contains axioms of Suppose S contains axioms of
arithmetic and the clause X+3arithmetic and the clause X+35.5.Then the first instance chosen could Then the first instance chosen could
be 2+3be 2+35, (1+1)+35, (1+1)+35, (3-1)+35, (3-1)+35 5 et cetera but it could not be et cetera but it could not be 3+33+35, nor could it be an instance 5, nor could it be an instance of an axiom.of an axiom.
Instantiation ExampleInstantiation ExampleSuppose the first instance chosen is Suppose the first instance chosen is
2+32+35.5.Then IThen I11 is I is I00[2+3[2+35], which interprets all 5], which interprets all
atoms as in standard arithmetic except atoms as in standard arithmetic except that the statement 2+3that the statement 2+35 is true.5 is true.
The next instance chosen might be 2+3-1 The next instance chosen might be 2+3-1 = 5-1 = 5-1 2+3 = 5. This contradicts I 2+3 = 5. This contradicts I11. It . It is an instance of the clause X-1 = Y-1 is an instance of the clause X-1 = Y-1 X X = Y and corresponds to generating the = Y and corresponds to generating the subgoal 2+3-1 = 5-1.subgoal 2+3-1 = 5-1.
SemanticsSemantics
Trivial semantics:Trivial semantics:Positive: Choose IPositive: Choose I00 to falsify all to falsify all
atoms, first D is all positiveatoms, first D is all positiveNegative: Choose INegative: Choose I00 to satisfy all to satisfy all
atoms, first D is all negativeatoms, first D is all negativeNatural semantics: INatural semantics: I00 chosen by chosen by
useruser
Another Semantics Another Semantics OrderingOrdering
I ≤I ≤pos pos J if for all atoms A, I A J if for all atoms A, I A implies J A.implies J A.
J is ≤J is ≤pos pos minimal model of S if J is a minimal model of S if J is a model of S and there is no model model of S and there is no model I of S such that I ≤I of S such that I ≤pos pos JJ
╨╨
Theoretical Results: Benefit Theoretical Results: Benefit of Semanticsof Semantics
Two complementary unifiable Two complementary unifiable literalsliterals
Horn ClausesHorn ClausesUnique interpretationUnique interpretationArbitrary set of first-order clausesArbitrary set of first-order clausesA number of other results in the A number of other results in the
paperpaper
Complementary unifiable Complementary unifiable literalsliterals
P(f(x),y), P(f(x),y), P(w,g(w)) P(w,g(w))Resolution: Linear timeResolution: Linear timeOSHL with trivial semantics, linear OSHL with trivial semantics, linear
ordering: Double exponential timeordering: Double exponential timeOSHL with trivial semantics, dag OSHL with trivial semantics, dag
ordering: Single exponentialordering: Single exponentialOSHL with semantics as ≤OSHL with semantics as ≤pos pos minimal minimal
model of positive literal : Polynomial model of positive literal : Polynomial timetime
UnifiabilityUnifiabilitySuppose C = {LSuppose C = {L11 … L … Lmm} is a clause in S. } is a clause in S.
Let Unif(C) be {CLet Unif(C) be {C : : CC11 … C … Cnn S, S, literals Mliterals M1 1 CC11, …, M, …, Mn n C Cnn s.t. s.t. is a is a most general simultaneous unifier of most general simultaneous unifier of LLii and and MMiiii for all i where for all i where ii are are renamings of variables of Mrenamings of variables of Mii so that L so that Lii and Mand Mii have no common variables} have no common variables}
UnifUnifnegneg(C): {L(C): {L11 … L … Lmm} are the } are the negativenegative literals in C.literals in C.
Summary of resultsSummary of resultsSeveral results show that OSHL with an Several results show that OSHL with an
appropriate semantics is implicitly appropriate semantics is implicitly performing unifications. Thus the performing unifications. Thus the choice of semantics has a profound choice of semantics has a profound effect on the operation of OSHL.effect on the operation of OSHL.
OSHL has some features of OSHL has some features of propositional methods and some propositional methods and some features of unification-based features of unification-based methods.methods.
Horn ClausesHorn ClausesTheorem. Suppose that S is an Theorem. Suppose that S is an
unsatisfiable set of Horn clauses and unsatisfiable set of Horn clauses and II00 is a ≤ is a ≤pos pos minimal model of the minimal model of the axioms of S. Then for all instances D axioms of S. Then for all instances D generated by OSHL there is a clause generated by OSHL there is a clause D' in Unif(S) such that D is an D' in Unif(S) such that D is an instance of D'.instance of D'.
This shows that OSHL is implicitly This shows that OSHL is implicitly performing unifications with this performing unifications with this semantics.semantics.
Unique ModelUnique ModelTheorem. Suppose that S is an Theorem. Suppose that S is an
unsatisfiable set of clauses and T is a unsatisfiable set of clauses and T is a subset of S. Suppose that S – T has a subset of S. Suppose that S – T has a unique Herbrand model. If Iunique Herbrand model. If I00 is is chosen as this unique Herbrand chosen as this unique Herbrand model then for all instances D model then for all instances D generated by OSHL there is a clause generated by OSHL there is a clause D' in Unif(S) such that D is an D' in Unif(S) such that D is an instance of D'.instance of D'.
Thus OSHL is implicitly unifying with Thus OSHL is implicitly unifying with this semantics.this semantics.
General CaseGeneral CaseTheorem. Suppose that S is an Theorem. Suppose that S is an
unsatisfiable set of clauses and T unsatisfiable set of clauses and T is a subset of S. Suppose that S – is a subset of S. Suppose that S – T is satisfiable. Let IT is satisfiable. Let I00 be a ≤ be a ≤pos pos minimal model of S – T. Then for minimal model of S – T. Then for all instances D generated by OSHL all instances D generated by OSHL there is a clause D' in Unifthere is a clause D' in Unifnegneg(S) (S) such that D is an instance of D'.such that D is an instance of D'.
Thus OSHL is implicitly performing Thus OSHL is implicitly performing unifications with this semantics.unifications with this semantics.
Lifting SemanticsLifting Semantics
Implementation IssuesImplementation Issues
top related