View
218
Download
0
Tags:
Embed Size (px)
Citation preview
The Model Evolution Calculus with Equality
Peter Baumgartner
Max-Planck-Institute for Informatics
Saarbrücken, Germany
Cesare Tinelli
The University of Iowa
Iowa, USA
The Model Evolution Calculus with Equality 2
Background – Instance Based Methods
• Model Evolution is related to Instance Based Methods
– Ordered Semantic Hyper Linking [Plaisted et al]
– Primal Partial Instantiation [Hooker et al]
– Disconnection Method [Billon], DCTP [Letz&Stenz]
– Inst-Gen [Ganzinger&Korovin]
– Successor of First-Order DPLL [B.]
• Principle: Reduce proof search in first-order (clausal) logic to propositional logic in an „intelligent“ way
• Different to Resolution, Model Elimination,… (Pro‘s and Con‘s)
The Model Evolution Calculus with Equality 3
Background – Model Evolution
• The best modern SAT solvers (satz, MiniSat, zChaff, Berkmin,…) are based on the Davis-Putnam-Logemann-Loveland procedure [DPLL 1960-1963]
• Can DPLL be lifted to the first-order level?How to combine
– successful SAT techniques (unit propagation, backjumping, lemma learning,…)
– successful first-order techniques?(unification, redundancy concepts, ...)?
• Realization in Model Evolution calculus / Darwin implementation
– Basic approach developed (CADE-19)
– Lemma learning on the way
– This work: built-in equality reasoning
The Model Evolution Calculus with Equality 4
Contents
• DPLL as a starting point for the Model Evolution calculus
• Model Evolution calculus without equality
– Model construction
– Inference rules
• Equality reasoning
– Equality reasoning in instance based methods
– Inference rules
– How it works (semantical considerations)
The Model Evolution Calculus with Equality 5
DPLL procedure
Input: Propositional clause setOutput: Model or „unsatisfiable”
Algorithm components: - Propositional semantic tree enumerates interpretations - Simplification - Split - Backtracking
A : A
B
: C
: B
C
No, split on C: f A, B, Cg j= : A _ : B _ C _ D, : : :
f A, Bg?j= : A _ : B _ C _ D, : : :
Lifting to first-order logic?
The Model Evolution Calculus with Equality 6
Model Evolution as First-Order DPLL
Input: First-order clause setOutput: Model or „unsatisfiable”
if termination
Interpretation induced by a branch?
Lifing of semantic tree data structure and derivation rules to first-order
Algorithm components: - First-order semantic tree enumerates interpretations - Simplification - Split - Backtracking
v isa "parameter"not quite like a variable
P(v) : P(v)
: P(a) P(a)
f P(v), : P(a)g?j= P(x) _ Q(x)
The Model Evolution Calculus with Equality 7
Interpretation Induced by a BranchA branch literal specifies the truth value of its ground instances unlessa more specific branch literal specifies the opposite truth value
Calculus?
: v
P(v) : P(v)
: P(a) P(a)
Q(a) : Q(a)
f : v, P(v), : P(a)g?j= P(x) _ Q(x)
No, because f : v, P(v), : P(a)g 6j= P(a) _ Q(a)
) Split with Q(a) to satisfy P(a) _ Q(a)
Q(a)
Branch:f : v, P(v), : P(a)g
Induced Interpretation for § = f a, bgtrue: P(b)
false: P(a) Q(a) Q(b)
The Model Evolution Calculus with Equality 8
Derivation Rules – Simplified (1)
Split
¤ current contextL¾ L¾
¾ C _ L
©, C _ L current clause set
if
1. ¾isa simultaneousmgu of C _ L against ¤,2. neither L¾nor L¾iscontained in ¤, and3. L¾containsno variables
¤ ` ©, C _ L
¤, L¾ ` ©, C _ L ¤, L¾ ` ©, C _ L
The Model Evolution Calculus with Equality 9
Derivation Rules – Simplified (2)
Close
if
1. ©6= ; or C 6= ?2. there isa simultaneousmgu ¾of C against ¤ such that¤ contains the complement of each literal of C¾
¤ ` ©, C
¤ ` ?
¤ current context
¾
©, C current clause set
C
?
The Model Evolution Calculus with Equality 10
Derivation Rules – Simplification Rules (1)
Subsume
Propositional level:
First-order level ¼ unit subsumption:- L contains no parameters (variables OK)- Matching instead of syntactic equality
¤, L ` ©, L _ C
¤, L ` ©
The Model Evolution Calculus with Equality 11
Derivation Rules – Simplification Rules (2)
Resolve
Propositional level:
First-order level ¼ restricted unit resolution- L contains no parameters (variables OK)- Unification instead of syntactic equality- The unifier must not modify C
¤, L ` ©, L _ C
¤, L ` ©, C
The Model Evolution Calculus with Equality 12
Derivation Rules – Simplification Rules (3)
Compact¤, K, L ` ©
¤, K ` ©
if
1. K containsno parameters (variablesOK)2. K¾= L, for some substitution ¾
Calculus- Derivations are trees over sequents- initial sequent - Fairness- Soundness and completeness
: v ` Input clause set
The Model Evolution Calculus with Equality 13
Contents
• DPLL as a starting point for the Model Evolution calculus
• Model Evolution calculus without equality
– Model construction
– Inference rules
• Equality reasoning
– Equality reasoning in instance based methods
– Inference rules
– How it works (semantical considerations)
The Model Evolution Calculus with Equality 14
Equality Reasoning in Instance Based Methods
Inst-Gen [Ganzinger&Korovin CSL 2004]:
¾
¾proper instantiator
¾ Ã E-unsatisfiability
The Model Evolution Calculus with Equality 15
Equality Reasoning in Instance Based Methods
DCTP [Letz&Stenz Tableaux 02, Stenz 03]:
(?
s ¼ t
L[s0]
( s ¼ t )¾
s 6¼ t L[t] )¾
Our approach: related
¾= mgu(s, s0)s¾6¹ t¾
The Model Evolution Calculus with Equality 16
Contents
• DPLL as a starting point for the Model Evolution calculus
• Model Evolution calculus without equality
– Model construction
– Inference rules
• Equality reasoning
– Equality reasoning in instance based methods
– Inference rules
– How it works (semantical considerations)
The Model Evolution Calculus with Equality 17
Model Evolution Calculus with Equality - Overview
- Split and Close: same- Simplification rules: general rule based on redundancy concept- Clauses: with constraints now: -Equality reasoning: Reflection and (Ordered) Paramodulation rules
Paramodulation
Reflection
L1 _ ¢¢¢_ Lm ¢l1 ! r1, :::, ln ! rn
s 6¼ t _ C ¢¡(C ¢¡ )¾
if ¾= mgu(s, t)
Initially C ¢; for an input clause C
Assumesreduction ordering Â
l ¼ r L[t] _ C ¢¡(L[r] _ C ¢¡ , l ! r)¾
if
8<
:
¾= mgu(l, t)t isnot a variablel¾6¹ r¾
Embed these rules in calculus
The Model Evolution Calculus with Equality 18
Derivation Rules (1) - Reflection
Ref¤ ` ©, s 6¼ t _ C ¢¡
¤ ` ©, s 6¼ t _ C ¢¡ , (C ¢¡ )¾
if
1. ¾isa mgu of s and t,2. the new clause isnot contained in ©[ f s 6¼ t _ C ¢¡g
The Model Evolution Calculus with Equality 19
Derivation Rules (2) - Paramodulation
Para¤, l ¼ r ` ©, L[t] _ C ¢¡
¤, l ¼ r ` ©, L[t] _ C ¢¡ , (L[r] _ C ¢¡ , l ! r)¾
if
1. ¾isa mgu of l and t,2. t isnot a variable,3. l¾6¹ r¾,4. the new clause containsno parameters, and5. the new clause isnot contained in ©[ f L _ C ¢¡g
NB – This is not a resolution calculus:- Paramodulation only from unit equations- Clause part does not grow in length, and no paramodulation into constrained part- (No paramodulation from context equations into context literals)
The Model Evolution Calculus with Equality 20
Derivation Rules (3) - Split
Split¤ ` ©, C _ L
¤, L¾ ` ©, C _ L ¤, L¾ ` ©, C _ L
Split applies to
C ¢l1 ! r1, : : : , ln ! rn
only if C isa positive clause
Use conversion to ordinaryclause
C _ l1 6¼ r1 _ ¢¢¢_ ln 6¼ rn
and ordinary Split:
The Model Evolution Calculus with Equality 21
Derivation Example
Para
Simp
Split (left)
Initial clause encodes : P(x, y) _ Q(x) _ R(y):
: v, P(u, u) ¼ t ` P(x, y) 6¼ t _ Q(x) ¼ t _ R(y) ¼ t ¢;
: v, P(u, u) ¼ t `P(x, y) 6¼ t _ Q(x) ¼ t _ R(y) ¼ t ¢; ,
t 6¼ t _ Q(x) ¼ t _ R(x) ¼ t ¢P(x, x) ! t
: v, P(u, u) ¼ t `P(x, y) 6¼ t _ Q(x) ¼ t _ R(x) ¼ t ¢; ,
Q(x) ¼ t _ R(x) ¼ t ¢P(x, x) ! t
: v, P(u, u) ¼ t,Q(u) ¼ t
`P(x, y) 6¼ t _ Q(x) ¼ t _ R(x) ¼ t ¢; ,
Q(x) ¼ t _ R(x) ¼ t ¢P(x, x) ! t
The Model Evolution Calculus with Equality 22
Derivation Rules (4)
Close¤ ` ©, C
¤ ` ?
Close applies to
C ¢l1 ! r1, : : : , ln ! rn
Use conversion to ordinaryclause
C _ l1 6¼ r1 _ ¢¢¢_ ln 6¼ rn
and ordinary Close:
The Model Evolution Calculus with Equality 23
Optional Derivation Rules (1)
Assert if L is not subsumed by a context literal and "soundness condition" holds
Examples
No Split for unit clauses:
With equality reasoning:
¤ ` ©
¤, L ` ©
¤ ` ©, P(x) ¢;¡ ! ¤, P(x) ` ©, P(x) ¢;
P(u, b), b ¼ c ` : P(x, y) _ f(x) ¼ y ¢;¡ ! P(u, b), b ¼ c, f(u) ¼ c ` : P(x, y) _ f(x) ¼ y ¢;
The Model Evolution Calculus with Equality 24
Optional Derivation Rules (2)
Simp
Examples
Delete a clause whose constraint will never be satisfied:
Simplify constraint:
Generic Simp rule covers most simplification rules so far as special cases
¤ ` ©, C ¢¡
¤ ` ©, C0 ¢¡ 0if
8><
>:
C ¢¡ is redundant wrt.©[ f C0 ¢¡ 0g and ¤, and
`̀Soundnesscondition''
f(x) 6¼ x ` a ¼ b ¢f(a) ! a¡ ! f(x) 6¼ x ` t ¼ t ¢;
f(x) ¼ x ` a ¼ b ¢f(a) ! a¡ ! f(x) ¼ x ` a ¼ b ¢;
The Model Evolution Calculus with Equality 25
Contents
• DPLL as a starting point for the Model Evolution calculus
• Model Evolution calculus without equality
– Model construction
– Inference rules
• Equality reasoning
– Equality reasoning in instance based methods
– Inference rules
– How it works (semantical considerations)
The Model Evolution Calculus with Equality 26
Model Evolution Calculus with Equality – How it Works
Without Equality
With Equality
- Current context ¤
- Candidate Model I¤
- Current clause C
- If I¤ 6j= C then repair I¤ (Split) or give up I¤ (Close)
R¤ ?
- Current context ¤
- Candidate E-model R¤ -- a ground rewrite system
- Current clause C
- If R¤ 6j=E C then repair R¤ (Split) or give up R¤ (Close)
The Model Evolution Calculus with Equality 27
E-Interpretation Induced by a Branch
: v
b ¼ c b 6¼ c
a 6¼ ua ¼ u
a ¼ ca 6¼ c
(1) R¤ := ;(2) candidate b ¼ c: R¤ := f b ! cg(3) candidate a ¼ b: R¤ = f b ! cg
Initially R¤ := ;
For all s ¼ t 2 I¤, smaller equations first:if s  t and
s and t are irreducible by smaller rules in R¤then R¤ := R¤ [ f s ! tg
Candidate equations I¤ = f a:¼ b, b
:¼ cg
Ordering a  b  c
Example
Important: R¤ is convergent
The Model Evolution Calculus with Equality 28
Repairing the Candidate Model
R¤ 6j=E C°
s 6= t
C° #R¤ = q 6¼ q _ ¢¢¢_ s ¼ t _ ¢¢¢
Calculus:
Used rewrite rules from R¤:l ! r, : : :
lifted versions
R¤ 6j=E ©, C R¤ 6j=E C° #R¤
(Ground) constrained clausessemantics:R¤ j=E C ¢¡ iff ¡ 6µ R¤ or R¤ j=E C
Split with s0 ¼ t0 to add s ¼ t to R¤, orSplit with l0 6¼ r0 to remove l ! r from R¤
C ¢; ) ?Para,Ref s0 ¼ t0_ ¢¢¢¢l0 ! r0, : : :
After Split C° #R¤ will be E-satisfied, and so will be C°
The Model Evolution Calculus with Equality 29
Model Construction Considerations
• The model construction technique has been developed for the Superposition calculus [Bachmair&Ganzinger]
• Differences due to parametric literals
– Nonmonotonicity:
– Have to work with two orderings: term ordering and instantiation ordering
– Model construction:smaller sides of equations must be irreducible, too, in order to be turned into rewrite rules
– In consequence, paramodulation into smaller sides is necessary (really?)
e.g. f(u) ¼ u later partially retracted due to f(a) 6¼ a
The Model Evolution Calculus with Equality 30
Limit Derivations
: v ` Input clause set
¤1 ` ©1
¤2 ` ©2
¤n ` ©n
¤1 :=S
i¸ 0
Tj¸ i ¤j
©1 :=S
i¸ 0
Tj¸ i ©j
closedCompletenessSuppose a fair derivationthat isnot a closed tree
Show that R¤1 j= ©1
Limit rewrite system R¤1- This is the intended model- Approximationsused in
redundancy tests
Fairness?
The Model Evolution Calculus with Equality 31
FairnessDef. (Fairness)
Para Suppose timepoint i in derivation such that
Para¤i, l ¼ r ` ©i, C ¢¡
¤i, l ¼ r ` ©i, C ¢¡ , C0 ¢¡ 0
where C ¢¡ ) Para(l¼r,¾) C0 ¢¡ 0
If1. l ¼ r 2 ¤B,2. ¤B produces (l ¼ r)¾, and3. (C ¢¡ )¾isnot redundant wrt.©i [ f C ¢¡g and R¤B
thenthere isa j such that the inferenceC ¢¡ ) Para(l¼r,¾) C0 ¢¡ 0 is redundant wrt. ©j and R¤B
Split, Ref, Close...
The Model Evolution Calculus with Equality 32
Conclusions
• Main result: soundness and refutational completeness
• Nice features (perhaps):
– Paramodulation only from unit equations
– No paramodulation inferences between context equations or
into constraint part
– Clause part of constrained clauses does not grow in length(decide Bernays-Schoenfinkel clauses with equality)
– Works with explicitly represented model candidateat the calculus level (the context)
• Not so nice features (perhaps):
– Semantic redundancy criterion based on model candidate difficult to exploit
– Need paramodulation into smaller sides of equations (really?)