KBO Orientability
Harald Zankl
‡Nao Hirokawa
†Aart Middeldorp
‡† Japan Advanced Institute of Science and Technology
‡ University of Innsbruck
Reference
JAR 2009 Harald Zankl, Nao Hirokawa, and Aart Middeldorp KBO Orientability
Journal of Automated Reasoning 43(2), pp. 173-201, 2009
Term Rewriting
Definition
pair of terms l→ris rewrite rule ifl6∈ V ∧ Var(r)⊆ Var(l) term rewrite system(TRS) is set of rewrite rules
(rewrite relation)s→R tif∃l→r∈ R,contextC,substitutionσ.
s=C[lσ] ∧ t=C[rσ]
Example
TRSR
x+0→x x+s(y)→s(x+y)
x×0→0 x×s(y)→x×y+x
rewriting
s(0)×s(0)→Rs(0)×0+s(0)
→R0+s(0)
→Rs(0+0)
→Rs(0) terminated
Term Rewriting
Definition
pair of terms l→ris rewrite rule ifl6∈ V ∧ Var(r)⊆ Var(l) term rewrite system(TRS) is set of rewrite rules
(rewrite relation)s→R tif∃l→r∈ R,contextC,substitutionσ.
s=C[lσ] ∧ t=C[rσ]
Example
TRSR
x+0→x x+s(y)→s(x+y)
x×0→0 x×s(y)→x×y+x
rewriting
s(0)×s(0)→Rs(0)×0+s(0)
→R0+s(0)
→Rs(0+0)
→Rs(0) terminated
Term Rewriting
Definition
pair of terms l→ris rewrite rule ifl6∈ V ∧ Var(r)⊆ Var(l) term rewrite system(TRS) is set of rewrite rules
(rewrite relation)s→R tif∃l→r∈ R,contextC,substitutionσ.
s=C[lσ] ∧ t=C[rσ]
Example
TRSR
x+0→x x+s(y)→s(x+y)
x×0→0 x×s(y)→x×y+x
rewriting
s(0)×s(0)→Rs(0)×0+s(0)
→R0+s(0)
→Rs(0+0)
Termination
Definition
TRSRis terminatingif there is no infinite rewrite sequence t1→Rt2→R· · ·
QUESTION
how to prove termination?
+ Knuth-Bendix order (KBO)
introduced by Knuth and Bendix, 1970 best studied termination methods
great success intheorem provers (Waldmeister, Vampire, ...)
Termination
Definition
TRSRis terminatingif there is no infinite rewrite sequence t1→Rt2→R· · ·
QUESTION
how to prove termination?
+ Knuth-Bendix order (KBO)
introduced by Knuth and Bendix, 1970 best studied termination methods
great success intheorem provers (Waldmeister, Vampire, ...)
Termination
Definition
TRSRis terminatingif there is no infinite rewrite sequence t1→Rt2→R· · ·
QUESTION
how to prove termination?
+ Knuth-Bendix order (KBO)
introduced by Knuth and Bendix, 1970 best studied termination methods
great success intheorem provers (Waldmeister, Vampire, ...)
Termination
Definition
TRSRis terminatingif there is no infinite rewrite sequence t1→Rt2→R· · ·
QUESTION
how to prove termination?
+ Knuth-Bendix order (KBO)
introduced by Knuth and Bendix, 1970
best studied termination methods
great success intheorem provers (Waldmeister, Vampire, ...)
Termination
Definition
TRSRis terminatingif there is no infinite rewrite sequence t1→Rt2→R· · ·
QUESTION
how to prove termination?
+ Knuth-Bendix order (KBO)
introduced by Knuth and Bendix, 1970 best studied termination methods
great success intheorem provers (Waldmeister, Vampire, ...)
Termination
Definition
TRSRis terminatingif there is no infinite rewrite sequence t1→Rt2→R· · ·
QUESTION
how to prove termination?
+ Knuth-Bendix order (KBO)
introduced by Knuth and Bendix, 1970 best studied termination methods
great success intheorem provers (Waldmeister, Vampire, ...)
Knuth-Bendix Orders
Definition
precedence>is proper order on function symbolsF
weight function (w, w0)is pair inR>0F×R>0
weight of termtis
w(t) =
(w0 ift∈ V
w(f) +w(t1) +· · ·+w(tn) ift=f(t1, . . . , tn)
weight function (w, w0)isadmissiblefor precedence >if w(f)>0 or f >g
for all unary functionsf and all functionsg
Knuth-Bendix Orders
Definition
precedence>is proper order on function symbolsF weight function (w, w0)is pair inR>0F×R>0
weight of termtis
w(t) =
(w0 ift∈ V
w(f) +w(t1) +· · ·+w(tn) ift=f(t1, . . . , tn)
weight function (w, w0)isadmissiblefor precedence >if w(f)>0 or f >g
for all unary functionsf and all functionsg
Knuth-Bendix Orders
Definition
precedence>is proper order on function symbolsF weight function (w, w0)is pair inR>0F×R>0
weight of termtis
w(t) =
(w0 ift∈ V
w(f) +w(t1) +· · ·+w(tn) ift=f(t1, . . . , tn)
weight function (w, w0)isadmissiblefor precedence >if w(f)>0 or f >g
for all unary functionsf and all functionsg
Knuth-Bendix Orders
Definition
precedence>is proper order on function symbolsF weight function (w, w0)is pair inR>0F×R>0
weight of termtis
w(t) =
(w0 ift∈ V
w(f) +w(t1) +· · ·+w(tn) ift=f(t1, . . . , tn)
weight function (w, w0)isadmissiblefor precedence>if w(f)>0 or f >g
for all unary functionsf and all functionsg
Definition
Knuth-Bendix order>kbo on termsT(F,V):
s >kbot if|s|x>|t|x for allx∈ V and either
w(s)> w(t), or
w(s) =w(t)and
s=fn(t)andt∈ Vfor some unaryf andn>1; or
s=f(s1, . . . , si−1, si, . . . , sn),t=f(s1, . . . , si−1, ti, . . . , tn), and si>kboti; or
s=f(s1, . . . , sn),t=g(t1, . . . , tm), andf > g
Definition
Knuth-Bendix order>kbo on termsT(F,V):
s >kbot if|s|x>|t|x for allx∈ V and either w(s)> w(t), or
w(s) =w(t)and
s=fn(t)andt∈ Vfor some unaryf andn>1; or
s=f(s1, . . . , si−1, si, . . . , sn),t=f(s1, . . . , si−1, ti, . . . , tn), and si>kboti; or
s=f(s1, . . . , sn),t=g(t1, . . . , tm), andf > g
Definition
Knuth-Bendix order>kbo on termsT(F,V):
s >kbot if|s|x>|t|x for allx∈ V and either w(s)> w(t), or
w(s) =w(t)and
s=fn(t)andt∈ Vfor some unaryf andn>1; or
s=f(s1, . . . , si−1, si, . . . , sn),t=f(s1, . . . , si−1, ti, . . . , tn), and si>kboti; or
s=f(s1, . . . , sn),t=g(t1, . . . , tm), andf > g
Definition
Knuth-Bendix order>kbo on termsT(F,V):
s >kbot if|s|x>|t|x for allx∈ V and either w(s)> w(t), or
w(s) =w(t)and
s=fn(t)andt∈ Vfor some unaryf andn>1; or
s=f(s1, . . . , si−1, si, . . . , sn),t=f(s1, . . . , si−1, ti, . . . , tn), and si>kboti; or
s=f(s1, . . . , sn),t=g(t1, . . . , tm), andf > g
Definition
Knuth-Bendix order>kbo on termsT(F,V):
s >kbot if|s|x>|t|x for allx∈ V and either w(s)> w(t), or
w(s) =w(t)and
s=fn(t)andt∈ Vfor some unaryf andn>1; or
s=f(s1, . . . , si−1, si, . . . , sn),t=f(s1, . . . , si−1, ti, . . . , tn), and si>kboti; or
s=f(s1, . . . , sn),t=g(t1, . . . , tm), andf > g
Definition
Knuth-Bendix order>kbo on termsT(F,V):
s >kbot if|s|x>|t|x for allx∈ V and either w(s)> w(t), or
w(s) =w(t)and
s=fn(t)andt∈ Vfor some unaryf andn>1; or
s=f(s1, . . . , si−1, si, . . . , sn),t=f(s1, . . . , si−1, ti, . . . , tn), and si>kboti; or
s=f(s1, . . . , sn),t=g(t1, . . . , tm), andf > g
Definition
letX ⊆R>0. TRSRisKBOX terminatingif
∃ precedence>
∃ admissible weight function(w, w0)∈XF×X such thatl >kborfor alll→r∈ R
Theorem Knuth and Bendix, 1970
TRS is terminating if it is KBON terminating
Definition
letX ⊆R>0. TRSRisKBOX terminatingif
∃ precedence>
∃ admissible weight function(w, w0)∈XF×X such thatl >kborfor alll→r∈ R
Theorem Knuth and Bendix, 1970
TRS is terminating if it is KBON terminating
Quiz
Example I
a(a(x))→b(b(b(x))) b(b(b(b(b(x)))))→a(a(a(x)))
is KBONterminating ? — yes
Proof
take precedencea>band weight function w(a) =
?3
w(b) =
?2
w0= 1
Proof
another solution: take precedence>=∅and weight function w(a) =
?13
w(b) =
?8
w0= 1
Example I
a(a(x))→b(b(b(x))) b(b(b(b(b(x)))))→a(a(a(x)))
is KBONterminating ?
—yes
Proof
take precedencea>band weight function w(a) =
?3
w(b) =
?2
w0= 1
Proof
another solution: take precedence>=∅and weight function w(a) =
?13
w(b) =
?8
w0= 1
Example I
a(a(x))→b(b(b(x))) b(b(b(b(b(x)))))→a(a(a(x)))
is KBONterminating ? — yes
Proof
take precedencea>band weight function w(a) = ?
3
w(b) = ?
2
w0= 1
Proof
another solution: take precedence>=∅and weight function
w(a) =
?13
w(b) =
?8
w0= 1
Example I
a(a(x))→b(b(b(x))) b(b(b(b(b(x)))))→a(a(a(x)))
is KBONterminating ? — yes
Proof
take precedencea>band weight function w(a) =
?
3 w(b) =
?
2 w0= 1
Proof
another solution: take precedence>=∅and weight function w(a) =
?13
w(b) =
?8
w0= 1
Example I
a(a(x))→b(b(b(x))) b(b(b(b(b(x)))))→a(a(a(x)))
is KBONterminating ? — yes
Proof
take precedencea>band weight function w(a) =
?
3 w(b) =
?
2 w0= 1
Proof
another solution: take precedence>=∅and weight function w(a) = ?
13
w(b) = ?
8
w0= 1
Example I
a(a(x))→b(b(b(x))) b(b(b(b(b(x)))))→a(a(a(x)))
is KBONterminating ? — yes
Proof
take precedencea>band weight function w(a) =
?
3 w(b) =
?
2 w0= 1
Proof
another solution: take precedence>=∅and weight function w(a) =
?
13 w(b) =
?
8 w0= 1
Example II
TRSR
x+0→x x+s(y)→s(x+y) x×0→0 x×s(y)→x×y+x is KBONterminating ?
—no
Example II
TRSR
x+0→x x+s(y)→s(x+y) x×0→0 x×s(y)→x×y+x is KBONterminating ? — no
History of KBO
Theorem Knuth and Bendix, 1970
TRS is terminating if it is KBON terminating
Theorem Dershowitz, 1979
TRS is terminating if it is KBOR>0 terminating
Theorem Dick, Kalmus, and Martin, 1990
KBOR>0 termination isdecidablewithin exponential time
Theorem Korovin and Voronkov, 2001, 2003
TRS is KBONterminating ⇐⇒ it is KBOR>0 terminating
KBOR>0 termination is decidable withinpolynomial time
Theorem Zankl and Middeldorp, 2007
KBO{0,1,...,B} termination (B∈N) can reduce toSATandPBC
Theorem Knuth and Bendix, 1970
TRS is terminating if it is KBON terminating
Theorem Dershowitz, 1979
TRS is terminating if it is KBOR>0 terminating
Theorem Dick, Kalmus, and Martin, 1990
KBOR>0 termination isdecidablewithin exponential time
Theorem Korovin and Voronkov, 2001, 2003
TRS is KBONterminating ⇐⇒ it is KBOR>0 terminating
KBOR>0 termination is decidable withinpolynomial time
Theorem Zankl and Middeldorp, 2007
KBO{0,1,...,B} termination (B∈N) can reduce toSATandPBC
Theorem Knuth and Bendix, 1970
TRS is terminating if it is KBON terminating
Theorem Dershowitz, 1979
TRS is terminating if it is KBOR>0 terminating
Theorem Dick, Kalmus, and Martin, 1990
KBOR>0 termination isdecidablewithin exponential time
Theorem Korovin and Voronkov, 2001, 2003
TRS is KBONterminating ⇐⇒ it is KBOR>0 terminating
KBOR>0 termination is decidable withinpolynomial time
Theorem Zankl and Middeldorp, 2007
KBO{0,1,...,B} termination (B∈N) can reduce toSATandPBC
Theorem Knuth and Bendix, 1970
TRS is terminating if it is KBON terminating
Theorem Dershowitz, 1979
TRS is terminating if it is KBOR>0 terminating
Theorem Dick, Kalmus, and Martin, 1990
KBOR>0 termination isdecidablewithin exponential time
Theorem Korovin and Voronkov, 2001, 2003
TRS is KBONterminating ⇐⇒ it is KBOR>0 terminating
KBOR>0 termination is decidable withinpolynomial time
Theorem Zankl and Middeldorp, 2007
KBO{0,1,...,B} termination (B∈N) can reduce toSATandPBC
Theorem Knuth and Bendix, 1970
TRS is terminating if it is KBON terminating
Theorem Dershowitz, 1979
TRS is terminating if it is KBOR>0 terminating
Theorem Dick, Kalmus, and Martin, 1990
KBOR>0 termination isdecidablewithin exponential time
Theorem Korovin and Voronkov, 2001, 2003
TRS is KBONterminating ⇐⇒ it is KBOR>0 terminating
KBOR>0 termination is decidable withinpolynomial time
Theorem Zankl and Middeldorp, 2007
KBO{0,1,...,B} termination (B∈N) can reduce toSATandPBC
This Talk
MAIN RESULT
for every TRSRandN =P
l→r∈R(|l|+|r|) + 1
Ris KBONterminating ⇐⇒ Ris KBO{0,1,...,B} terminating where,B=N4N+1
OVERVIEW OF PROOF
Principal Solutions
MCD
Bound by Norm
This Talk
MAIN RESULT
for every TRSRandN =P
l→r∈R(|l|+|r|) + 1
Ris KBONterminating ⇐⇒ Ris KBO{0,1,...,B} terminating where,B=N4N+1
OVERVIEW OF PROOF
Principal Solutions
MCD
Bound by Norm
This Talk
MAIN RESULT
for every TRSRandN =P
l→r∈R(|l|+|r|) + 1
Ris KBONterminating ⇐⇒ Ris KBO{0,1,...,B} terminating where,B=N4N+1
OVERVIEW OF PROOF
Principal Solutions
MCD
Bound by Norm
This Talk
MAIN RESULT
for every TRSRandN =P
l→r∈R(|l|+|r|) + 1
Ris KBONterminating ⇐⇒ Ris KBO{0,1,...,B} terminating where,B=N4N+1
OVERVIEW OF PROOF
Principal Solutions
MCD
Bound by Norm
Principal Solutions
Example
given precedence, KBONproblem reduces tolinear integral constraints
Example
a(a(x))→b(b(b(x))) b(b(b(b(b(x)))))→a(a(a(x)))
for precedence a>b, solve wrtw(a), w(b)∈N 2·w(a)−3·w(b)>0 −3·w(a) + 5·w(b)>0
for precedence >=∅solve wrtw(a), w(b)∈N 2·w(a)−3·w(b)>0 −3·w(a) + 5·w(b)>0
Example
given precedence, KBONproblem reduces tolinear integral constraints
Example
a(a(x))→b(b(b(x))) b(b(b(b(b(x)))))→a(a(a(x)))
for precedence a>b, solve wrtw(a), w(b)∈N 2·w(a)−3·w(b)>0 −3·w(a) + 5·w(b)>0
for precedence >=∅solve wrtw(a), w(b)∈N 2·w(a)−3·w(b)>0 −3·w(a) + 5·w(b)>0
Example
given precedence, KBONproblem reduces tolinear integral constraints
Example
a(a(x))→b(b(b(x))) b(b(b(b(b(x)))))→a(a(a(x)))
for precedence a>b, solve wrtw(a), w(b)∈N 2·w(a)−3·w(b)>0 −3·w(a) + 5·w(b)>0
for precedence >=∅solve wrtw(a), w(b)∈N 2·w(a)−3·w(b)>0 −3·w(a) + 5·w(b)>0
Principal Solutions
Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003
setI of KBO inequalities are of form
{ ~ai·~xi Ri 0 }i with Ri∈{>, >},~ai∈Zn,~x∈N
Definition
writeAI for(~ai)1,...,n
~
xissolutionofAI ifAI~x>0and~x∈Nn
solution~xmaximizing{i|~ai·~x >0} wrt⊆is principal
Theorem
principal solution ofA always exists
∀principal solution~x: (I is solvable ⇐⇒ ~xsatisfiesI)
Principal Solutions
Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003
setI of KBO inequalities are of form
{ ~ai·~xi Ri 0 }i with Ri∈{>, >},~ai∈Zn,~x∈N
Definition
writeAI for(~ai)1,...,n
~
xissolutionofAI ifAI~x>0and~x∈Nn
solution~xmaximizing{i|~ai·~x >0} wrt⊆is principal
Theorem
principal solution ofA always exists
∀principal solution~x: (I is solvable ⇐⇒ ~xsatisfiesI)
Principal Solutions
Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003
setI of KBO inequalities are of form
{ ~ai·~xi Ri 0 }i with Ri∈{>, >},~ai∈Zn,~x∈N
Definition
writeAI for(~ai)1,...,n
~
xissolutionofAI ifAI~x>0and~x∈Nn
solution~xmaximizing{i|~ai·~x >0} wrt⊆is principal
Theorem
principal solution ofA always exists
∀principal solution~x: (I is solvable ⇐⇒ ~xsatisfiesI)
Principal Solutions
Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003
setI of KBO inequalities are of form
{ ~ai·~xi Ri 0 }i with Ri∈{>, >},~ai∈Zn,~x∈N
Definition
writeAI for(~ai)1,...,n
~
xissolutionofAI ifAI~x>0and~x∈Nn
solution~xmaximizing{i|~ai·~x >0} wrt⊆isprincipal
Theorem
principal solution ofA always exists
∀principal solution~x: (I is solvable ⇐⇒ ~xsatisfiesI)
Principal Solutions
Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003
setI of KBO inequalities are of form
{ ~ai·~xi Ri 0 }i with Ri∈{>, >},~ai∈Zn,~x∈N
Definition
writeAI for(~ai)1,...,n
~
xissolutionofAI ifAI~x>0and~x∈Nn
solution~xmaximizing{i|~ai·~x >0} wrt⊆isprincipal
Theorem
principal solution ofA always exists
∀principal solution~x: (I is solvable ⇐⇒ ~xsatisfiesI)
I=
2·w(a)−3·w(b) > 0
−3·w(a) + 5·w(b) > 0
AI =
2 −3
−3 5
since
AI
3 2
= 0
1
AI
13 8
= 2
1
3 2
is not principal solution ofAI
13 8
is principal solutionofAI and satisfiesI hence I issolvable
I=
2·w(a)−3·w(b) > 0
−3·w(a) + 5·w(b) > 0
AI =
2 −3
−3 5
since
AI
3 2
= 0
1
AI
13 8
= 2
1
3 2
is not principal solution ofAI
13 8
is principal solutionofAI and satisfiesI hence I issolvable
I=
2·w(a)−3·w(b) > 0
−3·w(a) + 5·w(b) > 0
AI =
2 −3
−3 5
since
AI
3 2
= 0
1
AI
13 8
= 2
1
3 2
is not principal solution ofAI
13 8
is principal solutionofAI and satisfiesI hence Iis solvable
Example
I=
2·w(a)−3·w(b) > 0
−3·w(a) + 5·w(b) > 0
−4·w(a) + 3·w(b) > 0
AI =
2 −3
−3 5
−4 3
principal solution ofAI is 0
0
anddoes notsatisfy I henceI is not solvable
QUESTION
how to findprincipal solution? + MCD
Example
I=
2·w(a)−3·w(b) > 0
−3·w(a) + 5·w(b) > 0
−4·w(a) + 3·w(b) > 0
AI =
2 −3
−3 5
−4 3
principal solution ofAI is 0
0
anddoes notsatisfyI
henceI is not solvable
QUESTION
how to findprincipal solution? + MCD
Example
I=
2·w(a)−3·w(b) > 0
−3·w(a) + 5·w(b) > 0
−4·w(a) + 3·w(b) > 0
AI =
2 −3
−3 5
−4 3
principal solution ofAI is 0
0
anddoes notsatisfyI henceI is not solvable
QUESTION
how to findprincipal solution? + MCD
Example
I=
2·w(a)−3·w(b) > 0
−3·w(a) + 5·w(b) > 0
−4·w(a) + 3·w(b) > 0
AI =
2 −3
−3 5
−4 3
principal solution ofAI is 0
0
anddoes notsatisfyI henceI is not solvable
QUESTION
how to findprincipal solution?
+ MCD
Example
I=
2·w(a)−3·w(b) > 0
−3·w(a) + 5·w(b) > 0
−4·w(a) + 3·w(b) > 0
AI =
2 −3
−3 5
−4 3
principal solution ofAI is 0
0
anddoes notsatisfyI henceI is not solvable
QUESTION
how to findprincipal solution? + MCD
MCD: Method of Complete Description
MCD
Dick, Kalmus and Martin, 1990 (a1, . . . , an)κ= (~ei|ai>0) ++(aj~ei−ai~ej|ai<0, aj >0)
form×nmatrixA and06i6m SiA=
(En ifi= 0 Si−1A (~aiSi−1A )κ otherwise
sum of all column vectors of SmA is denoted by~sA
Theorem
~sAis principal solutionofA
MCD
Dick, Kalmus and Martin, 1990 (a1, . . . , an)κ= (~ei|ai>0) ++(aj~ei−ai~ej|ai<0, aj >0)
form×nmatrixA and06i6m SiA=
(En ifi= 0 Si−1A (~aiSi−1A )κ otherwise
sum of all column vectors of SmA is denoted by~sA
Theorem
~sAis principal solutionofA
MCD
Dick, Kalmus and Martin, 1990 (a1, . . . , an)κ= (~ei|ai>0) ++(aj~ei−ai~ej|ai<0, aj >0)
form×nmatrixA and06i6m SiA=
(En ifi= 0 Si−1A (~aiSi−1A )κ otherwise
sum of all column vectors ofSAmis denoted by~sA
Theorem
~sAis principal solutionofA
MCD
Dick, Kalmus and Martin, 1990 (a1, . . . , an)κ= (~ei|ai>0) ++(aj~ei−ai~ej|ai<0, aj >0)
form×nmatrixA and06i6m SiA=
(En ifi= 0 Si−1A (~aiSi−1A )κ otherwise
sum of all column vectors ofSAmis denoted by~sA
Theorem
~sAis principal solutionofA
Example
I=
2·w(a)−3·w(b) > 0
−3·w(a) + 5·w(b) > 0
AI =
2 −3
−3 5
performing MCD S0AI =
1 0 0 1
S1AI =S0AI((2 −3)S0AI)κ= 1 3
0 2
S2AI =S1AI((−3 5)S1AI)κ=
3 10 2 6
we obtain principal solution
~ sAI =
3 2
+ 10
6
= 13
8
which satisfiesI. henceI is solvable
Example
I=
2·w(a)−3·w(b) > 0
−3·w(a) + 5·w(b) > 0
AI =
2 −3
−3 5
performing MCD
S0AI = 1 0
0 1
S1AI =S0AI((2 −3)S0AI)κ= 1 3
0 2
S2AI =S1AI((−3 5)S1AI)κ=
3 10 2 6
we obtain principal solution
~ sAI =
3 2
+ 10
6
= 13
8
which satisfiesI. henceI is solvable
Example
I=
2·w(a)−3·w(b) > 0
−3·w(a) + 5·w(b) > 0
AI =
2 −3
−3 5
performing MCD S0AI =
1 0 0 1
S1AI =S0AI((2 −3)S0AI)κ= 1 3
0 2
S2AI =S1AI((−3 5)S1AI)κ=
3 10 2 6
we obtain principal solution
~ sAI =
3 2
+ 10
6
= 13
8
which satisfiesI. henceI is solvable
Example
I=
2·w(a)−3·w(b) > 0
−3·w(a) + 5·w(b) > 0
AI =
2 −3
−3 5
performing MCD S0AI =
1 0 0 1
S1AI =S0AI((2 −3)S0AI)κ= 1 3
0 2
S2AI =S1AI((−3 5)S1AI)κ=
3 10 2 6
we obtain principal solution
~sAI = 3
2
+ 10
6
= 13
8
which satisfiesI. henceI is solvable
Example
I=
2·w(a)−3·w(b) > 0
−3·w(a) + 5·w(b) > 0
AI =
2 −3
−3 5
performing MCD S0AI =
1 0 0 1
S1AI =S0AI((2 −3)S0AI)κ= 1 3
0 2
S2AI =S1AI((−3 5)S1AI)κ=
3 10 2 6
we obtain principal solution
~sAI = 3
2
+ 10
6
= 13
8
Bound by Norm
MCD
(a1, . . . , an)κ= (~ei|ai>0) ++(aj~ei−ai~ej|ai<0, aj >0)
form×nmatrixA and06i6m SiA=
(En ifi= 0 Si−1A (~aiSi−1A )κ otherwise
sum of all column vectors ofSAmis denoted by~sA
GOAL
bound~sA∈ {0,1, . . . , B}n
APPROACH
definenormk · kto calculatek~sAIk withB=k~sAIk
MCD
(a1, . . . , an)κ= (~ei|ai>0) ++(aj~ei−ai~ej|ai<0, aj >0)
form×nmatrixA and06i6m SiA=
(En ifi= 0 Si−1A (~aiSi−1A )κ otherwise
sum of all column vectors ofSAmis denoted by~sA
GOAL
bound~sA∈ {0,1, . . . , B}n
APPROACH
definenormk · kto calculatek~sAIk withB=k~sAIk
MCD
(a1, . . . , an)κ= (~ei|ai>0) ++(aj~ei−ai~ej|ai<0, aj >0)
form×nmatrixA and06i6m SiA=
(En ifi= 0 Si−1A (~aiSi−1A )κ otherwise
sum of all column vectors ofSAmis denoted by~sA
GOAL
bound~sA∈ {0,1, . . . , B}n
APPROACH
definenormk · kto calculatek~sAIk withB=k~sAIk
Norm
Definition
kAk= maxi,j|aij|form×nmatrixA= (aij)ij
Lemma
for everym×nmatrixAandn×pmatrixB kaκk=kak
kABk6nkAkkBk
(a1, . . . , an)κ isn×kmatrix withk6n2. SAi ism×kmatrix withk6n2i.
kSiAk6(2mkAk)2i−1 k~sAk6n2m·(2mkAk)2m−1
Norm
Definition
kAk= maxi,j|aij|form×nmatrixA= (aij)ij
Lemma
for everym×nmatrixAandn×pmatrixB kaκk=kak
kABk6nkAkkBk
(a1, . . . , an)κ isn×kmatrix withk6n2. SAi ism×kmatrix withk6n2i.
kSiAk6(2mkAk)2i−1 k~sAk6n2m·(2mkAk)2m−1
Norm
Definition
kAk= maxi,j|aij|form×nmatrixA= (aij)ij
Lemma
for everym×nmatrixAandn×pmatrixB kaκk=kak
kABk6nkAkkBk
(a1, . . . , an)κ isn×kmatrix withk6n2. SAi ism×kmatrix withk6n2i.
kSiAk6(2mkAk)2i−1 k~sAk6n2m·(2mkAk)2m−1
Norm
Definition
kAk= maxi,j|aij|form×nmatrixA= (aij)ij
Lemma
for everym×nmatrixAandn×pmatrixB kaκk=kak
kABk6nkAkkBk
(a1, . . . , an)κ isn×kmatrix withk6n2. SAi ism×kmatrix withk6n2i.
kSiAk6(2mkAk)2i−1 k~sAk6n2m·(2mkAk)2m−1
Norm
Definition
kAk= maxi,j|aij|form×nmatrixA= (aij)ij
Lemma
for everym×nmatrixAandn×pmatrixB kaκk=kak
kABk6nkAkkBk
(a1, . . . , an)κ isn×kmatrix withk6n2. SAi ism×kmatrix withk6n2i.
kSiAk6(2mkAk)2i−1 k~sAk6n2m·(2mkAk)2m−1
Lemma
letRbe TRS of sizeN
Ibe set of inequalities induced by KBO with fixed precedence AI be of sizem×n
m6N n6N kAIk6N therefore
k~sAIk6N4N+1:=B thus,
~sAI ∈ {0,1, . . . , B}n
Main Result
Theorem
Ris KBONterminating ⇐⇒ Ris KBO{0,1,...,B}terminating where,B=N4N+1
Corollary
Zankl and Middeldorp’s SAT and PBC encodings are complete for thisB
Main Result
Theorem
Ris KBONterminating ⇐⇒ Ris KBO{0,1,...,B}terminating where,B=N4N+1
Corollary
Zankl and Middeldorp’s SAT and PBC encodings are complete for thisB
Summary
letRbe TRS,N =P
l→r∈R(|l|+|r|) + 1, andB=N4N+1 Ris KBOR
>0 terminating
⇐⇒ Ris KBONterminating Korovin and Voronkov
⇐⇒ Ris KBO{0,1,...,B} terminating this talk
theoretical interest of decidability issue is more or less closed
how about automation? +
Summary
letRbe TRS,N =P
l→r∈R(|l|+|r|) + 1, andB=N4N+1 Ris KBOR
>0 terminating
⇐⇒ Ris KBONterminating Korovin and Voronkov
⇐⇒ Ris KBO{0,1,...,B} terminating this talk
theoretical interest of decidability issue is more or less closed
how about automation? +
Summary
letRbe TRS,N =P
l→r∈R(|l|+|r|) + 1, andB=N4N+1 Ris KBOR
>0 terminating
⇐⇒ Ris KBONterminating Korovin and Voronkov
⇐⇒ Ris KBO{0,1,...,B} terminating this talk
theoretical interest of decidability issue is more or less closed
how about automation? +
Automation
Theorem Dick, Kalmus, and Martin, 1990
KBOR>0 termination is decidable by MCD
Theorem Korovin and Voronkov, 2001, 2003
KBOR>0 termination is decidable by Karmarkar/Khachiyanalgorithm
Theorem Zankl and Middeldorp, 2007
KBO{0,1,...,B} termination (B∈N) is decidable viaSAT/PBCencodings
Theorem
KBOR
>0 termination is decidable viaSMT(linear arithmetic) encoding
Theorem Dick, Kalmus, and Martin, 1990
KBOR>0 termination is decidable by MCD
Theorem Korovin and Voronkov, 2001, 2003
KBOR>0 termination is decidable by Karmarkar/Khachiyanalgorithm
Theorem Zankl and Middeldorp, 2007
KBO{0,1,...,B} termination (B∈N) is decidable viaSAT/PBCencodings
Theorem
KBOR
>0 termination is decidable viaSMT(linear arithmetic) encoding
Theorem Dick, Kalmus, and Martin, 1990
KBOR>0 termination is decidable by MCD
Theorem Korovin and Voronkov, 2001, 2003
KBOR>0 termination is decidable by Karmarkar/Khachiyanalgorithm
Theorem Zankl and Middeldorp, 2007
KBO{0,1,...,B} termination (B∈N) is decidable viaSAT/PBCencodings
Theorem
KBOR
>0 termination is decidable viaSMT(linear arithmetic) encoding
Theorem Dick, Kalmus, and Martin, 1990
KBOR>0 termination is decidable by MCD
Theorem Korovin and Voronkov, 2001, 2003
KBOR>0 termination is decidable by Karmarkar/Khachiyanalgorithm
Theorem Zankl and Middeldorp, 2007
KBO{0,1,...,B} termination (B∈N) is decidable viaSAT/PBCencodings
Theorem
KBOR
>0 termination is decidable viaSMT(linear arithmetic) encoding
Experiments
test-bed: 1381TRSsfrom Termination Problem Data Base 4.0
PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout
method(B) total time(sec) #success #timeout
MCD 444 102 7
simplex 370 105 4
SAT/PBC(4) 31/90 104/104 0/0
SAT/PBC(8) 32/93 106/106 0/0
SAT/PBC(16) 34/100 107/107 0/0
SAT/PBC(1024) 351/187 107/107 3/1
SMT 26 107 0
Experiments
test-bed: 1381TRSsfrom Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB
60 seconds timeout
method(B) total time(sec) #success #timeout
MCD 444 102 7
simplex 370 105 4
SAT/PBC(4) 31/90 104/104 0/0
SAT/PBC(8) 32/93 106/106 0/0
SAT/PBC(16) 34/100 107/107 0/0
SAT/PBC(1024) 351/187 107/107 3/1
SMT 26 107 0
Experiments
test-bed: 1381TRSsfrom Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout
method(B) total time(sec) #success #timeout
MCD 444 102 7
simplex 370 105 4
SAT/PBC(4) 31/90 104/104 0/0
SAT/PBC(8) 32/93 106/106 0/0
SAT/PBC(16) 34/100 107/107 0/0
SAT/PBC(1024) 351/187 107/107 3/1
SMT 26 107 0
Experiments
test-bed: 1381TRSsfrom Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout
method(B) total time(sec) #success #timeout
MCD 444 102 7
simplex 370 105 4
SAT/PBC(4) 31/90 104/104 0/0
SAT/PBC(8) 32/93 106/106 0/0
SAT/PBC(16) 34/100 107/107 0/0
SAT/PBC(1024) 351/187 107/107 3/1
SMT 26 107 0
Experiments
test-bed: 1381TRSsfrom Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout
method(B) total time(sec) #success #timeout
MCD 444 102 7
simplex 370 105 4
SAT/PBC(4) 31/90 104/104 0/0
SAT/PBC(8) 32/93 106/106 0/0
SAT/PBC(16) 34/100 107/107 0/0
SAT/PBC(1024) 351/187 107/107 3/1
SMT 26 107 0
Experiments
test-bed: 1381TRSsfrom Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout
method(B) total time(sec) #success #timeout
MCD 444 102 7
simplex 370 105 4
SAT/PBC(4) 31/90 104/104 0/0
SAT/PBC(8) 32/93 106/106 0/0
SAT/PBC(16) 34/100 107/107 0/0
SAT/PBC(1024) 351/187 107/107 3/1
SMT 26 107 0
Experiments
test-bed: 1381TRSsfrom Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout
method(B) total time(sec) #success #timeout
MCD 444 102 7
simplex 370 105 4
SAT/PBC(4) 31/90 104/104 0/0
SAT/PBC(8) 32/93 106/106 0/0
SAT/PBC(16) 34/100 107/107 0/0
SAT/PBC(1024) 351/187 107/107 3/1
SMT 26 107 0
Experiments
test-bed: 1381TRSsfrom Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout
method(B) total time(sec) #success #timeout
MCD 444 102 7
simplex 370 105 4
SAT/PBC(4) 31/90 104/104 0/0
SAT/PBC(8) 32/93 106/106 0/0
SAT/PBC(16) 34/100 107/107 0/0
SAT/PBC(1024) 351/187 107/107 3/1
SMT 26 107 0
Experiments
test-bed: 1381TRSsfrom Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout
method(B) total time(sec) #success #timeout
MCD 444 102 7
simplex 370 105 4
SAT/PBC(4) 31/90 104/104 0/0
SAT/PBC(8) 32/93 106/106 0/0
SAT/PBC(16) 34/100 107/107 0/0
SAT/PBC(1024) 351/187 107/107 3/1
SMT 26 107 0
Experiments
test-bed: 1381TRSsfrom Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB 60 seconds timeout
method(B) total time(sec) #success #timeout
MCD 444 102 7
simplex 370 105 4
SAT/PBC(4) 31/90 104/104 0/0
SAT/PBC(8) 32/93 106/106 0/0
SAT/PBC(16) 34/100 107/107 0/0
SAT/PBC(1024) 351/187 107/107 3/1
SMT 26 107 0
Conclusion
letRbe TRS,N =P
l→r∈R(|l|+|r|) + 1, andB=N4N+1 Ris KBOR>0 terminating
⇐⇒ Ris KBONterminating Korovin and Voronkov
⇐⇒ Ris KBO{0,1,...,B} terminating this talk
CONCLUSION
finite characterization of KBO orientability use SMT solver to automate
FUTURE WORK
find optimalB
Conclusion
letRbe TRS,N =P
l→r∈R(|l|+|r|) + 1, andB=N4N+1 Ris KBOR>0 terminating
⇐⇒ Ris KBONterminating Korovin and Voronkov
⇐⇒ Ris KBO{0,1,...,B} terminating this talk
CONCLUSION
finite characterization of KBO orientability use SMT solver to automate
FUTURE WORK
find optimalB