102
KBO Orientability Harald Zankl Nao Hirokawa Aart Middeldorp Japan Advanced Institute of Science and Technology University of Innsbruck KBO Orientability 1/32

KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

KBO Orientability

Harald Zankl‡ Nao Hirokawa† Aart Middeldorp‡

† Japan Advanced Institute of Science and Technology

‡ University of Innsbruck

KBO Orientability 1/32

Page 2: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Reference

JAR 2009 Harald Zankl, Nao Hirokawa, and Aart MiddeldorpKBO OrientabilityJournal of Automated Reasoning 43(2), pp. 173-201, 2009

KBO Orientability 2/32

Page 3: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Term Rewriting

Definition

pair of terms l→ r is rewrite rule if l 6∈ V ∧ Var(r) ⊆ Var(l)term rewrite system (TRS) is set of rewrite rules

(rewrite relation) s→R t if ∃l→ r ∈ R, context C, substitution σ.s = C[lσ] ∧ t = C[rσ]

Example

TRS Rx + 0→ x x + s(y)→ s(x + y)

x× 0→ 0 x× s(y)→ x× y + x

rewriting

s(0)× s(0)→R s(0)× 0 + s(0)

→R 0 + s(0)

→R s(0 + 0)

→R s(0) terminated

KBO Orientability 3/32

Page 4: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Term Rewriting

Definition

pair of terms l→ r is rewrite rule if l 6∈ V ∧ Var(r) ⊆ Var(l)term rewrite system (TRS) is set of rewrite rules

(rewrite relation) s→R t if ∃l→ r ∈ R, context C, substitution σ.s = C[lσ] ∧ t = C[rσ]

Example

TRS Rx + 0→ x x + s(y)→ s(x + y)

x× 0→ 0 x× s(y)→ x× y + x

rewriting

s(0)× s(0)→R s(0)× 0 + s(0)

→R 0 + s(0)

→R s(0 + 0)

→R s(0) terminated

KBO Orientability 3/32

Page 5: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Term Rewriting

Definition

pair of terms l→ r is rewrite rule if l 6∈ V ∧ Var(r) ⊆ Var(l)term rewrite system (TRS) is set of rewrite rules

(rewrite relation) s→R t if ∃l→ r ∈ R, context C, substitution σ.s = C[lσ] ∧ t = C[rσ]

Example

TRS Rx + 0→ x x + s(y)→ s(x + y)

x× 0→ 0 x× s(y)→ x× y + x

rewriting

s(0)× s(0)→R s(0)× 0 + s(0)

→R 0 + s(0)

→R s(0 + 0)

→R s(0) terminated

KBO Orientability 3/32

Page 6: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Termination

Definition

TRS R is terminating if there is no infinite rewrite sequencet1 →R t2 →R · · ·

QUESTION

how to prove termination?

+ Knuth-Bendix order (KBO)

introduced by Knuth and Bendix, 1970

best studied termination methods

great success in theorem provers (Waldmeister, Vampire, ...)

KBO Orientability 4/32

Page 7: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Termination

Definition

TRS R is terminating if there is no infinite rewrite sequencet1 →R t2 →R · · ·

QUESTION

how to prove termination?

+ Knuth-Bendix order (KBO)

introduced by Knuth and Bendix, 1970

best studied termination methods

great success in theorem provers (Waldmeister, Vampire, ...)

KBO Orientability 4/32

Page 8: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Termination

Definition

TRS R is terminating if there is no infinite rewrite sequencet1 →R t2 →R · · ·

QUESTION

how to prove termination?

+ Knuth-Bendix order (KBO)

introduced by Knuth and Bendix, 1970

best studied termination methods

great success in theorem provers (Waldmeister, Vampire, ...)

KBO Orientability 4/32

Page 9: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Termination

Definition

TRS R is terminating if there is no infinite rewrite sequencet1 →R t2 →R · · ·

QUESTION

how to prove termination?

+ Knuth-Bendix order (KBO)

introduced by Knuth and Bendix, 1970

best studied termination methods

great success in theorem provers (Waldmeister, Vampire, ...)

KBO Orientability 4/32

Page 10: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Termination

Definition

TRS R is terminating if there is no infinite rewrite sequencet1 →R t2 →R · · ·

QUESTION

how to prove termination?

+ Knuth-Bendix order (KBO)

introduced by Knuth and Bendix, 1970

best studied termination methods

great success in theorem provers (Waldmeister, Vampire, ...)

KBO Orientability 4/32

Page 11: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Termination

Definition

TRS R is terminating if there is no infinite rewrite sequencet1 →R t2 →R · · ·

QUESTION

how to prove termination?

