O mputational gic L The Polynomial Path Order and the Rules of - - PowerPoint PPT Presentation

o
SMART_READER_LITE
LIVE PREVIEW

O mputational gic L The Polynomial Path Order and the Rules of - - PowerPoint PPT Presentation

C O mputational gic L The Polynomial Path Order and the Rules of Predicative Recursion with Parameter Substitution Martin Avanzini and Georg Moser Computational Logic Faculty of Computer Science, University of Innsbruck WST 09


slide-1
SLIDE 1

O

L C

mputational

gic

The Polynomial Path Order and the Rules of Predicative Recursion with Parameter Substitution

Martin Avanzini and Georg Moser

Computational Logic Faculty of Computer Science, University of Innsbruck

WST ’09

slide-2
SLIDE 2

Automatic Complexity Analysis

Automatic Complexity Analysis

Goal

◮ purely automatic complexity analysis

Approach

◮ employ term rewriting as model of computation ◮ translate termination proofs into complexity certificates

MA (ICS @ UIBK) POP∗

ps

2/16

slide-3
SLIDE 3

Automatic Complexity Analysis

Automatic Complexity Analysis

Goal

◮ purely automatic complexity analysis

Approach

◮ employ term rewriting as model of computation ◮ translate termination proofs into complexity certificates ◮ to detect feasible computation, restrictions on termination

technique usually inevitable

MA (ICS @ UIBK) POP∗

ps

2/16

slide-4
SLIDE 4

Automatic Complexity Analysis

Outline

  • 2. Complexity Analysis and Polynomial Path Orders
  • M. Avanzini and G. Moser

Complexity Analysis by Rewriting In Proc. of FLOPS’08, LNCS vol. 4989, pp. 130–146, 2008

MA (ICS @ UIBK) POP∗

ps

3/16

slide-5
SLIDE 5

Automatic Complexity Analysis

Outline

  • 1. Predicative Recursion
  • S. Bellantoni and S. Cook

A new Recursion-Theoretic Characterization of the Polytime Functions Computation and Complexity, 2(2), pp. 97–110, 1992

  • 2. Complexity Analysis and Polynomial Path Orders
  • M. Avanzini and G. Moser

Complexity Analysis by Rewriting In Proc. of FLOPS’08, LNCS vol. 4989, pp. 130–146, 2008

MA (ICS @ UIBK) POP∗

ps

3/16

slide-6
SLIDE 6

Automatic Complexity Analysis

Outline

  • 1. Predicative Recursion
  • S. Bellantoni and S. Cook

A new Recursion-Theoretic Characterization of the Polytime Functions Computation and Complexity, 2(2), pp. 97–110, 1992

  • 2. Complexity Analysis and Polynomial Path Orders
  • M. Avanzini and G. Moser

Complexity Analysis by Rewriting In Proc. of FLOPS’08, LNCS vol. 4989, pp. 130–146, 2008

  • 3. POP∗ and Parameter Substitution
  • M. Avanzini and G. Moser

The Polynomial Path Order and the Rules of Predicative Recursion with Parameter Substitution In Proc. of WST’09

MA (ICS @ UIBK) POP∗

ps

3/16

slide-7
SLIDE 7

Automatic Complexity Analysis

The Primitive Recursive Functions

◮ initial functions 0, s, Πk i ◮ composition

f ( x) = g(h1( x), . . . , hm( x))

◮ primitive recursion

f (z + 1, x) = g( x) f (z + 1, x) = h(z, x, f (z, x))

MA (ICS @ UIBK) POP∗

ps

4/16

slide-8
SLIDE 8

Automatic Complexity Analysis

The Primitive Recursive Functions

◮ initial functions ε, s0, s1, Πk i ◮ composition

f ( x) = g(h1( x), . . . , hm( x))

◮ primitive recursion on notation

f (ε, x) = g( x) f (z·i, x) = hi(z, x, f (z, x)), i ∈ {0, 1}

MA (ICS @ UIBK) POP∗

ps

4/16

slide-9
SLIDE 9

Automatic Complexity Analysis

The Primitive Recursive Functions

◮ initial functions ε, s0, s1, Πk i ◮ composition

f ( x) = g(h1( x), . . . , hm( x))

◮ primitive recursion on notation

