KBO Orientability Harald Zankl Nao Hirokawa Aart Middeldorp - - PowerPoint PPT Presentation

kbo orientability
SMART_READER_LITE
LIVE PREVIEW

KBO Orientability Harald Zankl Nao Hirokawa Aart Middeldorp - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1

KBO Orientability

Harald Zankl‡ Nao Hirokawa† Aart Middeldorp‡

† Japan Advanced Institute of Science and Technology ‡ University of Innsbruck

KBO Orientability 1/32

slide-2
SLIDE 2

Reference

JAR 2009

Harald Zankl, Nao Hirokawa, and Aart Middeldorp KBO Orientability Journal of Automated Reasoning 43(2), pp. 173-201, 2009

KBO Orientability 2/32

slide-3
SLIDE 3

Term Rewriting

Definition

pair of terms l → r is rewrite rule if l ∈ 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σ]

KBO Orientability 3/32

slide-4
SLIDE 4

Term Rewriting

Definition

pair of terms l → r is rewrite rule if l ∈ 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 R

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

KBO Orientability 3/32

slide-5
SLIDE 5

Term Rewriting

Definition

pair of terms l → r is rewrite rule if l ∈ 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 R

x + 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

slide-6
SLIDE 6

Termination

Definition

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

KBO Orientability 4/32

slide-7
SLIDE 7

Termination

Definition

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

QUESTION

how to prove termination?

KBO Orientability 4/32

slide-8
SLIDE 8

Termination

Definition

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

QUESTION

how to prove termination? ☞ Knuth-Bendix order (KBO)

KBO Orientability 4/32

slide-9
SLIDE 9

Termination

Definition

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

QUESTION

how to prove termination? ☞ Knuth-Bendix order (KBO) introduced by Knuth and Bendix, 1970

KBO Orientability 4/32

slide-10
SLIDE 10

Termination

Definition

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

QUESTION

how to prove termination? ☞ Knuth-Bendix order (KBO) introduced by Knuth and Bendix, 1970 best studied termination methods

KBO Orientability 4/32

slide-11
SLIDE 11

Termination

Definition

TRS R is terminating if there is no infinite rewrite sequence t1 →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

slide-12
SLIDE 12

Knuth-Bendix Orders

Definition

precedence > is proper order on function symbols F

KBO Orientability 5/32

slide-13
SLIDE 13

Knuth-Bendix Orders

Definition

precedence > is proper order on function symbols F weight function (w, w0) is pair in R0

F × R0

KBO Orientability 5/32

slide-14
SLIDE 14

Knuth-Bendix Orders

Definition

precedence > is proper order on function symbols F weight function (w, w0) is pair in R0

F × R0

weight of term t is w(t) =

  • w0

if t ∈ V w(f) + w(t1) + · · · + w(tn) if t = f(t1, . . . , tn)

KBO Orientability 5/32

slide-15
SLIDE 15

Knuth-Bendix Orders

Definition

precedence > is proper order on function symbols F weight function (w, w0) is pair in R0

F × R0

weight of term t is w(t) =

  • w0

if t ∈ V w(f) + w(t1) + · · · + w(tn) if t = f(t1, . . . , tn) weight function (w, w0) is admissible for precedence > if w(f) > 0

  • r

f g for all unary functions f and all functions g

KBO Orientability 5/32

slide-16
SLIDE 16

Definition

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

KBO Orientability 6/32

slide-17
SLIDE 17

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

KBO Orientability 6/32

slide-18
SLIDE 18

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

KBO Orientability 6/32

slide-19
SLIDE 19

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 = f n(t) and t ∈ V for some unary f and n 1; or

KBO Orientability 6/32

slide-20
SLIDE 20

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 = f n(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), and si >kbo ti; or

KBO Orientability 6/32

slide-21
SLIDE 21

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 = f n(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), and si >kbo ti; or s = f(s1, . . . , sn), t = g(t1, . . . , tm), and f > g