+ Knuth-Bendix order (KBO)

introduced by Knuth and Bendix, 1970

best studied termination methods

great success in theorem provers (Waldmeister, Vampire, ...)

KBO Orientability 4/32

Page 12: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Knuth-Bendix Orders

Definition

precedence > is proper order on function symbols F

weight function (w,w0) is pair in R>0F × R>0

weight of term t is

w(t) =

{w0 if t ∈ Vw(f) + w(t1) + · · ·+ w(tn) if t = f(t1, . . . , tn)

weight function (w,w0) is admissible for precedence > if

w(f) > 0 or f > g

for all unary functions f and all functions g

KBO Orientability 5/32

Page 13: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Knuth-Bendix Orders

Definition

precedence > is proper order on function symbols F

weight function (w,w0) is pair in R>0F × R>0

weight of term t is

w(t) =

{w0 if t ∈ Vw(f) + w(t1) + · · ·+ w(tn) if t = f(t1, . . . , tn)

weight function (w,w0) is admissible for precedence > if

w(f) > 0 or f > g

for all unary functions f and all functions g

KBO Orientability 5/32

Page 14: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Knuth-Bendix Orders

Definition

precedence > is proper order on function symbols F

weight function (w,w0) is pair in R>0F × R>0

weight of term t is

w(t) =

{w0 if t ∈ Vw(f) + w(t1) + · · ·+ w(tn) if t = f(t1, . . . , tn)

weight function (w,w0) is admissible for precedence > if

w(f) > 0 or f > g

for all unary functions f and all functions g

KBO Orientability 5/32

Page 15: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Knuth-Bendix Orders

Definition

precedence > is proper order on function symbols F

weight function (w,w0) is pair in R>0F × R>0

weight of term t is

w(t) =

{w0 if t ∈ Vw(f) + w(t1) + · · ·+ w(tn) if t = f(t1, . . . , tn)

weight function (w,w0) is admissible for precedence > if

w(f) > 0 or f > g

for all unary functions f and all functions g

KBO Orientability 5/32

Page 16: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Definition

Knuth-Bendix order >kbo on terms T (F ,V):s >kbo t if |s|x > |t|x for all x ∈ V and either

w(s) > w(t), or

w(s) = w(t) and

s = fn(t) and t ∈ V for some unary f and n > 1; or

s = f(s1, . . . , si−1, si, . . . , sn), t = f(s1, . . . , si−1, ti, . . . , tn), andsi >kbo ti; or

s = f(s1, . . . , sn), t = g(t1, . . . , tm), and f > g

KBO Orientability 6/32

Page 17: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Definition

Knuth-Bendix order >kbo on terms T (F ,V):s >kbo t if |s|x > |t|x for all x ∈ V and either

w(s) > w(t), or

w(s) = w(t) and

s = fn(t) and t ∈ V for some unary f and n > 1; or

s = f(s1, . . . , si−1, si, . . . , sn), t = f(s1, . . . , si−1, ti, . . . , tn), andsi >kbo ti; or

s = f(s1, . . . , sn), t = g(t1, . . . , tm), and f > g

KBO Orientability 6/32

Page 18: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Definition

Knuth-Bendix order >kbo on terms T (F ,V):s >kbo t if |s|x > |t|x for all x ∈ V and either

w(s) > w(t), or

w(s) = w(t) and

s = fn(t) and t ∈ V for some unary f and n > 1; or

s = f(s1, . . . , si−1, si, . . . , sn), t = f(s1, . . . , si−1, ti, . . . , tn), andsi >kbo ti; or

s = f(s1, . . . , sn), t = g(t1, . . . , tm), and f > g

KBO Orientability 6/32

Page 19: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Definition

Knuth-Bendix order >kbo on terms T (F ,V):s >kbo t if |s|x > |t|x for all x ∈ V and either

w(s) > w(t), or

w(s) = w(t) and

s = fn(t) and t ∈ V for some unary f and n > 1; or

s = f(s1, . . . , si−1, si, . . . , sn), t = f(s1, . . . , si−1, ti, . . . , tn), andsi >kbo ti; or

s = f(s1, . . . , sn), t = g(t1, . . . , tm), and f > g

KBO Orientability 6/32

Page 20: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Definition

Knuth-Bendix order >kbo on terms T (F ,V):s >kbo t if |s|x > |t|x for all x ∈ V and either

w(s) > w(t), or

w(s) = w(t) and

s = fn(t) and t ∈ V for some unary f and n > 1; or

s = f(s1, . . . , si−1, si, . . . , sn), t = f(s1, . . . , si−1, ti, . . . , tn), andsi >kbo ti; or

s = f(s1, . . . , sn), t = g(t1, . . . , tm), and f > g

KBO Orientability 6/32

Page 21: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Definition

Knuth-Bendix order >kbo on terms T (F ,V):s >kbo t if |s|x > |t|x for all x ∈ V and either

w(s) > w(t), or

w(s) = w(t) and

s = fn(t) and t ∈ V for some unary f and n > 1; or

s = f(s1, . . . , si−1, si, . . . , sn), t = f(s1, . . . , si−1, ti, . . . , tn), andsi >kbo ti; or

s = f(s1, . . . , sn), t = g(t1, . . . , tm), and f > g

KBO Orientability 6/32

Page 22: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Definition

let X ⊆ R>0. TRS R is KBOX terminating if

∃ precedence >

∃ admissible weight function (w,w0) ∈ XF ×Xsuch that l >kbo r for all l→ r ∈ R

Theorem Knuth and Bendix, 1970

TRS is terminating if it is KBON terminating

KBO Orientability 7/32

Page 23: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Definition

let X ⊆ R>0. TRS R is KBOX terminating if

∃ precedence >

∃ admissible weight function (w,w0) ∈ XF ×Xsuch that l >kbo r for all l→ r ∈ R

Theorem Knuth and Bendix, 1970

TRS is terminating if it is KBON terminating

KBO Orientability 7/32

Page 24: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Quiz

KBO Orientability 8/32

Page 25: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example I

a(a(x))→ b(b(b(x))) b(b(b(b(b(x)))))→ a(a(a(x)))

is KBON terminating ? — yes

Proof

take precedence a > b and 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

KBO Orientability 9/32

Page 26: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example I

a(a(x))→ b(b(b(x))) b(b(b(b(b(x)))))→ a(a(a(x)))

is KBON terminating ?

— yes

Proof

take precedence a > b and 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

KBO Orientability 9/32

Page 27: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example I

a(a(x))→ b(b(b(x))) b(b(b(b(b(x)))))→ a(a(a(x)))

is KBON terminating ? — yes

Proof

take precedence a > b and 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

KBO Orientability 9/32

Page 28: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example I

a(a(x))→ b(b(b(x))) b(b(b(b(b(x)))))→ a(a(a(x)))

is KBON terminating ? — yes

Proof

take precedence a > b and 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

KBO Orientability 9/32

Page 29: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example I

a(a(x))→ b(b(b(x))) b(b(b(b(b(x)))))→ a(a(a(x)))

is KBON terminating ? — yes

Proof

take precedence a > b and 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

KBO Orientability 9/32

Page 30: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example I

a(a(x))→ b(b(b(x))) b(b(b(b(b(x)))))→ a(a(a(x)))

is KBON terminating ? — yes

Proof

take precedence a > b and 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

KBO Orientability 9/32

Page 31: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example II

TRS R

x+ 0→ x x+ s(y)→ s(x+ y)x× 0→ 0 x× s(y)→ x× y + x

is KBON terminating ?

— no

KBO Orientability 10/32

Page 32: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example II

TRS R

x+ 0→ x x+ s(y)→ s(x+ y)x× 0→ 0 x× s(y)→ x× y + x

is KBON terminating ? — no

KBO Orientability 10/32

Page 33: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

History of KBO

KBO Orientability 11/32

Page 34: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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 is decidable within exponential time

Theorem Korovin and Voronkov, 2001, 2003

TRS is KBON terminating ⇐⇒ it is KBOR>0 terminating

KBOR>0 termination is decidable within polynomial time

Theorem Zankl and Middeldorp, 2007

KBO{0,1,...,B} termination (B ∈ N) can reduce to SAT and PBC

KBO Orientability 12/32

Page 35: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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 is decidable within exponential time

Theorem Korovin and Voronkov, 2001, 2003

TRS is KBON terminating ⇐⇒ it is KBOR>0 terminating

KBOR>0 termination is decidable within polynomial time

Theorem Zankl and Middeldorp, 2007

KBO{0,1,...,B} termination (B ∈ N) can reduce to SAT and PBC

KBO Orientability 12/32

Page 36: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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 is decidable within exponential time

Theorem Korovin and Voronkov, 2001, 2003

TRS is KBON terminating ⇐⇒ it is KBOR>0 terminating

KBOR>0 termination is decidable within polynomial time

Theorem Zankl and Middeldorp, 2007

KBO{0,1,...,B} termination (B ∈ N) can reduce to SAT and PBC

KBO Orientability 12/32

Page 37: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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 is decidable within exponential time

Theorem Korovin and Voronkov, 2001, 2003

TRS is KBON terminating ⇐⇒ it is KBOR>0 terminating

KBOR>0 termination is decidable within polynomial time

Theorem Zankl and Middeldorp, 2007

KBO{0,1,...,B} termination (B ∈ N) can reduce to SAT and PBC

KBO Orientability 12/32

Page 38: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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 is decidable within exponential time

Theorem Korovin and Voronkov, 2001, 2003

TRS is KBON terminating ⇐⇒ it is KBOR>0 terminating

KBOR>0 termination is decidable within polynomial time

Theorem Zankl and Middeldorp, 2007

KBO{0,1,...,B} termination (B ∈ N) can reduce to SAT and PBC

KBO Orientability 12/32

Page 39: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

This Talk

MAIN RESULT

for every TRS R and N =∑l→r∈R(|l|+ |r|) + 1

R is KBON terminating ⇐⇒ R is KBO{0,1,...,B} terminating

where, B = N4N+1

OVERVIEW OF PROOF

Principal Solutions

MCD

Bound by Norm

KBO Orientability 13/32

Page 40: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

This Talk

MAIN RESULT

for every TRS R and N =∑l→r∈R(|l|+ |r|) + 1

R is KBON terminating ⇐⇒ R is KBO{0,1,...,B} terminating

where, B = N4N+1

OVERVIEW OF PROOF

Principal Solutions

MCD

Bound by Norm

KBO Orientability 13/32

Page 41: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

This Talk

MAIN RESULT

for every TRS R and N =∑l→r∈R(|l|+ |r|) + 1

R is KBON terminating ⇐⇒ R is KBO{0,1,...,B} terminating

where, B = N4N+1

OVERVIEW OF PROOF

Principal Solutions

MCD

Bound by Norm

KBO Orientability 13/32

Page 42: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

This Talk

MAIN RESULT

for every TRS R and N =∑l→r∈R(|l|+ |r|) + 1

R is KBON terminating ⇐⇒ R is KBO{0,1,...,B} terminating

where, B = N4N+1

OVERVIEW OF PROOF

Principal Solutions

MCD

Bound by Norm

KBO Orientability 13/32

Page 43: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Principal Solutions

KBO Orientability 14/32

Page 44: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example

given precedence, KBON problem reduces to linear 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 wrt w(a), w(b) ∈ N

2 · w(a)− 3 · w(b) > 0 −3 · w(a) + 5 · w(b) > 0

for precedence > = ∅ solve wrt w(a), w(b) ∈ N

2 · w(a)− 3 · w(b) > 0 −3 · w(a) + 5 · w(b) > 0

KBO Orientability 15/32

Page 45: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example

given precedence, KBON problem reduces to linear 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 wrt w(a), w(b) ∈ N

2 · w(a)− 3 · w(b) > 0 −3 · w(a) + 5 · w(b) > 0

for precedence > = ∅ solve wrt w(a), w(b) ∈ N

2 · w(a)− 3 · w(b) > 0 −3 · w(a) + 5 · w(b) > 0

KBO Orientability 15/32

Page 46: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example

given precedence, KBON problem reduces to linear 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 wrt w(a), w(b) ∈ N

2 · w(a)− 3 · w(b) > 0 −3 · w(a) + 5 · w(b) > 0

for precedence > = ∅ solve wrt w(a), w(b) ∈ N

2 · w(a)− 3 · w(b) > 0 −3 · w(a) + 5 · w(b) > 0

KBO Orientability 15/32

Page 47: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Principal Solutions

Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003

set I of KBO inequalities are of form

{ ~ai · ~xi Ri 0 }i with Ri ∈ {>, >},~ai ∈ Zn, ~x ∈ N

Definition

write AI for (~ai)1,...,n~x is solution of AI if AI~x > 0 and ~x ∈ Nn

solution ~x maximizing {i | ~ai · ~x > 0} wrt ⊆ is principal

Theorem

principal solution of A always exists

∀principal solution ~x : (I is solvable ⇐⇒ ~x satisfies I)

KBO Orientability 16/32

Page 48: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Principal Solutions

Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003

set I of KBO inequalities are of form

{ ~ai · ~xi Ri 0 }i with Ri ∈ {>, >},~ai ∈ Zn, ~x ∈ N

Definition

write AI for (~ai)1,...,n

~x is solution of AI if AI~x > 0 and ~x ∈ Nn

solution ~x maximizing {i | ~ai · ~x > 0} wrt ⊆ is principal

Theorem

principal solution of A always exists

∀principal solution ~x : (I is solvable ⇐⇒ ~x satisfies I)

KBO Orientability 16/32

Page 49: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Principal Solutions

Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003

set I of KBO inequalities are of form

{ ~ai · ~xi Ri 0 }i with Ri ∈ {>, >},~ai ∈ Zn, ~x ∈ N

Definition

write AI for (~ai)1,...,n~x is solution of AI if AI~x > 0 and ~x ∈ Nn

solution ~x maximizing {i | ~ai · ~x > 0} wrt ⊆ is principal

Theorem

principal solution of A always exists

∀principal solution ~x : (I is solvable ⇐⇒ ~x satisfies I)

KBO Orientability 16/32

Page 50: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Principal Solutions

Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003

set I of KBO inequalities are of form

{ ~ai · ~xi Ri 0 }i with Ri ∈ {>, >},~ai ∈ Zn, ~x ∈ N

Definition

write AI for (~ai)1,...,n~x is solution of AI if AI~x > 0 and ~x ∈ Nn

solution ~x maximizing {i | ~ai · ~x > 0} wrt ⊆ is principal

Theorem

principal solution of A always exists

∀principal solution ~x : (I is solvable ⇐⇒ ~x satisfies I)

KBO Orientability 16/32

Page 51: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Principal Solutions

Gale, 1960; Dick, Kalmus and Martin, 1990; Korovin and Voronkov, 2003

set I of KBO inequalities are of form

{ ~ai · ~xi Ri 0 }i with Ri ∈ {>, >},~ai ∈ Zn, ~x ∈ N

Definition

write AI for (~ai)1,...,n~x is solution of AI if AI~x > 0 and ~x ∈ Nn

solution ~x maximizing {i | ~ai · ~x > 0} wrt ⊆ is principal

Theorem

principal solution of A always exists

∀principal solution ~x : (I is solvable ⇐⇒ ~x satisfies I)

KBO Orientability 16/32

Page 52: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

I ={

2 · w(a)− 3 · w(b) > 0−3 · w(a) + 5 · w(b) > 0

}AI =

(2 −3−3 5

)

since

AI

(32

)=(

01

)AI

(138

)=(

21

)(

32

)is not principal solution of AI

(138

)is principal solution of AI and satisfies I

hence I is solvable

KBO Orientability 17/32

Page 53: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

I ={

2 · w(a)− 3 · w(b) > 0−3 · w(a) + 5 · w(b) > 0

}AI =

(2 −3−3 5

)

since

AI

(32

)=(

01

)AI

(138

)=(

21

)(

32

)is not principal solution of AI

(138

)is principal solution of AI and satisfies I

hence I is solvable

KBO Orientability 17/32

Page 54: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

I ={

2 · w(a)− 3 · w(b) > 0−3 · w(a) + 5 · w(b) > 0

}AI =

(2 −3−3 5

)

since

AI

(32

)=(

01

)AI

(138

)=(

21

)(

32

)is not principal solution of AI

(138

)is principal solution of AI and satisfies I

hence I is solvable

KBO Orientability 17/32

Page 55: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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 of AI is

(00

)and does not satisfy I

hence I is not solvable

QUESTION

how to find principal solution? + MCD

KBO Orientability 18/32

Page 56: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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 of AI is

(00

)and does not satisfy I

hence I is not solvable

QUESTION

how to find principal solution? + MCD

KBO Orientability 18/32

Page 57: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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 of AI is

(00

)and does not satisfy I

hence I is not solvable

QUESTION

how to find principal solution? + MCD

KBO Orientability 18/32

Page 58: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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 of AI is

(00

)and does not satisfy I

hence I is not solvable

QUESTION

how to find principal solution?

+ MCD

KBO Orientability 18/32

Page 59: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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 of AI is

(00

)and does not satisfy I

hence I is not solvable

QUESTION

how to find principal solution? + MCD

KBO Orientability 18/32

Page 60: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

MCD: Method of Complete Description

KBO Orientability 19/32

Page 61: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

MCD

Dick, Kalmus and Martin, 1990

(a1, . . . , an)κ = (~ei | ai > 0) ++(aj~ei − ai~ej | ai < 0, aj > 0)

for m× n matrix A and 0 6 i 6 m

SAi =

{En if i = 0SAi−1(~aiS

Ai−1)

κ otherwise

sum of all column vectors of SAm is denoted by ~sA

Theorem

~sA is principal solution of A

KBO Orientability 20/32

Page 62: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

MCD

Dick, Kalmus and Martin, 1990

(a1, . . . , an)κ = (~ei | ai > 0) ++(aj~ei − ai~ej | ai < 0, aj > 0)

for m× n matrix A and 0 6 i 6 m

SAi =

{En if i = 0SAi−1(~aiS

Ai−1)

κ otherwise

sum of all column vectors of SAm is denoted by ~sA

Theorem

~sA is principal solution of A

KBO Orientability 20/32

Page 63: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

MCD

Dick, Kalmus and Martin, 1990

(a1, . . . , an)κ = (~ei | ai > 0) ++(aj~ei − ai~ej | ai < 0, aj > 0)

for m× n matrix A and 0 6 i 6 m

SAi =

{En if i = 0SAi−1(~aiS

Ai−1)

κ otherwise

sum of all column vectors of SAm is denoted by ~sA

Theorem

~sA is principal solution of A

KBO Orientability 20/32

Page 64: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

MCD

Dick, Kalmus and Martin, 1990

(a1, . . . , an)κ = (~ei | ai > 0) ++(aj~ei − ai~ej | ai < 0, aj > 0)

for m× n matrix A and 0 6 i 6 m

SAi =

{En if i = 0SAi−1(~aiS

Ai−1)

κ otherwise

sum of all column vectors of SAm is denoted by ~sA

Theorem

~sA is principal solution of A

KBO Orientability 20/32

Page 65: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example

I ={

2 · w(a)− 3 · w(b) > 0−3 · w(a) + 5 · w(b) > 0

}AI =

(2 −3−3 5

)

performing MCD

SAI0 =

(1 00 1

)SAI

1 = SAI0 ((2 − 3)SAI

0 )κ =(

1 30 2

)SAI

2 = SAI1 ((−3 5)SAI

1 )κ =(

3 102 6

)we obtain principal solution

~sAI =(

32

)+(

106

)=(

138

)which satisfies I. hence I is solvable

KBO Orientability 21/32

Page 66: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example

I ={

2 · w(a)− 3 · w(b) > 0−3 · w(a) + 5 · w(b) > 0

}AI =

(2 −3−3 5

)performing MCD

SAI0 =

(1 00 1

)SAI

1 = SAI0 ((2 − 3)SAI

0 )κ =(

1 30 2

)SAI

2 = SAI1 ((−3 5)SAI

1 )κ =(

3 102 6

)we obtain principal solution

~sAI =(

32

)+(

106

)=(

138

)which satisfies I. hence I is solvable

KBO Orientability 21/32

Page 67: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example

I ={

2 · w(a)− 3 · w(b) > 0−3 · w(a) + 5 · w(b) > 0

}AI =

(2 −3−3 5

)performing MCD

SAI0 =

(1 00 1

)SAI

1 = SAI0 ((2 − 3)SAI

0 )κ =(

1 30 2

)SAI

2 = SAI1 ((−3 5)SAI

1 )κ =(

3 102 6

)

we obtain principal solution

~sAI =(

32

)+(

106

)=(

138

)which satisfies I. hence I is solvable

KBO Orientability 21/32

Page 68: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example

I ={

2 · w(a)− 3 · w(b) > 0−3 · w(a) + 5 · w(b) > 0

}AI =

(2 −3−3 5

)performing MCD

SAI0 =

(1 00 1

)SAI

1 = SAI0 ((2 − 3)SAI

0 )κ =(

1 30 2

)SAI

2 = SAI1 ((−3 5)SAI

1 )κ =(

3 102 6

)we obtain principal solution

~sAI =(

32

)+(

106

)=(

138

)

which satisfies I. hence I is solvable

KBO Orientability 21/32

Page 69: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Example

I ={

2 · w(a)− 3 · w(b) > 0−3 · w(a) + 5 · w(b) > 0

}AI =

(2 −3−3 5

)performing MCD

SAI0 =

(1 00 1

)SAI

1 = SAI0 ((2 − 3)SAI

0 )κ =(

1 30 2

)SAI

2 = SAI1 ((−3 5)SAI

1 )κ =(

3 102 6

)we obtain principal solution

~sAI =(

32

)+(

106

)=(

138

)which satisfies I. hence I is solvableKBO Orientability 21/32

Page 70: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Bound by Norm

KBO Orientability 22/32

Page 71: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

MCD

(a1, . . . , an)κ = (~ei | ai > 0) ++(aj~ei − ai~ej | ai < 0, aj > 0)

for m× n matrix A and 0 6 i 6 m

SAi =

{En if i = 0SAi−1(~aiS

Ai−1)

κ otherwise

sum of all column vectors of SAm is denoted by ~sA

GOAL

bound ~sA ∈ {0, 1, . . . , B}n

APPROACH

define norm ‖ · ‖ to calculate ‖~sAI‖ with B = ‖~sAI‖

KBO Orientability 23/32

Page 72: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

MCD

(a1, . . . , an)κ = (~ei | ai > 0) ++(aj~ei − ai~ej | ai < 0, aj > 0)

for m× n matrix A and 0 6 i 6 m

SAi =

{En if i = 0SAi−1(~aiS

Ai−1)

κ otherwise

sum of all column vectors of SAm is denoted by ~sA

GOAL

bound ~sA ∈ {0, 1, . . . , B}n

APPROACH

define norm ‖ · ‖ to calculate ‖~sAI‖ with B = ‖~sAI‖

KBO Orientability 23/32

Page 73: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

MCD

(a1, . . . , an)κ = (~ei | ai > 0) ++(aj~ei − ai~ej | ai < 0, aj > 0)

for m× n matrix A and 0 6 i 6 m

SAi =

{En if i = 0SAi−1(~aiS

Ai−1)

κ otherwise

sum of all column vectors of SAm is denoted by ~sA

GOAL

bound ~sA ∈ {0, 1, . . . , B}n

APPROACH

define norm ‖ · ‖ to calculate ‖~sAI‖ with B = ‖~sAI‖

KBO Orientability 23/32

Page 74: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Norm

Definition

‖A‖ = maxi,j |aij | for m× n matrix A = (aij)ij

Lemma

for every m× n matrix A and n× p matrix B

‖aκ‖ = ‖a‖‖AB‖ 6 n‖A‖‖B‖(a1, . . . , an)κ is n× k matrix with k 6 n2.

SAi is m× k matrix with k 6 n2i

.

‖SAi ‖ 6 (2m‖A‖)2i−1

‖~sA‖ 6 n2m · (2m‖A‖)2m−1

KBO Orientability 24/32

Page 75: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Norm

Definition

‖A‖ = maxi,j |aij | for m× n matrix A = (aij)ij

Lemma

for every m× n matrix A and n× p matrix B

‖aκ‖ = ‖a‖

‖AB‖ 6 n‖A‖‖B‖(a1, . . . , an)κ is n× k matrix with k 6 n2.

SAi is m× k matrix with k 6 n2i

.

‖SAi ‖ 6 (2m‖A‖)2i−1

‖~sA‖ 6 n2m · (2m‖A‖)2m−1

KBO Orientability 24/32

Page 76: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Norm

Definition

‖A‖ = maxi,j |aij | for m× n matrix A = (aij)ij

Lemma

for every m× n matrix A and n× p matrix B

‖aκ‖ = ‖a‖‖AB‖ 6 n‖A‖‖B‖

(a1, . . . , an)κ is n× k matrix with k 6 n2.

SAi is m× k matrix with k 6 n2i

.

‖SAi ‖ 6 (2m‖A‖)2i−1

‖~sA‖ 6 n2m · (2m‖A‖)2m−1

KBO Orientability 24/32

Page 77: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Norm

Definition

‖A‖ = maxi,j |aij | for m× n matrix A = (aij)ij

Lemma

for every m× n matrix A and n× p matrix B

‖aκ‖ = ‖a‖‖AB‖ 6 n‖A‖‖B‖(a1, . . . , an)κ is n× k matrix with k 6 n2.

SAi is m× k matrix with k 6 n2i

.

‖SAi ‖ 6 (2m‖A‖)2i−1

‖~sA‖ 6 n2m · (2m‖A‖)2m−1

KBO Orientability 24/32

Page 78: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Norm

Definition

‖A‖ = maxi,j |aij | for m× n matrix A = (aij)ij

Lemma

for every m× n matrix A and n× p matrix B

‖aκ‖ = ‖a‖‖AB‖ 6 n‖A‖‖B‖(a1, . . . , an)κ is n× k matrix with k 6 n2.

SAi is m× k matrix with k 6 n2i

.

‖SAi ‖ 6 (2m‖A‖)2i−1

‖~sA‖ 6 n2m · (2m‖A‖)2m−1

KBO Orientability 24/32

Page 79: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Lemma

let R be TRS of size NI be set of inequalities induced by KBO with fixed precedenceAI be of size m× n

m 6 N

n 6 N

‖AI‖ 6 N

therefore‖~sAI‖ 6 N4N+1

:= B

thus,~sAI ∈ {0, 1, . . . , B}n

KBO Orientability 25/32

Page 80: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Main Result

Theorem

R is KBON terminating ⇐⇒ R is KBO{0,1,...,B} terminating

where, B = N4N+1

Corollary

Zankl and Middeldorp’s SAT and PBC encodings are complete for this B

KBO Orientability 26/32

Page 81: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Main Result

Theorem

R is KBON terminating ⇐⇒ R is KBO{0,1,...,B} terminating

where, B = N4N+1

Corollary

Zankl and Middeldorp’s SAT and PBC encodings are complete for this B

KBO Orientability 26/32

Page 82: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Summary

let R be TRS, N =∑l→r∈R(|l|+ |r|) + 1, and B = N4N+1

R is KBOR>0 terminating

⇐⇒ R is KBON terminating Korovin and Voronkov

⇐⇒ R is KBO{0,1,...,B} terminating this talk

theoretical interest of decidability issue is more or less closed

how about automation? +

KBO Orientability 27/32

Page 83: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Summary

let R be TRS, N =∑l→r∈R(|l|+ |r|) + 1, and B = N4N+1

R is KBOR>0 terminating

⇐⇒ R is KBON terminating Korovin and Voronkov

⇐⇒ R is KBO{0,1,...,B} terminating this talk

theoretical interest of decidability issue is more or less closed

how about automation? +

KBO Orientability 27/32

Page 84: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Summary

let R be TRS, N =∑l→r∈R(|l|+ |r|) + 1, and B = N4N+1

R is KBOR>0 terminating

⇐⇒ R is KBON terminating Korovin and Voronkov

⇐⇒ R is KBO{0,1,...,B} terminating this talk

theoretical interest of decidability issue is more or less closed

how about automation? +

KBO Orientability 27/32

Page 85: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Automation

KBO Orientability 28/32

Page 86: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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/Khachiyan algorithm

Theorem Zankl and Middeldorp, 2007

KBO{0,1,...,B} termination (B ∈ N) is decidable via SAT/PBC encodings

Theorem

KBOR>0 termination is decidable via SMT (linear arithmetic) encoding

KBO Orientability 29/32

Page 87: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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/Khachiyan algorithm

Theorem Zankl and Middeldorp, 2007

KBO{0,1,...,B} termination (B ∈ N) is decidable via SAT/PBC encodings

Theorem

KBOR>0 termination is decidable via SMT (linear arithmetic) encoding

KBO Orientability 29/32

Page 88: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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/Khachiyan algorithm

Theorem Zankl and Middeldorp, 2007

KBO{0,1,...,B} termination (B ∈ N) is decidable via SAT/PBC encodings

Theorem

KBOR>0 termination is decidable via SMT (linear arithmetic) encoding

KBO Orientability 29/32

Page 89: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

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/Khachiyan algorithm

Theorem Zankl and Middeldorp, 2007

KBO{0,1,...,B} termination (B ∈ N) is decidable via SAT/PBC encodings

Theorem

KBOR>0 termination is decidable via SMT (linear arithmetic) encoding

KBO Orientability 29/32

Page 90: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Experiments

test-bed: 1381 TRSs from 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

KBO Orientability 30/32

Page 91: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Experiments

test-bed: 1381 TRSs from 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

KBO Orientability 30/32

Page 92: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Experiments

test-bed: 1381 TRSs from 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

KBO Orientability 30/32

Page 93: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Experiments

test-bed: 1381 TRSs from 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

KBO Orientability 30/32

Page 94: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Experiments

test-bed: 1381 TRSs from 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

KBO Orientability 30/32

Page 95: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Experiments

test-bed: 1381 TRSs from 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

KBO Orientability 30/32

Page 96: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Experiments

test-bed: 1381 TRSs from 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

KBO Orientability 30/32

Page 97: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Experiments

test-bed: 1381 TRSs from 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

KBO Orientability 30/32

Page 98: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Experiments

test-bed: 1381 TRSs from 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

KBO Orientability 30/32

Page 99: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Experiments

test-bed: 1381 TRSs from 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

KBO Orientability 30/32

Page 100: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Conclusion

let R be TRS, N =∑l→r∈R(|l|+ |r|) + 1, and B = N4N+1

R is KBOR>0 terminating

⇐⇒ R is KBON terminating Korovin and Voronkov

⇐⇒ R is KBO{0,1,...,B} terminating this talk

CONCLUSION

finite characterization of KBO orientability

use SMT solver to automate

FUTURE WORK

find optimal B

KBO Orientability 31/32

Page 101: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Conclusion

let R be TRS, N =∑l→r∈R(|l|+ |r|) + 1, and B = N4N+1

R is KBOR>0 terminating

⇐⇒ R is KBON terminating Korovin and Voronkov

⇐⇒ R is KBO{0,1,...,B} terminating this talk

CONCLUSION

finite characterization of KBO orientability

use SMT solver to automate

FUTURE WORK

find optimal B

KBO Orientability 31/32

Page 102: KBO Orientability - Kyoto Usinya/gti/slides/11...KBO Orientability Harald Zankl zNao Hirokaway Aart Middeldorp y Japan Advanced Institute of Science and Technology z University of

Thank You for Your Attention

KBO Orientability 32/32