O mputational gic L Dependency Pairs and Polynomial Path Orders - - PowerPoint PPT Presentation

o
SMART_READER_LITE
LIVE PREVIEW

O mputational gic L Dependency Pairs and Polynomial Path Orders - - PowerPoint PPT Presentation

C O mputational gic L Dependency Pairs and Polynomial Path Orders Martin Avanzini and Georg Moser Computational Logic Faculty of Computer Science, University of Innsbruck RTA 09 Introduction Automatic Complexity Analysis Goal


slide-1
SLIDE 1

O

L C

mputational

gic

Dependency Pairs and Polynomial Path Orders

Martin Avanzini and Georg Moser

Computational Logic Faculty of Computer Science, University of Innsbruck

RTA ’09

slide-2
SLIDE 2

Introduction

Automatic Complexity Analysis

Goal

◮ purely automatic complexity analysis

Approach

◮ employ term rewriting as model of computation

  • 1. proof termination
  • 2. extract complexity certificates from termination proof

MA (ICS @ UIBK) Dependency Pairs and POP∗ 2/17

slide-3
SLIDE 3

Introduction

Automatic Complexity Analysis

Goal

◮ purely automatic complexity analysis

Approach

◮ employ term rewriting as model of computation

  • 1. proof termination
  • 2. extract complexity certificates from termination proof

Problem

◮ to detect feasible computation, restrictions on termination

technique usually inevitable

MA (ICS @ UIBK) Dependency Pairs and POP∗ 2/17

slide-4
SLIDE 4

Introduction

(Automatic) Complexity Analysis by Rewriting

direct techniques

. . .

Polynomial Path Orders

. . .

transformation techniques

Weak Dependency Pairs

. . . . . .

MA (ICS @ UIBK) Dependency Pairs and POP∗ 3/17

slide-5
SLIDE 5

Introduction

(Automatic) Complexity Analysis by Rewriting

direct techniques

. . .

Polynomial Path Orders

. . .

transformation techniques

Weak Dependency Pairs

. . . . . .

MA (ICS @ UIBK) Dependency Pairs and POP∗ 3/17

slide-6
SLIDE 6

Introduction

Term Rewriting

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x))))

MA (ICS @ UIBK) Dependency Pairs and POP∗ 4/17

slide-7
SLIDE 7

Introduction

Term Rewriting

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x)))) bits(s(s(0)))

MA (ICS @ UIBK) Dependency Pairs and POP∗ 4/17

slide-8
SLIDE 8

Introduction

Term Rewriting

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x)))) bits(s(s(0))) − →R s(bits(s(half(0))))

MA (ICS @ UIBK) Dependency Pairs and POP∗ 4/17

slide-9
SLIDE 9

Introduction

Term Rewriting

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x)))) bits(s(s(0))) − →R s(bits(s(half(0)))) − →R s(bits(s(0)))

MA (ICS @ UIBK) Dependency Pairs and POP∗ 4/17

slide-10
SLIDE 10

Introduction

Term Rewriting

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x)))) bits(s(s(0))) − →R s(bits(s(half(0)))) − →R s(bits(s(0))) − →R s(s(0))

MA (ICS @ UIBK) Dependency Pairs and POP∗ 4/17

slide-11
SLIDE 11

Introduction

Term Rewriting

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x)))) bits(s(s(0))) − →R s(bits(s(half(0)))) − →R s(bits(s(0))) − →R s(s(0))

bits(n) = v ⇐ ⇒ bits(n) − →!

R v

computation

MA (ICS @ UIBK) Dependency Pairs and POP∗ 4/17

slide-12
SLIDE 12

Introduction

Term Rewriting

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x)))) bits(s(s(0))) − →R s(bits(s(half(0)))) − →R s(bits(s(0))) − →R s(s(0))

bits(n) = v ⇐ ⇒ bits(n) − →!

R v

computation confluent and terminating constructor TRS

MA (ICS @ UIBK) Dependency Pairs and POP∗ 4/17

slide-13
SLIDE 13

Introduction

Term Rewriting

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x)))) bits(s(s(0))) − →R s(bits(s(half(0)))) − →R s(bits(s(0))) − →R s(s(0))

bits(n) = v ⇐ ⇒ bits(n) − →!