KBO Orientability 6/32

slide-22
SLIDE 22

Definition

let X ⊆ R0. TRS R is KBOX terminating if ∃ precedence > ∃ admissible weight function (w, w0) ∈ XF × X such that l >kbo r for all l → r ∈ R

KBO Orientability 7/32

slide-23
SLIDE 23

Definition

let X ⊆ R0. TRS R is KBOX terminating if ∃ precedence > ∃ admissible weight function (w, w0) ∈ XF × X such 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

slide-24
SLIDE 24

Quiz

KBO Orientability 8/32

slide-25
SLIDE 25

Example I

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

KBO Orientability 9/32

slide-26
SLIDE 26

Example I

a(a(x)) → b(b(b(x))) b(b(b(b(b(x))))) → a(a(a(x))) is KBON terminating ?

KBO Orientability 9/32

slide-27
SLIDE 27

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) = ? w(b) = ? w0 = 1

KBO Orientability 9/32

slide-28
SLIDE 28

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

KBO Orientability 9/32

slide-29
SLIDE 29

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) = ? w(b) = ? w0 = 1

KBO Orientability 9/32

slide-30
SLIDE 30

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

slide-31
SLIDE 31

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 ?

KBO Orientability 10/32

slide-32
SLIDE 32

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

slide-33
SLIDE 33

History of KBO

KBO Orientability 11/32

slide-34
SLIDE 34

Theorem Knuth and Bendix, 1970

TRS is terminating if it is KBON terminating

KBO Orientability 12/32

slide-35
SLIDE 35

Theorem Knuth and Bendix, 1970

TRS is terminating if it is KBON terminating

Theorem Dershowitz, 1979

TRS is terminating if it is KBOR0 terminating

KBO Orientability 12/32

slide-36
SLIDE 36

Theorem Knuth and Bendix, 1970

TRS is terminating if it is KBON terminating

Theorem Dershowitz, 1979

TRS is terminating if it is KBOR0 terminating

Theorem Dick, Kalmus, and Martin, 1990

KBOR0 termination is decidable within exponential time

KBO Orientability 12/32

slide-37
SLIDE 37

Theorem Knuth and Bendix, 1970

TRS is terminating if it is KBON terminating

Theorem Dershowitz, 1979

TRS is terminating if it is KBOR0 terminating

Theorem Dick, Kalmus, and Martin, 1990

KBOR0 termination is decidable within exponential time

Theorem Korovin and Voronkov, 2001, 2003

TRS is KBON terminating ⇐ ⇒ it is KBOR0 terminating KBOR0 termination is decidable within polynomial time

KBO Orientability 12/32

slide-38
SLIDE 38

Theorem Knuth and Bendix, 1970

TRS is terminating if it is KBON terminating

Theorem Dershowitz, 1979

TRS is terminating if it is KBOR0 terminating

Theorem Dick, Kalmus, and Martin, 1990

KBOR0 termination is decidable within exponential time

Theorem Korovin and Voronkov, 2001, 2003

TRS is KBON terminating ⇐ ⇒ it is KBOR0 terminating KBOR0 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

slide-39
SLIDE 39

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 = N 4N+1

KBO Orientability 13/32

slide-40
SLIDE 40

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 = N 4N+1

OVERVIEW OF PROOF

Principal Solutions

KBO Orientability 13/32

slide-41
SLIDE 41

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 = N 4N+1

OVERVIEW OF PROOF

Principal Solutions MCD

KBO Orientability 13/32

slide-42
SLIDE 42

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 = N 4N+1

OVERVIEW OF PROOF

Principal Solutions MCD Bound by Norm

KBO Orientability 13/32

slide-43
SLIDE 43

Principal Solutions

KBO Orientability 14/32

slide-44
SLIDE 44

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)))

KBO Orientability 15/32

slide-45
SLIDE 45

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

KBO Orientability 15/32