f (ε, x) = g( x) f (z·i, x) = hi(z, x, f (z, x)), i ∈ {0, 1} dup(ε) = ε exp(ε) = s1(ε) dup(x·i) = si(si(dup(x)) exp(x·i) = dup(exp(x))

MA (ICS @ UIBK) POP∗

ps

4/16

slide-10
SLIDE 10

Automatic Complexity Analysis

Bellantoni and Cook’s Definition of BC

◮ initial functions ε, s0, s1, Πk i , . . . ◮ composition

f ( x) = g(h1( x), . . . , hm( x))

◮ predicative recursion on notation

f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1}

f (x1, . . . , xm

  • normal

; y1, . . . , yn

  • safe

)

MA (ICS @ UIBK) POP∗

ps

5/16

slide-11
SLIDE 11

Automatic Complexity Analysis

Bellantoni and Cook’s Definition of BC

◮ initial functions ε, s0, s1, Πk i , . . . ◮ predicative composition

f ( x; y) = g(n1( x; ), . . . , nj( x; ); s1( x; y), . . . , sk( x; y))

◮ predicative recursion on notation

f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1}

f (x1, . . . , xm

  • normal

; y1, . . . , yn

  • safe

)

MA (ICS @ UIBK) POP∗

ps

5/16

slide-12
SLIDE 12

Automatic Complexity Analysis

Bellantoni and Cook’s Definition of BC

◮ initial functions ε, s0, s1, Πk i , . . . ◮ predicative composition

f ( x; y) = g(n1( x; ), . . . , nj( x; ); s1( x; y), . . . , sk( x; y))

◮ predicative recursion on notation

f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1}

Theorem

BC = FP

polytime computable functions

MA (ICS @ UIBK) POP∗

ps

5/16

slide-13
SLIDE 13

Automatic Complexity Analysis

Bellantoni and Cook’s Definition of BC

◮ initial functions ε, s0, s1, Πk i , . . . ◮ predicative composition

f ( x; y) = g(n1( x; ), . . . , nj( x; ); s1( x; y), . . . , sk( x; y))

◮ predicative recursion on notation

f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1} dup(ε) = ε exp(ε) = s1(ε) dup(x·i) = si(si(dup(x))) exp(x·i) = dup(exp(x))

MA (ICS @ UIBK) POP∗

ps

5/16

slide-14
SLIDE 14

Automatic Complexity Analysis

Bellantoni and Cook’s Definition of BC

◮ initial functions ε, s0, s1, Πk i , . . . ◮ predicative composition

f ( x; y) = g(n1( x; ), . . . , nj( x; ); s1( x; y), . . . , sk( x; y))

◮ predicative recursion on notation

f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1} dup(ε;) = ε exp(ε) = s1(;ε) dup(x·i;) = si(;si(;dup(x;))) exp(x·i) = dup(exp(x);)

MA (ICS @ UIBK) POP∗

ps

5/16

slide-15
SLIDE 15

Automatic Complexity Analysis

Bellantoni and Cook’s Definition of BC

◮ initial functions ε, s0, s1, Πk i , . . . ◮ predicative composition

f ( x; y) = g(n1( x; ), . . . , nj( x; ); s1( x; y), . . . , sk( x; y))

◮ predicative recursion on notation

f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1} dup(ε;) = ε exp(ε) = s1(;ε) dup(x·i;) = si(;si(;dup(x;))) exp(x·i) = dup(exp(x);)

MA (ICS @ UIBK) POP∗

ps

5/16

slide-16
SLIDE 16

Automatic Complexity Analysis by Rewriting

Automatic Complexity Analysis by Rewriting

dup(ε) = ε exp(ε) = s1(ε) dup(x·i) = si(si(dup(x))) exp(x·i) = dup(exp(x))

dup(ǫ) → ǫ exp(ǫ) → s1(ǫ) dup(si(x)) → si(si(dup(x))) exp(si(x)) → dup(exp(x))

MA (ICS @ UIBK) POP∗

ps

6/16

slide-17
SLIDE 17

Automatic Complexity Analysis by Rewriting

Automatic Complexity Analysis by Rewriting

dup(ε) = ε exp(ε) = s1(ε) dup(x·i) = si(si(dup(x))) exp(x·i) = dup(exp(x))