R v = log(n + 1)

computation confluent and terminating constructor TRS

MA (ICS @ UIBK) Dependency Pairs and POP∗ 4/17

slide-14
SLIDE 14

Introduction

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) Dependency Pairs and POP∗ 5/17

slide-15
SLIDE 15

Introduction

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 , − →R)

MA (ICS @ UIBK) Dependency Pairs and POP∗ 5/17

slide-16
SLIDE 16

Introduction

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 , − →R)

◮ runtime complexity

rcR (n) = dl(n, B, − →R) B := {f (v1, . . . , vn) | f defined, vi build from constructors} capture complexity

  • f computed functions

MA (ICS @ UIBK) Dependency Pairs and POP∗ 5/17

slide-17
SLIDE 17

Introduction

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 , − →R)

◮ innermost runtime complexity

rci

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

− →R) B := {f (v1, . . . , vn) | f defined, vi build from constructors} avoid duplication

  • f redexes

MA (ICS @ UIBK) Dependency Pairs and POP∗ 5/17

slide-18
SLIDE 18

Polynomial Path Orders

Polynomial Path Orders >pop∗

◮ >pop∗ ⊆ >mpo

Theorem (A, Moser 2008)

R ⊆ >pop∗ ⇒ rci

R polynomially bounded

MA (ICS @ UIBK) Dependency Pairs and POP∗ 6/17

slide-19
SLIDE 19

Polynomial Path Orders

Polynomial Path Orders >pop∗

◮ >pop∗ ⊆ >mpo ◮ >pop∗ ≈ >mpo ∩ predicative recursion

Theorem (A, Moser 2008)

R ⊆ >pop∗ ⇒ rci

R polynomially bounded

Predicative Recursion [Bellantoni, Cook 1992]

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) Dependency Pairs and POP∗ 6/17

slide-20
SLIDE 20

Polynomial Path Orders

Polynomial Path Orders >pop∗

◮ >pop∗ ⊆ >mpo ◮ >pop∗ ≈ >mpo ∩ predicative recursion ◮ R ⊆ >pop∗ and s −

→R t ⇒ s >pop∗ t

Theorem (A, Moser 2008)

R ⊆ >pop∗ ⇒ rci

R polynomially bounded

MA (ICS @ UIBK) Dependency Pairs and POP∗ 6/17

slide-21
SLIDE 21

Polynomial Path Orders

Polynomial Path Orders >pop∗

◮ >pop∗ ⊆ >mpo ◮ >pop∗ ≈ >mpo ∩ predicative recursion ◮ R ⊆ >pop∗ and s −

→R t ⇒ s >pop∗ t

Lemma

if R ⊆ >pop∗ then there exists I : T (F, V) → N satisfying

  • 1. s

i

− →R t ⇒ I(s) > I(t)

Theorem (A, Moser 2008)

R ⊆ >pop∗ ⇒ rci

R polynomially bounded

MA (ICS @ UIBK) Dependency Pairs and POP∗ 6/17

slide-22
SLIDE 22

Polynomial Path Orders

Polynomial Path Orders >pop∗

◮ >pop∗ ⊆ >mpo ◮ >pop∗ ≈ >mpo ∩ predicative recursion ◮ R ⊆ >pop∗ and s −

→R t ⇒ s >pop∗ t

Lemma

if R ⊆ >pop∗ then there exists I : T (F, V) → N satisfying

  • 1. s

i

− →R t ⇒ I(s) > I(t)

  • 2. I(t) polynomially bounded (in the size of t) for basic terms t

Theorem (A, Moser 2008)

R ⊆ >pop∗ ⇒ rci

R polynomially bounded

MA (ICS @ UIBK) Dependency Pairs and POP∗ 6/17

slide-23
SLIDE 23

Polynomial Path Orders

Polynomial Path Orders >pop∗ (continued)

Observation

>pop∗ ⊆ >mpo

◮ application of polynomial path orders restricted to

MPO-terminating TRS’s

MA (ICS @ UIBK) Dependency Pairs and POP∗ 7/17

slide-24
SLIDE 24

Polynomial Path Orders

Polynomial Path Orders >pop∗ (continued)

Observation

>pop∗ ⊆ >mpo

◮ application of polynomial path orders restricted to