slide-46
SLIDE 46

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

slide-47
SLIDE 47

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

KBO Orientability 16/32

slide-48
SLIDE 48

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

KBO Orientability 16/32

slide-49
SLIDE 49

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

KBO Orientability 16/32

slide-50
SLIDE 50

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

KBO Orientability 16/32

slide-51
SLIDE 51

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

slide-52
SLIDE 52

I =

  • 2 · w(a) − 3 · w(b)

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

  • AI =
  • 2

−3 −3 5

  • KBO Orientability

17/32

slide-53
SLIDE 53

I =

  • 2 · w(a) − 3 · w(b)

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

  • AI =
  • 2

−3 −3 5

  • since

AI 3 2

  • =

1

  • AI

13 8

  • =

2 1

  • 3

2

  • is not principal solution of AI

KBO Orientability 17/32

slide-54
SLIDE 54

I =

  • 2 · w(a) − 3 · w(b)

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

  • AI =
  • 2

−3 −3 5

  • since

AI 3 2

  • =

1

  • AI

13 8

  • =

2 1

  • 3

2

  • is not principal solution of AI
  • 13

8

  • is principal solution of AI and satisfies I

hence I is solvable

KBO Orientability 17/32

slide-55
SLIDE 55

Example

I =    2 · w(a) − 3 · w(b) > −3 · w(a) + 5 · w(b) > −4 · w(a) + 3 · w(b)

  AI =   2 −3 −3 5 −4 3  

KBO Orientability 18/32

slide-56
SLIDE 56

Example

I =    2 · w(a) − 3 · w(b) > −3 · w(a) + 5 · w(b) > −4 · w(a) + 3 · w(b)

  AI =   2 −3 −3 5 −4 3   principal solution of AI is

  • and does not satisfy I

KBO Orientability 18/32

slide-57
SLIDE 57

Example

I =    2 · w(a) − 3 · w(b) > −3 · w(a) + 5 · w(b) > −4 · w(a) + 3 · w(b)

  AI =   2 −3 −3 5 −4 3   principal solution of AI is

  • and does not satisfy I

hence I is not solvable

KBO Orientability 18/32

slide-58
SLIDE 58

Example

I =    2 · w(a) − 3 · w(b) > −3 · w(a) + 5 · w(b) > −4 · w(a) + 3 · w(b)

  AI =   2 −3 −3 5 −4 3   principal solution of AI is

  • and does not satisfy I

hence I is not solvable

QUESTION

how to find principal solution?

KBO Orientability 18/32

slide-59
SLIDE 59

Example

I =    2 · w(a) − 3 · w(b) > −3 · w(a) + 5 · w(b) > −4 · w(a) + 3 · w(b)

  AI =   2 −3 −3 5 −4 3   principal solution of AI is

  • and does not satisfy I

hence I is not solvable

QUESTION

how to find principal solution? ☞ MCD

KBO Orientability 18/32

slide-60
SLIDE 60

MCD: Method of Complete Description

KBO Orientability 19/32

slide-61
SLIDE 61

MCD

Dick, Kalmus and Martin, 1990

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

KBO Orientability 20/32

slide-62
SLIDE 62

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 i m SA

i =

  • En

if i = 0 SA

i−1(

aiSA

i−1)κ

  • therwise

KBO Orientability 20/32

slide-63
SLIDE 63

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 i m SA

i =

  • En

if i = 0 SA

i−1(

aiSA

i−1)κ

  • therwise

sum of all column vectors of SA

m is denoted by

sA

KBO Orientability 20/32

slide-64
SLIDE 64

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 i m SA

i =

  • En

if i = 0 SA

i−1(

aiSA

i−1)κ

  • therwise

sum of all column vectors of SA

m is denoted by

sA

Theorem

  • sA is principal solution of A

KBO Orientability 20/32

slide-65
SLIDE 65

Example