dup(ǫ) → ǫ exp(ǫ) → s1(ǫ) dup(si(x)) → si(si(dup(x))) exp(si(x)) → dup(exp(x)) f (w1, . . . , wn) = v ⇐ ⇒ f(w1, . . . , wn) − →!

R v

computation

MA (ICS @ UIBK) POP∗

ps

6/16

slide-18
SLIDE 18

Automatic Complexity Analysis by Rewriting

Runtime Complexity of TRSs

◮ derivation length

dl(t, →) = max{n | ∃s. t →n s} dl(n, T, →) = max{dl(t, →) | t ∈ T and |t| n}

MA (ICS @ UIBK) POP∗

ps

7/16

slide-19
SLIDE 19

Automatic Complexity Analysis by Rewriting

Runtime Complexity of TRSs

◮ derivation length

dl(t, →) = max{n | ∃s. t →n s} dl(n, T, →) = max{dl(t, →) | t ∈ T and |t| n}

◮ derivational complexity

dcR(n) = dl(n, T (F, V), − →R)

◮ runtime complexity

rcR (n) = dl(n, Tb, − →R) Tb := {f (c1, . . . , cn) | f ∈ D and ci ∈ T (C, V)}

MA (ICS @ UIBK) POP∗

ps

7/16

slide-20
SLIDE 20

Automatic Complexity Analysis by Rewriting

Runtime Complexity of TRSs

◮ derivation length

dl(t, →) = max{n | ∃s. t →n s} dl(n, T, →) = max{dl(t, →) | t ∈ T and |t| n}

◮ derivational complexity

dcR(n) = dl(n, T (F, V), − →R)

◮ innermost runtime complexity

rci

R (n) = dl(n, Tb, i

− →R) Tb := {f (c1, . . . , cn) | f ∈ D and ci ∈ T (C, V)}

MA (ICS @ UIBK) POP∗

ps

7/16

slide-21
SLIDE 21

Polynomial Path Orders

Polynomial Path Orders >pop∗

◮ >pop∗ ⊆ >mpo ◮ >pop∗ induced by precedence and safe mapping safe ◮ >pop∗ ≈ >mpo + predicative recursion

Theorem R ⊆ >pop∗ ⇒ rci

R polynomially bounded

for constructor TRS R

MA (ICS @ UIBK) POP∗

ps

8/16

slide-22
SLIDE 22

Polynomial Path Orders

Polynomial Path Orders >pop∗

◮ >pop∗ ⊆ >mpo ◮ >pop∗ induced by precedence and safe mapping safe ◮ >pop∗ ≈ >mpo + predicative recursion

Theorem R ⊆ >pop∗ ⇒ rci

R polynomially bounded

for constructor TRS R rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys)

MA (ICS @ UIBK) POP∗

ps

8/16

slide-23
SLIDE 23

Polynomial Path Orders

Polynomial Path Orders >pop∗

◮ >pop∗ ⊆ >mpo ◮ >pop∗ induced by precedence and safe mapping safe ◮ >pop∗ ≈ >mpo + predicative recursion

Theorem R ⊆ >pop∗ ⇒ rci

R polynomially bounded

for constructor TRS R rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys) revtl(x:xs; ys) >mpo revtl(xs; x:ys)

MA (ICS @ UIBK) POP∗

ps

8/16

slide-24
SLIDE 24

Polynomial Path Orders

Polynomial Path Orders >pop∗

◮ >pop∗ ⊆ >mpo ◮ >pop∗ induced by precedence and safe mapping safe ◮ >pop∗ ≈ >mpo + predicative recursion

Theorem R ⊆ >pop∗ ⇒ rci

R polynomially bounded

for constructor TRS R rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys) Rrev ⊆ >pop∗

MA (ICS @ UIBK) POP∗

ps

8/16

slide-25
SLIDE 25

Polynomial Path Orders

Predicative Recursion with Parameter Substitution

f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; y)), i ∈ {0, 1}

f (ε, x; y) = g( x; y) f (z·i, x; y) = hi(z, x; y, f (z, x; p(z, x; y))), i ∈ {0, 1} predicative recursion with parameter substitution

Theorem (Bellantoni,1993)

BC is closed under predicative recursion with parameter substitution scheme.

MA (ICS @ UIBK) POP∗