MPO-terminating TRS’s

❘ dependency pairs for complexity analysis

◮ reduction pairs, argument filterings, usable rules,

dependency graphs, subterm criterion . . .

MA (ICS @ UIBK) Dependency Pairs and POP∗ 7/17

slide-25
SLIDE 25

Polynomial Path Orders

Polynomial Path Orders >pop∗ (continued)

Observation

>pop∗ ⊆ >mpo

◮ application of polynomial path orders restricted to

MPO-terminating TRS’s

❘ dependency pairs for complexity analysis

◮ reduction pairs, argument filterings, usable rules,

dependency graphs, subterm criterion . . .

MA (ICS @ UIBK) Dependency Pairs and POP∗ 7/17

slide-26
SLIDE 26

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis

t♯ =

  • t

if t a variable f ♯(t1, . . . , tn) if t = f (t1, . . . , tn) WIDP(R) = {l♯ → c(r♯

1, . . . r♯ n) | l → C[r1, . . . , rn] ∈ R} ◮ C maximal context built from constructors and variables ◮ c fresh compound symbol (but we set c(t) = t)

MA (ICS @ UIBK) Dependency Pairs and POP∗ 8/17

slide-27
SLIDE 27

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis

t♯ =

  • t

if t a variable f ♯(t1, . . . , tn) if t = f (t1, . . . , tn) WIDP(R) = {l♯ → c(r♯

1, . . . r♯ n) | l → C[r1, . . . , rn] ∈ R} ◮ C maximal context built from constructors and variables ◮ c fresh compound symbol (but we set c(t) = t)

TRS R

f(0) → 0 f(s(x)) → d(f(x), f(x))

WIDP(R)

f♯(0) → c1 f♯(s(x)) → c2(f♯(x), f♯(x))

MA (ICS @ UIBK) Dependency Pairs and POP∗ 8/17

slide-28
SLIDE 28

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis (continued)

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x))))

P := WIDP(Rbits)

half♯(0) → c1 bits♯(0) → c3 half♯(s(0)) → c2 bits♯(s(0)) → c4 half♯(s(s(x))) → half♯(x) bits♯(s(s(x))) → bits♯(s(half(x)))

MA (ICS @ UIBK) Dependency Pairs and POP∗ 9/17

slide-29
SLIDE 29

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis (continued)

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x))))

P := WIDP(Rbits)

half♯(0) → c1 bits♯(0) → c3 half♯(s(0)) → c2 bits♯(s(0)) → c4 half♯(s(s(x))) → half♯(x) bits♯(s(s(x))) → bits♯(s(half(x))) bits(s(s(0)))

i

− →R s(bits(s(half(0))))

i

− →R s(bits(s(0)))

i

− →R s(s(0))

MA (ICS @ UIBK) Dependency Pairs and POP∗ 9/17

slide-30
SLIDE 30

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis (continued)

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x))))

P := WIDP(Rbits)

half♯(0) → c1 bits♯(0) → c3 half♯(s(0)) → c2 bits♯(s(0)) → c4 half♯(s(s(x))) → half♯(x) bits♯(s(s(x))) → bits♯(s(half(x))) bits(s(s(0)))

i

− →R s(bits(s(half(0))))

i

− →R s(bits(s(0)))

i

− →R s(s(0)) bits♯(s(s(0)))

MA (ICS @ UIBK) Dependency Pairs and POP∗ 9/17

slide-31
SLIDE 31

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis (continued)

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x))))

P := WIDP(Rbits)

half♯(0) → c1 bits♯(0) → c3 half♯(s(0)) → c2 bits♯(s(0)) → c4 half♯(s(s(x))) → half♯(x) bits♯(s(s(x))) → bits♯(s(half(x))) bits(s(s(0)))

i

− →R s(bits(s(half(0))))

i

− →R s(bits(s(0)))

i

− →R s(s(0)) bits♯(s(s(0)))

i

− →P∪R bits♯(s(half(0)))

MA (ICS @ UIBK) Dependency Pairs and POP∗ 9/17

slide-32
SLIDE 32

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis (continued)

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x))))

P := WIDP(Rbits)