I =

  • 2 · w(a) − 3 · w(b)

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

  • AI =

2 −3 −3 5

  • KBO Orientability

21/32

slide-66
SLIDE 66

Example

I =

  • 2 · w(a) − 3 · w(b)

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

  • AI =

2 −3 −3 5

  • performing MCD

KBO Orientability 21/32

slide-67
SLIDE 67

Example

I =

  • 2 · w(a) − 3 · w(b)

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

  • AI =

2 −3 −3 5

  • performing MCD

SAI =

  • 1

1

  • SAI

1

= SAI

0 ((2 − 3)SAI 0 )κ =

1 3 2

  • SAI

2

= SAI

1 ((−3 5)SAI 1 )κ =

3 10 2 6

  • KBO Orientability

21/32

slide-68
SLIDE 68

Example

I =

  • 2 · w(a) − 3 · w(b)

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

  • AI =

2 −3 −3 5

  • performing MCD

SAI =

  • 1

1

  • SAI

1

= SAI

0 ((2 − 3)SAI 0 )κ =

1 3 2

  • SAI

2

= SAI

1 ((−3 5)SAI 1 )κ =

3 10 2 6

  • we obtain principal solution
  • sAI =
  • 3

2

  • +
  • 10

6

  • =
  • 13

8

  • KBO Orientability

21/32

slide-69
SLIDE 69

Example

I =

  • 2 · w(a) − 3 · w(b)

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

  • AI =

2 −3 −3 5

  • performing MCD

SAI =

  • 1

1

  • SAI

1

= SAI

0 ((2 − 3)SAI 0 )κ =

1 3 2

  • SAI

2

= SAI

1 ((−3 5)SAI 1 )κ =

3 10 2 6

  • we obtain principal solution
  • sAI =
  • 3

2

  • +
  • 10

6

  • =
  • 13

8

  • which satisfies I. hence I is solvable

KBO Orientability 21/32

slide-70
SLIDE 70

Bound by Norm

KBO Orientability 22/32

slide-71
SLIDE 71

MCD

(a1, . . . , an)κ = ( ei | ai 0) + +(aj ei − ai ej | ai < 0, aj > 0) for m × n matrix A and 0 i m SA

i =

  • En

if i = 0 SA

i−1(

aiSA

i−1)κ

  • therwise

sum of all column vectors of SA

m is denoted by

sA

KBO Orientability 23/32

slide-72
SLIDE 72

MCD

(a1, . . . , an)κ = ( ei | ai 0) + +(aj ei − ai ej | ai < 0, aj > 0) for m × n matrix A and 0 i m SA

i =

  • En

if i = 0 SA

i−1(

aiSA

i−1)κ

  • therwise

sum of all column vectors of SA

m is denoted by

sA

GOAL

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

KBO Orientability 23/32

slide-73
SLIDE 73

MCD

(a1, . . . , an)κ = ( ei | ai 0) + +(aj ei − ai ej | ai < 0, aj > 0) for m × n matrix A and 0 i m SA

i =

  • En

if i = 0 SA

i−1(

aiSA

i−1)κ

  • therwise

sum of all column vectors of SA

m is denoted by

sA

GOAL

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

APPROACH

define norm · to calculate sAI with B = sAI

KBO Orientability 23/32

slide-74
SLIDE 74

Norm

Definition

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

KBO Orientability 24/32

slide-75
SLIDE 75

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

KBO Orientability 24/32

slide-76
SLIDE 76

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 nAB

KBO Orientability 24/32

slide-77
SLIDE 77

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 nAB (a1, . . . , an)κ is n × k matrix with k n2. SA

i is m × k matrix with k n2i.

KBO Orientability 24/32

slide-78
SLIDE 78

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 nAB (a1, . . . , an)κ is n × k matrix with k n2. SA

i is m × k matrix with k n2i.

SA

i (2mA)2i−1

  • sA n2m · (2mA)2m−1