ps

9/16

slide-26
SLIDE 26

Polynomial Path Order and Parameter Substitution

Polynomial Path Order with Parameter Substitution >pps∗

s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if

  • 1. si ∼

>pps∗ t for some i ∈ {1, . . . , m}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g, f ∈ D

◮ s >pps tj for all j ∈ {1, . . . , p}, s >pps∗ tj for all j ∈ {p + 1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}

  • 3. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≈ g, f ∈ D

◮ {

{s1, . . . , so} } >mul

pps∗ {

{t1, . . . , tp} }

◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V) MA (ICS @ UIBK) POP∗

ps

10/16

slide-27
SLIDE 27

Polynomial Path Order and Parameter Substitution

RPOs POP∗

ps

s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if

  • 1. si ∼

>pps∗ t for some i ∈ {1, . . . , m}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g

◮ s >pps∗ tj for all j ∈ {1, . . . , n}

  • 3. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≈ g

◮ {

{s1, . . . , so} } >mul

pps∗ {

{t1, . . . , tp} }

◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj MA (ICS @ UIBK) POP∗

ps

10/16

slide-28
SLIDE 28

Polynomial Path Order and Parameter Substitution

RPOs POP∗

ps

s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if

  • 1. si ∼

>pps∗ t for some i ∈ {1, . . . , m}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g

◮ s >pps∗ tj for all j ∈ {1, . . . , n}

  • 3. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≈ g

◮ {

{s1, . . . , so} } >mul

pps∗ {

{t1, . . . , tp} }

◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj

f(s(;x); y) >pps∗ f(x; f(x; y))

MA (ICS @ UIBK) POP∗

ps

10/16

slide-29
SLIDE 29

Polynomial Path Order and Parameter Substitution

RPOs POP∗

ps

s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if

  • 1. si ∼

>pps∗ t for some i ∈ {1, . . . , m}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g

◮ s >pps∗ tj for all j ∈ {1, . . . , n}

  • 3. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≈ g

◮ {

{s1, . . . , so} } >mul

pps∗ {

{t1, . . . , tp} }

◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)

f(s(;x); y) >pps∗ f(x; f(x; y))

  • MA (ICS @ UIBK)

POP∗

ps

10/16

slide-30
SLIDE 30

Polynomial Path Order and Parameter Substitution

RPOs POP∗

ps

s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if

  • 1. si ∼

>pps∗ t for some i ∈ {1, . . . , m}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g

◮ s >pps∗ tj for all j ∈ {1, . . . , n}

  • 3. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≈ g

◮ {

{s1, . . . , so} } >mul

pps∗ {

{t1, . . . , tp} }

◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)

f(s(;x); y) >pps∗ g(f(x; y), f(x; y))

MA (ICS @ UIBK) POP∗

ps

10/16

slide-31
SLIDE 31

Polynomial Path Order and Parameter Substitution

RPOs POP∗

ps

s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if

  • 1. si ∼

>pps∗ t for some i ∈ {1, . . . , m}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g

◮ s >pps∗ tj for all j ∈ {1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}

  • 3. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≈ g

◮ {

{s1, . . . , so} } >mul

pps∗ {

{t1, . . . , tp} }

◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)

f(s(;x); y) >pps∗ g(f(x; y), f(x; y))

  • MA (ICS @ UIBK)

POP∗

ps

10/16

slide-32
SLIDE 32

Polynomial Path Order and Parameter Substitution

RPOs POP∗

ps

s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if

  • 1. si ∼

>pps∗ t for some i ∈ {1, . . . , m}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g

◮ s >pps∗ tj for all j ∈ {1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}

  • 3. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≈ g

◮ {

{s1, . . . , so} } >mul

pps∗ {

{t1, . . . , tp} }

◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)

f ( x; y) = g(n1( x; ), . . . , nj( x; ); s1( x; y), . . . , sk( x; y))

MA (ICS @ UIBK) POP∗

ps

10/16

slide-33
SLIDE 33

Polynomial Path Order and Parameter Substitution

RPOs POP∗

ps

s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if

  • 1. si ∼

>pps∗ t for some i ∈ {1, . . . , m}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g

◮ s >pps∗ tj for all j ∈ {1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}

  • 3. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≈ g