half♯(0) → c1 bits♯(0) → c3 half♯(s(0)) → c2 bits♯(s(0)) → c4 half♯(s(s(x))) → half♯(x) bits♯(s(s(x))) → bits♯(s(half(x))) bits(s(s(0)))

i

− →R s(bits(s(half(0))))

i

− →R s(bits(s(0)))

i

− →R s(s(0)) bits♯(s(s(0)))

i

− →P∪R bits♯(s(half(0)))

i

− →P∪R bits♯(s(0))

MA (ICS @ UIBK) Dependency Pairs and POP∗ 9/17

slide-33
SLIDE 33

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis (continued)

TRS Rbits

half(0) → 0 bits(0) → 0 half(s(0)) → 0 bits(s(0)) → s(0) half(s(s(x))) → s(half(x)) bits(s(s(x))) → s(bits(s(half(x))))

P := WIDP(Rbits)

half♯(0) → c1 bits♯(0) → c3 half♯(s(0)) → c2 bits♯(s(0)) → c4 half♯(s(s(x))) → half♯(x) bits♯(s(s(x))) → bits♯(s(half(x))) bits(s(s(0)))

i

− →R s(bits(s(half(0))))

i

− →R s(bits(s(0)))

i

− →R s(s(0)) bits♯(s(s(0)))

i

− →P∪R bits♯(s(half(0)))

i

− →P∪R bits♯(s(0))

i

− →P∪R c4

MA (ICS @ UIBK) Dependency Pairs and POP∗ 9/17

slide-34
SLIDE 34

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis (continued)

U := U(WIDP(Rbits)) usable rules

half(0) → 0 half(s(0)) → 0 half(s(s(x))) → s(half(x))

P := WIDP(Rbits)

half♯(0) → c1 bits♯(0) → c3 half♯(s(0)) → c2 bits♯(s(0)) → c4 half♯(s(s(x))) → half♯(x) bits♯(s(s(x))) → bits♯(s(half(x))) bits(s(s(0)))

i

− →R s(bits(s(half(0))))

i

− →R s(bits(s(0)))

i

− →R s(s(0)) bits♯(s(s(0)))

i

− →P ∪U bits♯(s(half(0)))

i

− →P ∪U bits♯(s(0))

i

− →P ∪U c4

MA (ICS @ UIBK) Dependency Pairs and POP∗ 9/17

slide-35
SLIDE 35

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis (continued)

U := U(WIDP(Rbits)) usable rules

half(0) → 0 half(s(0)) → 0 half(s(s(x))) → s(half(x))

P := WIDP(Rbits)

half♯(0) → c1 bits♯(0) → c3 half♯(s(0)) → c2 bits♯(s(0)) → c4 half♯(s(s(x))) → half♯(x) bits♯(s(s(x))) → bits♯(s(half(x))) bits(s(s(0)))

i

− →R s(bits(s(half(0))))

i

− →R s(bits(s(0)))

i

− →R s(s(0)) bits♯(s(s(0)))

i

− →P ∪U bits♯(s(half(0)))

i

− →P ∪U bits♯(s(0))

i

− →P ∪U c4

MA (ICS @ UIBK) Dependency Pairs and POP∗ 9/17

slide-36
SLIDE 36

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis (continued)

Notation

− →P/U := − →∗

U · −

→P · − →∗

U

MA (ICS @ UIBK) Dependency Pairs and POP∗ 10/17

slide-37
SLIDE 37

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis (continued)

Notation

i

− →P/U :=

i

− →+

P∪U with exactly one step due to P

MA (ICS @ UIBK) Dependency Pairs and POP∗ 10/17

slide-38
SLIDE 38

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis (continued)

Notation

i

− →P/U :=

i

− →+

P∪U with exactly one step due to P

Theorem (Hirokawa, Moser 2008) rci

R(n) O( dl(n, B♯, i

− →WIDP(R)/U(WIDP(R))) + |t| )

provided

◮ WIDP(R) is non-duplicating ◮ U(WIDP(R)) ⊆ >A for some strongly linear interpretation A

interpretations are weight functions

MA (ICS @ UIBK) Dependency Pairs and POP∗ 10/17

slide-39
SLIDE 39

Dependency Pairs for Complexity Analysis

Dependency Pairs for Complexity Analysis (continued)

Notation

i

− →P/U :=