KBO Orientability 24/32

slide-79
SLIDE 79

Lemma

let R be TRS of size N I be set of inequalities induced by KBO with fixed precedence AI be of size m × n m N n N AI N therefore

  • sAI N 4N+1 := B

thus,

  • sAI ∈ {0, 1, . . . , B}n

KBO Orientability 25/32

slide-80
SLIDE 80

Main Result

Theorem

R is KBON terminating ⇐ ⇒ R is KBO{0,1,...,B} terminating where, B = N 4N+1

KBO Orientability 26/32

slide-81
SLIDE 81

Main Result

Theorem

R is KBON terminating ⇐ ⇒ R is KBO{0,1,...,B} terminating where, B = N 4N+1

Corollary

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

KBO Orientability 26/32

slide-82
SLIDE 82

Summary

let R be TRS, N =

l→r∈R(|l| + |r|) + 1, and B = N 4N+1

R is KBOR0 terminating ⇐ ⇒ R is KBON terminating

Korovin and Voronkov

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

this talk

KBO Orientability 27/32

slide-83
SLIDE 83

Summary

let R be TRS, N =

l→r∈R(|l| + |r|) + 1, and B = N 4N+1

R is KBOR0 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

KBO Orientability 27/32

slide-84
SLIDE 84

Summary

let R be TRS, N =

l→r∈R(|l| + |r|) + 1, and B = N 4N+1

R is KBOR0 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

slide-85
SLIDE 85

Automation

KBO Orientability 28/32

slide-86
SLIDE 86

Theorem Dick, Kalmus, and Martin, 1990

KBOR0 termination is decidable by MCD

KBO Orientability 29/32

slide-87
SLIDE 87

Theorem Dick, Kalmus, and Martin, 1990

KBOR0 termination is decidable by MCD

Theorem Korovin and Voronkov, 2001, 2003

KBOR0 termination is decidable by Karmarkar/Khachiyan algorithm

KBO Orientability 29/32

slide-88
SLIDE 88

Theorem Dick, Kalmus, and Martin, 1990

KBOR0 termination is decidable by MCD

Theorem Korovin and Voronkov, 2001, 2003

KBOR0 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

KBO Orientability 29/32

slide-89
SLIDE 89

Theorem Dick, Kalmus, and Martin, 1990

KBOR0 termination is decidable by MCD

Theorem Korovin and Voronkov, 2001, 2003

KBOR0 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

KBOR0 termination is decidable via SMT (linear arithmetic) encoding

KBO Orientability 29/32

slide-90
SLIDE 90

Experiments

test-bed: 1381 TRSs from Termination Problem Data Base 4.0

KBO Orientability 30/32

slide-91
SLIDE 91

Experiments

test-bed: 1381 TRSs from Termination Problem Data Base 4.0 PC: 8 dual-core AMD Opteron 885, 2.6 GHz, 64 GB

KBO Orientability 30/32

slide-92
SLIDE 92

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

KBO Orientability 30/32

slide-93
SLIDE 93

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

KBO Orientability 30/32

slide-94
SLIDE 94

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

KBO Orientability 30/32

slide-95
SLIDE 95

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

KBO Orientability 30/32

slide-96
SLIDE 96

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

KBO Orientability 30/32

slide-97
SLIDE 97

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

KBO Orientability 30/32

slide-98
SLIDE 98

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

KBO Orientability 30/32

slide-99
SLIDE 99

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

KBO Orientability 30/32

slide-100
SLIDE 100

Conclusion

let R be TRS, N =

l→r∈R(|l| + |r|) + 1, and B = N 4N+1

R is KBOR0 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

KBO Orientability 31/32

slide-101
SLIDE 101

Conclusion

let R be TRS, N =

l→r∈R(|l| + |r|) + 1, and B = N 4N+1

R is KBOR0 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

slide-102
SLIDE 102

Thank You for Your Attention

KBO Orientability 32/32