◮ {

{s1, . . . , so} } >mul

pps∗ {

{t1, . . . , tp} }

◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)

f ( x; y) >pps∗ g(n( x; y); s( x; y))

MA (ICS @ UIBK) POP∗

ps

10/16

slide-34
SLIDE 34

Polynomial Path Order and Parameter Substitution

Auxiliary Order >pps

s = f (s1, . . . , so; so+1, . . . , sm) >pps t if

  • 1. si ∼

>pps t for some i ∈ {1, . . . , m} and

◮ if f ∈ D then i ∈ {1, . . . , o}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g, f ∈ D

◮ s >pps tj for all j ∈ {1, . . . , n} MA (ICS @ UIBK) POP∗

ps

11/16

slide-35
SLIDE 35

Polynomial Path Order and Parameter Substitution

Auxiliary Order >pps

s = f (s1, . . . , so; so+1, . . . , sm) >pps t if

  • 1. si ∼

>pps t for some i ∈ {1, . . . , m} and

◮ if f ∈ D then i ∈ {1, . . . , o}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g, f ∈ D

◮ s >pps tj for all j ∈ {1, . . . , n}

f(x; y) >pps g(x; y)

MA (ICS @ UIBK) POP∗

ps

11/16

slide-36
SLIDE 36

Polynomial Path Order and Parameter Substitution

Auxiliary Order >pps

s = f (s1, . . . , so; so+1, . . . , sm) >pps t if

  • 1. si ∼

>pps t for some i ∈ {1, . . . , m} and

◮ if f ∈ D then i ∈ {1, . . . , o}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g, f ∈ D

◮ s >pps tj for all j ∈ {1, . . . , n}

f(x; y) >pps y

MA (ICS @ UIBK) POP∗

ps

11/16

slide-37
SLIDE 37

Polynomial Path Order and Parameter Substitution

Auxiliary Order >pps

s = f (s1, . . . , so; so+1, . . . , sm) >pps t if

  • 1. si ∼

>pps t for some i ∈ {1, . . . , m} and

◮ if f ∈ D then i ∈ {1, . . . , o}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g, f ∈ D

◮ s >pps tj for all j ∈ {1, . . . , n}

f(x; y) >pps x

MA (ICS @ UIBK) POP∗

ps

11/16

slide-38
SLIDE 38

Polynomial Path Order and Parameter Substitution

Auxiliary Order >pps

s = f (s1, . . . , so; so+1, . . . , sm) >pps t if

  • 1. si ∼

>pps t for some i ∈ {1, . . . , m} and

◮ if f ∈ D then i ∈ {1, . . . , o}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g, f ∈ D

◮ s >pps tj for all j ∈ {1, . . . , n}

f(x; y) >pps g(x; )

MA (ICS @ UIBK) POP∗

ps

11/16

slide-39
SLIDE 39

Polynomial Path Order and Parameter Substitution

RPOs POP∗

ps

s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if

  • 1. si ∼

>pps∗ t for some i ∈ {1, . . . , m}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g

◮ s >pps∗ tj for all j ∈ {1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}

  • 3. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≈ g

◮ {

{s1, . . . , so} } >mul

pps∗ {

{t1, . . . , tp} }

◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)

f ( x; y) >pps∗ g(n( x; y); s( x; y))

MA (ICS @ UIBK) POP∗

ps

12/16

slide-40
SLIDE 40

Polynomial Path Order and Parameter Substitution

RPOs POP∗

ps

s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if

  • 1. si ∼

>pps∗ t for some i ∈ {1, . . . , m}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g

◮ s >pps tj for all j ∈ {1, . . . , p}, s >pps∗ tj for all j ∈ {p + 1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}

  • 3. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≈ g

◮ {

{s1, . . . , so} } >mul

pps∗ {

{t1, . . . , tp} }

◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)

f ( x; y) >pps∗ g(n( x; y); s( x; y))

  • MA (ICS @ UIBK)

POP∗

ps

12/16

slide-41
SLIDE 41

Polynomial Path Order and Parameter Substitution

RPOs POP∗

ps

s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if

  • 1. si ∼

>pps∗ t for some i ∈ {1, . . . , m}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g

◮ s >pps tj for all j ∈ {1, . . . , p}, s >pps∗ tj for all j ∈ {p + 1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}

  • 3. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≈ g