i

− →+

P∪U with exactly one step due to P

Theorem (Hirokawa, Moser 2008) rci

R(n) O( dl(n, B♯, i

− →WIDP(R)/U(WIDP(R))) + |t| )

provided

◮ WIDP(R) is non-duplicating ◮ U(WIDP(R)) ⊆ >A for some strongly linear interpretation A

interpretations are weight functions

❘ measure WIDP(R)-steps with reduction pairs

MA (ICS @ UIBK) Dependency Pairs and POP∗ 10/17

slide-40
SLIDE 40

Dependency Pairs for Complexity Analysis

Reduction Pairs for Complexity Analysis

MA (ICS @ UIBK) Dependency Pairs and POP∗ 11/17

slide-41
SLIDE 41

Dependency Pairs for Complexity Analysis

Reduction Pairs for Complexity Analysis

Definition

a safe reduction pair is a pair (, ≻) of orderings such that

◮ is a rewrite preorder, ◮ ≻ is closed under substitutions, ◮ · ≻ · ⊆ ≻ ◮ si ≻ ti ⇒ c(s1, . . . , si, . . . , sn) ≻ c(s1, . . . , ti, . . . , sn) for

compound symbols c

MA (ICS @ UIBK) Dependency Pairs and POP∗ 11/17

slide-42
SLIDE 42

Dependency Pairs for Complexity Analysis

Reduction Pairs for Complexity Analysis

Definition

a safe reduction pair is a pair (, ≻) of orderings such that

◮ is a rewrite preorder, ◮ ≻ is closed under substitutions, ◮ · ≻ · ⊆ ≻ ◮ si ≻ ti ⇒ c(s1, . . . , si, . . . , sn) ≻ c(s1, . . . , ti, . . . , sn) for

compound symbols c

Lemma (Hirokawa, Moser 2008)

suppose WIDP(R) ⊆ ≻ and U(WIDP(R)) ⊆

i

− →WIDP(R)/U(WIDP(R)) ⊆ ≻

MA (ICS @ UIBK) Dependency Pairs and POP∗ 11/17

slide-43
SLIDE 43

Dependency Pairs for Complexity Analysis

Reduction Pairs for Complexity Analysis

Definition

a safe reduction pair is a pair (, ≻) of orderings such that

◮ is a rewrite preorder, ◮ ≻ is closed under substitutions, ◮ · ≻ · ⊆ ≻ ◮ si ≻ ti ⇒ c(s1, . . . , si, . . . , sn) ≻ c(s1, . . . , ti, . . . , sn) for

compound symbols c

Lemma (Hirokawa, Moser 2008)

suppose WIDP(R) ⊆ ≻ and U(WIDP(R)) ⊆

i

− →WIDP(R)/U(WIDP(R)) ⊆ ≻

❘ WIDP(R)-steps bounded by ≻-descents

MA (ICS @ UIBK) Dependency Pairs and POP∗ 11/17

slide-44
SLIDE 44

Polynomial Path Orders as Reduction Pair

Polynomial Path Orders as Reduction Pair

Problem

◮ (∼

>pop∗, >pop∗) is not a reduction pair

MA (ICS @ UIBK) Dependency Pairs and POP∗ 12/17

slide-45
SLIDE 45

Polynomial Path Orders as Reduction Pair

Polynomial Path Orders as Reduction Pair

Problem

◮ (∼

>pop∗, >pop∗) is not a reduction pair

Theorem

suppose WIDP(R) ⊆ >pop∗ and U(WIDP(R)) ⊆ ∼ >pop∗

s

i

− →WIDP(R)/U(WIDP(R)) t ⇒ I(s) > I(t) ❘ WIDP(R)-steps bounded by interpretation I, i.e. polynomially bounded in the sizes of starting terms B

MA (ICS @ UIBK) Dependency Pairs and POP∗ 12/17

slide-46
SLIDE 46

Polynomial Path Orders as Reduction Pair

Polynomial Path Orders as Reduction Pair

Problem

◮ (∼

pop∗, >π pop∗) is not a reduction pair

Theorem

suppose WIDP(R) ⊆ >π

pop∗ and U(WIDP(R)) ⊆ ∼

pop∗

s

i

− →WIDP(R)/U(WIDP(R)) t ⇒ I(π(s)) > I(π(t)) ❘ WIDP(R)-steps bounded by interpretation I, i.e. polynomially bounded in the sizes of starting terms B

s ≻π t ⇐ ⇒ π(s) ≻ π(t) for argument filtering π

MA (ICS @ UIBK) Dependency Pairs and POP∗ 12/17

slide-47
SLIDE 47

Polynomial Path Orders as Reduction Pair

Polynomial Path Orders as Reduction Pair (continued)

Corollary

let P := WIDP(R) and U := U(WIDP(R)), and suppose

◮ P is non-duplicating ◮ U ⊆ >A for some strongly linear interpretation A

then

P ⊆ >π

pop∗, U ⊆ ∼

pop∗ ⇒ rci R polynomially bounded

MA (ICS @ UIBK) Dependency Pairs and POP∗ 13/17

slide-48
SLIDE 48

Polynomial Path Orders as Reduction Pair

Example

U := U(WIDP(Rbits))

half(0) → half(s(0)) → half(s(s(x))) → s(half(x))

P := WIDP(Rbits)

half♯(0) → c1 bits♯(0) → c3 half♯(s(0)) → c2 bits♯(s(0)) → c4 half♯(s(s(x))) → half♯(x) bits♯(s(s(x))) → bits♯(s(half(x)))

MA (ICS @ UIBK) Dependency Pairs and POP∗ 14/17

slide-49
SLIDE 49

Polynomial Path Orders as Reduction Pair

Example

U := U(WIDP(Rbits))

half(0) → half(s(0)) → half(s(s(x))) → s(half(x)) 2 > 1 3 > 1 3 + x > 2 + x

P := WIDP(Rbits)

half♯(0) → c1 bits♯(0) → c3 half♯(s(0)) → c2 bits♯(s(0)) → c4 half♯(s(s(x))) → half♯(x) bits♯(s(s(x))) → bits♯(s(half(x))) weight(half) = weight(0) = weight(s) = 1

MA (ICS @ UIBK) Dependency Pairs and POP∗ 14/17

slide-50
SLIDE 50

Polynomial Path Orders as Reduction Pair

Example

U := U(WIDP(Rbits))

→ s(0) → s(s(x)) → s( x )

P := WIDP(Rbits)

half♯(0) → c1 bits♯(0) → c3 half♯(s(0)) → c2 bits♯(s(0)) → c4 half♯(s(s(x))) → half♯(x) bits♯(s(s(x))) → bits♯(s( x )) π(half) = 1 π(half♯) = π(bits♯) = π(s) = [1]

MA (ICS @ UIBK) Dependency Pairs and POP∗ 14/17

slide-51
SLIDE 51

Polynomial Path Orders as Reduction Pair

Example

U := U(WIDP(Rbits))

0 ∼ >pop∗ 0 s(0) ∼ >pop∗ 0 s(s(x)) ∼ >pop∗ s( x )

P := WIDP(Rbits)

half♯(0) >pop∗ c1 bits♯(0) >pop∗ c3 half♯(s(0)) >pop∗ c2 bits♯(s(0)) >pop∗ c4 half♯(s(s(x))) >pop∗ half♯(x) bits♯(s(s(x))) >pop∗ bits♯(s( x )) half♯ > c1, c2 bits♯ > c3, c4 safe(s) = {1}, safe(half♯) = safe(bits♯) = ∅

MA (ICS @ UIBK) Dependency Pairs and POP∗ 14/17

slide-52
SLIDE 52

Polynomial Path Orders as Reduction Pair

Example

U := U(WIDP(Rbits))

0 ∼ >pop∗ 0 s(0) ∼ >pop∗ 0 s(s(x)) ∼ >pop∗ s( x )

P := WIDP(Rbits)

half♯(0) >pop∗ c1 bits♯(0) >pop∗ c3 half♯(s(0)) >pop∗ c2 bits♯(s(0)) >pop∗ c4 half♯(s(s(x))) >pop∗ half♯(x) bits♯(s(s(x))) >pop∗ bits♯(s( x ))

Rbits admits polynomial (innermost) runtime complexity

MA (ICS @ UIBK) Dependency Pairs and POP∗ 14/17