◮ {

{s1, . . . , so} } >mul

pps∗ {

{t1, . . . , tp} }

◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V)

f ( x; y) >pps∗ g(n( x; ); s( x; y))

  • MA (ICS @ UIBK)

POP∗

ps

12/16

slide-42
SLIDE 42

Polynomial Path Order and Parameter Substitution

Polynomial Path Order with Parameter Substitution >pps∗

s = f (s1, . . . , so; so+1, . . . , sm) >pps∗ t if

  • 1. si ∼

>pps∗ t for some i ∈ {1, . . . , m}

  • 2. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≻ g, f ∈ D

◮ s >pps tj for all j ∈ {1, . . . , p}, s >pps∗ tj for all j ∈ {p + 1, . . . , n} ◮ tj ∈ T (F≺f , V) for all but one j ∈ {p + 1, . . . , n}

  • 3. t = g(t1, . . . , tp; tp+1, . . . , tn), f ≈ g, f ∈ D

◮ {

{s1, . . . , so} } >mul

pps∗ {

{t1, . . . , tp} }

◮ for all j ∈ {p + 1, . . . , n}, s >pps∗ tj and tj ∈ T (F≺f , V) MA (ICS @ UIBK) POP∗

ps

12/16

slide-43
SLIDE 43

Polynomial Path Order and Parameter Substitution

Polynomial Path Order with Parameter Substitution >pps∗

Theorem R ⊆ >pps∗ ⇒ rci

R polynomially bounded

for constructor TRS R

MA (ICS @ UIBK) POP∗

ps

13/16

slide-44
SLIDE 44

Polynomial Path Order and Parameter Substitution

Polynomial Path Order with Parameter Substitution >pps∗

Theorem R ⊆ >pps∗ ⇒ rci

R polynomially bounded

for constructor TRS R

Observation

>pop∗ >pps∗ ⊆ >mpo

rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys)

MA (ICS @ UIBK) POP∗

ps

13/16

slide-45
SLIDE 45

Polynomial Path Order and Parameter Substitution

Polynomial Path Order with Parameter Substitution >pps∗

Theorem R ⊆ >pps∗ ⇒ rci

R polynomially bounded

for constructor TRS R

Observation

>pop∗ >pps∗ ⊆ >mpo

rev(xs; ) >pps∗ revtl(xs; [ ]) revtl([ ]; ys) >pps∗ ys revtl(x:xs; ys) >pps∗ revtl(xs; x:ys)

MA (ICS @ UIBK) POP∗

ps

13/16

slide-46
SLIDE 46

Polytime Computability

Polytime Computability and >pps∗

Theorem

If R ⊆ >pps∗ then the functions computed by R are polytime computable.

MA (ICS @ UIBK) POP∗

ps

14/16

slide-47
SLIDE 47

Polytime Computability

Polytime Computability and >pps∗

Theorem

◮ Let R be an S-sorted constructor TRS based on a simple

  • signature. If R ⊆ >pps∗ then the functions computed by R are

polytime computable. terms grow only polynomial in size

MA (ICS @ UIBK) POP∗

ps

14/16

slide-48
SLIDE 48

Polytime Computability

Polytime Computability and >pps∗

Theorem

◮ Let R be an S-sorted constructor TRS based on a simple

  • signature. If R ⊆ >pps∗ then the functions computed by R are

polytime computable. terms grow only polynomial in size

Example

◮ s1 : Word → Word

◮ (:) : a × List(a) → List(a)

◮ node : Tree × Tree → Tree

MA (ICS @ UIBK) POP∗

ps

14/16

slide-49
SLIDE 49

Polytime Computability

Polytime Computability and >pps∗

Theorem

◮ Let R be an S-sorted constructor TRS based on a simple

  • signature. If R ⊆ >pps∗ then the functions computed by R are

polytime computable.

◮ Each polytime computable function is computable by an S-sorted,

  • rthogonal, constructor TRS compatible with >pps∗.

terms grow only polynomial in size

Example

◮ s1 : Word → Word

◮ (:) : a × List(a) → List(a)

◮ node : Tree × Tree → Tree

MA (ICS @ UIBK) POP∗

ps

14/16

slide-50
SLIDE 50

Experiments

Experimental Results

{R | R ∈ TPDB 4.0 ∧ R constructor TRS} (638)

MA (ICS @ UIBK) POP∗

ps

15/16

slide-51
SLIDE 51

Experiments

Experimental Results

{R | R ∈ TPDB 4.0 ∧ R constructor TRS} (638) MPO (67)

MA (ICS @ UIBK) POP∗

ps

15/16

slide-52
SLIDE 52

Experiments

Experimental Results

{R | R ∈ TPDB 4.0 ∧ R constructor TRS} (638) MPO (67) POP∗ (40)

MA (ICS @ UIBK) POP∗

ps

15/16

slide-53
SLIDE 53

Experiments

Experimental Results

{R | R ∈ TPDB 4.0 ∧ R constructor TRS} (638) MPO (67) POP∗

ps (51)

POP∗ (40)

MA (ICS @ UIBK) POP∗

ps

15/16

slide-54
SLIDE 54

Experiments

Conclusion

◮ integrating the rules of predicative recursion with parameter

substitution increases the power of polynomial path orders considerably

  • ◮ term rewriting allows us to combine different techniques for

complexity analysis

◮ >pps∗ + argument filterings used with weak dependency pairs ◮ >pps∗ + (finite) semantic labeling ◮ . . .

  • ◮ >pps∗ extensible to non-constructor TRS by putting additional

constraints on the precedence hack

MA (ICS @ UIBK) POP∗

ps

16/16

slide-55
SLIDE 55

Appendix

Polynomial Runtime Complexity ⇒ Polytime Computability

f(ǫ) → tip mkTree(x) → node(x, x) f(si(x)) → mkTree(f(x))

MA (ICS @ UIBK) POP∗

ps

17/16

slide-56
SLIDE 56

Appendix

Polynomial Runtime Complexity ⇒ Polytime Computability

f(ǫ; ) → tip mkTree(; x) → node(; x, x) f(si(; x); ) → mkTree(; f(x; )) f > mkTree > node > tip

MA (ICS @ UIBK) POP∗

ps

17/16

slide-57
SLIDE 57

Appendix

Polynomial Runtime Complexity ⇒ Polytime Computability

f(ǫ; ) >pps∗ tip mkTree(; x) >pps∗ node(; x, x) f(si(; x); ) >pps∗ mkTree(; f(x; )) f > mkTree > node > tip

MA (ICS @ UIBK) POP∗

ps

17/16

slide-58
SLIDE 58

Appendix

Polynomial Runtime Complexity ⇒ Polytime Computability

f(ǫ; ) → tip mkTree(; x) → node(; x, x) f(si(; x); ) → mkTree(; f(x; ))

Observations

◮ rci R of above TRS R polynomial ◮ i

− →R does not give a (direct) polytime algorithm for computing f

◮ terms grow exponentially in size MA (ICS @ UIBK) POP∗

ps

17/16

slide-59
SLIDE 59

Appendix

Controlling Size Growth

Definition

an S-sorted signature is called simple if for each constructor c : s1 × · · · × sn → s

◮ rk(si) rk(s) for all i ∈ {1, . . . , n} ◮ rk(si) = rk(s) for at most one i ∈ {1, . . . , n}

rk : S → N

MA (ICS @ UIBK) POP∗

ps

18/16

slide-60
SLIDE 60

Appendix

Controlling Size Growth

Definition

an S-sorted signature is called simple if for each constructor c : s1 × · · · × sn → s

◮ rk(si) rk(s) for all i ∈ {1, . . . , n} ◮ rk(si) = rk(s) for at most one i ∈ {1, . . . , n}

rk : S → N

Example

◮ true : Bool ◮ s1 : Word → Word ◮ (:) : a × List(a) → List(a) ◮ node : Tree × Tree → Tree

MA (ICS @ UIBK) POP∗

ps

18/16

slide-61
SLIDE 61

Appendix

Controlling Size Growth

Definition

an S-sorted signature is called simple if for each constructor c : s1 × · · · × sn → s

◮ rk(si) rk(s) for all i ∈ {1, . . . , n} ◮ rk(si) = rk(s) for at most one i ∈ {1, . . . , n}

rk : S → N

Example

◮ true : Bool