slide-53
SLIDE 53

Experiments

Experimental Results

Number of Yes-Instances

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

MA (ICS @ UIBK) Dependency Pairs and POP∗ 15/17

slide-54
SLIDE 54

Experiments

Experimental Results

Number of Yes-Instances

{R | R ∈ TPDB 4.0 ∧ R constructor TRS} (638) POP∗ + DG (40 + 15)

MA (ICS @ UIBK) Dependency Pairs and POP∗ 15/17

slide-55
SLIDE 55

Experiments

Experimental Results

Number of Yes-Instances

{R | R ∈ TPDB 4.0 ∧ R constructor TRS} (638) MATRIXR + DG (98 ) POP∗ + DG (40 + 15)

MA (ICS @ UIBK) Dependency Pairs and POP∗ 15/17

slide-56
SLIDE 56

Experiments

Experimental Results

Number of Yes-Instances

{R | R ∈ TPDB 4.0 ∧ R constructor TRS} (638) MATRIXR + POP∗ + DG (98 + 7) POP∗ + DG (40 + 15)

MA (ICS @ UIBK) Dependency Pairs and POP∗ 15/17

slide-57
SLIDE 57

Polytime Computability

Polytime Computability

MA (ICS @ UIBK) Dependency Pairs and POP∗ 16/17

slide-58
SLIDE 58

Polytime Computability

Polytime Computability

Theorem

let P := WIDP(R) and U := U(WIDP(R)), and suppose

◮ P is non-duplicating ◮ U ⊆ >A for some strongly linear interpretation A

then

P ⊆ >π

pop∗, U ⊆ ∼

pop∗

⇒ rci

R polynomially bounded

MA (ICS @ UIBK) Dependency Pairs and POP∗ 16/17

slide-59
SLIDE 59

Polytime Computability

Polytime Computability

Theorem

let P := WIDP(R) and U := U(WIDP(R)), and suppose

◮ P is non-duplicating ◮ U ⊆ >A for some strongly linear interpretation A

then

P ⊆ >π

pop∗, U ⊆ ∼

pop∗

⇒ rci

R polynomially bounded

can we say something about the complexity of the functions computed by R ?

MA (ICS @ UIBK) Dependency Pairs and POP∗ 16/17

slide-60
SLIDE 60

Polytime Computability

Polytime Computability

Theorem

let P := WIDP(R) and U := U(WIDP(R)), and suppose

◮ P is non-duplicating ◮ U ⊆ >A for some strongly linear interpretation A ◮ R is based on a simple signature

then

P ⊆ >π

pop∗, U ⊆ ∼

pop∗

⇒ functions computed by R are polytime-computable

MA (ICS @ UIBK) Dependency Pairs and POP∗ 16/17

slide-61
SLIDE 61

Polytime Computability

Polytime Computability

Theorem

let P := WIDP(R) and U := U(WIDP(R)), and suppose

◮ P is non-duplicating ◮ U ⊆ >A for some strongly linear interpretation A ◮ R is based on a simple signature

then

P ⊆ >π

pop∗, U ⊆ ∼

pop∗

⇒ functions computed by R are polytime-computable Example

◮ s1 : Word → Word

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

◮ node : Tree × Tree → Tree

terms grow only polynomial in size

MA (ICS @ UIBK) Dependency Pairs and POP∗ 16/17

slide-62
SLIDE 62

Conclusion

Conclusion

Complexity Analysis By Rewriting

  • 1. use rewriting as model of computation
  • 2. estimate number of rewrite steps

modular , from termination proofs

  • 3. conclude polytime-computability of functions defined by TRS

MA (ICS @ UIBK) Dependency Pairs and POP∗ 17/17

slide-63
SLIDE 63

Conclusion

Conclusion

Complexity Analysis By Rewriting

  • 1. use rewriting as model of computation
  • 2. estimate number of rewrite steps

modular , from termination proofs

  • 3. conclude polytime-computability of functions defined by TRS

Related Work

Jean-Yves Marion and Romain P´ echoux Characterizations of polynomial complexity classes with a better intensionality In Proc. PPDP ’08, LNCS, pp. 79–88, 2008

3 ∧ ¬2

MA (ICS @ UIBK) Dependency Pairs and POP∗ 17/17