◮ s1 : Word → Word ◮ (:) : a × List(a) → List(a) ◮ node : Tree × Tree → Tree

MA (ICS @ UIBK) POP∗

ps

18/16

slide-62
SLIDE 62

Appendix

Controlling Size Growth

Definition

an S-sorted signature is called simple if for each constructor c : s1 × · · · × sn → s

◮ rk(si) rk(s) for all i ∈ {1, . . . , n} ◮ rk(si) = rk(s) for at most one i ∈ {1, . . . , n}

rk : S → N

Example

◮ true : Bool

◮ s1 : Word → Word

◮ (:) : a × List(a) → List(a) ◮ node : Tree × Tree → Tree

MA (ICS @ UIBK) POP∗

ps

18/16

slide-63
SLIDE 63

Appendix

Controlling Size Growth

Definition

an S-sorted signature is called simple if for each constructor c : s1 × · · · × sn → s

◮ rk(si) rk(s) for all i ∈ {1, . . . , n} ◮ rk(si) = rk(s) for at most one i ∈ {1, . . . , n}

rk : S → N

Example

◮ true : Bool

◮ s1 : Word → Word

◮ (:) : a × List(a) → List(a)

◮ node : Tree × Tree → Tree

MA (ICS @ UIBK) POP∗

ps

18/16

slide-64
SLIDE 64

Appendix

Controlling Size Growth

Definition

an S-sorted signature is called simple if for each constructor c : s1 × · · · × sn → s

◮ rk(si) rk(s) for all i ∈ {1, . . . , n} ◮ rk(si) = rk(s) for at most one i ∈ {1, . . . , n}

rk : S → N

Example

◮ true : Bool

◮ s1 : Word → Word

◮ (:) : a × List(a) → List(a)

◮ node : Tree × Tree → Tree

MA (ICS @ UIBK) POP∗

ps

18/16

slide-65
SLIDE 65

Appendix

Polytime Computability and >pps∗

Theorem

let R be an S-sorted constructor TRS based on a simple signature

◮ if R is compatible with >pps∗ then the functions computed by R

are polytime computable

◮ each polytime computable function is computable by such a TRS

compatible with >pps∗

MA (ICS @ UIBK) POP∗

ps

19/16

slide-66
SLIDE 66

Appendix

Polytime Computability and >pps∗

Theorem

let R be an S-sorted constructor TRS based on a simple signature

◮ if R is compatible with >pps∗ then the functions computed by R

are polytime computable

◮ each polytime computable function is computable by such a TRS

compatible with >pps∗ f(ǫ; ) → tip mkTree(; x) → node(; x, x) f(si(; x); ) → mkTree(; f(x; )) node : Tree × Tree → Tree

MA (ICS @ UIBK) POP∗

ps

19/16

slide-67
SLIDE 67

Appendix

Polytime Computability and >pps∗

Theorem

let R be an S-sorted constructor TRS based on a simple signature

◮ if R is compatible with >pps∗ then the functions computed by R

are polytime computable

◮ each polytime computable function is computable by such a TRS

compatible with >pps∗ rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys)

MA (ICS @ UIBK) POP∗

ps

19/16

slide-68
SLIDE 68

Appendix

Polytime Computability and >pps∗

Theorem

let R be an S-sorted constructor TRS based on a simple signature

◮ if R is compatible with >pps∗ then the functions computed by R

are polytime computable

◮ each polytime computable function is computable by such a TRS

compatible with >pps∗ rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys) [ ]: List(a) rev: List(a) → List(a) (:): a × List(a) → List(a) revtl : List(a) × List(a) → List(a)

MA (ICS @ UIBK) POP∗

ps

19/16

slide-69
SLIDE 69

Appendix

Polytime Computability and >pps∗

Theorem

let R be an S-sorted constructor TRS based on a simple signature

◮ if R is compatible with >pps∗ then the functions computed by R

are polytime computable

◮ each polytime computable function is computable by such a TRS

compatible with >pps∗ rev(xs; ) → revtl(xs; [ ]) revtl([ ]; ys) → ys revtl(x:xs; ys) → revtl(xs; x:ys) [ ]: List(a) rev: List(a) → List(a) (:): a × List(a) → List(a) revtl : List(a) × List(a) → List(a)

MA (ICS @ UIBK) POP∗

ps

19/16