• Keine Ergebnisse gefunden

Lower Bounds for Runtime Complexity of Term Rewriting

N/A
N/A
Protected

Academic year: 2021

Aktie "Lower Bounds for Runtime Complexity of Term Rewriting"

Copied!
153
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Lower Bounds for Runtime Complexity of Term Rewriting

J¨urgen Giesl

LuFG Informatik 2, RWTH Aachen University, Germany

joint work withFlorian Frohn,Jera Hensel,Cornelius Aschermann, andThomas Str¨oder

(2)

Lower Bounds?

input size

runtime

worst-case upper bounds

best-case lower bounds worst-case lower bounds

Why?

tight

bounds detect bugs

detect potential attacks (DoS)

(3)

Lower Bounds?

input size

runtime

worst-case upper bounds

best-case lower bounds worst-case lower bounds

Why?

tight

bounds detect bugs

detect potential attacks (DoS)

(4)

Lower Bounds?

input size

runtime

worst-case upper bounds

best-case lower bounds

worst-case lower bounds

Why?

tight

bounds detect bugs

detect potential attacks (DoS)

(5)

Lower Bounds?

input size

runtime

worst-case upper bounds

best-case lower bounds worst-case lower bounds

Why?

tight

bounds detect bugs

detect potential attacks (DoS)

(6)

Lower Bounds?

input size

runtime

worst-case upper bounds

best-case lower bounds worst-case lower bounds

Why?

tight

bounds

detect bugs

detect potential attacks (DoS)

(7)

Lower Bounds?

input size

runtime

worst-case upper bounds

best-case lower bounds worst-case lower bounds

Why?

tight

bounds detect bugs

detect potential attacks (DoS)

(8)

Lower Bounds?

input size

runtime

worst-case upper bounds

best-case lower bounds worst-case lower bounds

Why?

tight

bounds detect bugs

detect potential attacks (DoS)

(9)

Worst-Case Lower Bounds

Integer Transition Systems

under-approximatingprogram acceleration(IJCAR 16)

⇒WST-talk by M. Naaf, Tue 15:00

Term Rewrite Systems

inferrewrite lemmasthat represent families of rewrite sequences (RTA 15) detectdecreasing loops(JAR 17)

⇒much more efficient and applicable to most examples

(10)

Worst-Case Lower Bounds

Integer Transition Systems

under-approximatingprogram acceleration(IJCAR 16)

⇒WST-talk by M. Naaf, Tue 15:00

Term Rewrite Systems

inferrewrite lemmasthat represent families of rewrite sequences (RTA 15) detectdecreasing loops(JAR 17)

⇒much more efficient and applicable to most examples

(11)

Worst-Case Lower Bounds

Integer Transition Systems

under-approximatingprogram acceleration(IJCAR 16)

⇒WST-talk by M. Naaf, Tue 15:00

Term Rewrite Systems

inferrewrite lemmasthat represent families of rewrite sequences (RTA 15) detectdecreasing loops(JAR 17)

⇒much more efficient and applicable to most examples

(12)

Worst-Case Lower Bounds

Integer Transition Systems

under-approximatingprogram acceleration(IJCAR 16)

⇒WST-talk by M. Naaf, Tue 15:00

Term Rewrite Systems

inferrewrite lemmasthat represent families of rewrite sequences (RTA 15) detectdecreasing loops(JAR 17)

⇒much more efficient and applicable to most examples

(13)

Worst-Case Lower Bounds

Integer Transition Systems

under-approximatingprogram acceleration(IJCAR 16)

⇒WST-talk by M. Naaf, Tue 15:00

Term Rewrite Systems

inferrewrite lemmasthat represent families of rewrite sequences (RTA 15) detectdecreasing loops(JAR 17)

⇒much more efficient and applicable to most examples

(14)

Worst-Case Lower Bounds

Integer Transition Systems

under-approximatingprogram acceleration(IJCAR 16)

⇒WST-talk by M. Naaf, Tue 15:00

Term Rewrite Systems

inferrewrite lemmasthat represent families of rewrite sequences (RTA 15)

detectdecreasing loops(JAR 17)

⇒much more efficient and applicable to most examples

(15)

Worst-Case Lower Bounds

Integer Transition Systems

under-approximatingprogram acceleration(IJCAR 16)

⇒WST-talk by M. Naaf, Tue 15:00

Term Rewrite Systems

inferrewrite lemmasthat represent families of rewrite sequences (RTA 15) detectdecreasing loops(JAR 17)

⇒much more efficient and applicable to most examples

(16)

Worst-Case Lower Bounds

Integer Transition Systems

under-approximatingprogram acceleration(IJCAR 16)

⇒WST-talk by M. Naaf, Tue 15:00

Term Rewrite Systems

inferrewrite lemmasthat represent families of rewrite sequences (RTA 15) detectdecreasing loops(JAR 17)

⇒much more efficient and applicable to most examples

(17)

Decreasing Loops

Generalizing

loops

to prove

linear and exponential

lower bounds for rc(n).

Example: il

(5,[ ])→

6

[0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with a basic term of size ≤

n

Basic Terms

: defined symbol only at root il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n)

and rc(n)

∈ O(n)

(18)

Decreasing Loops

Generalizing

loops

to prove linear and

exponential

lower bounds for rc(n).

Example: il

(5,[ ])→

6

[0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with a basic term of size ≤

n

Basic Terms

: defined symbol only at root il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n)

and rc(n)

∈ O(n)

(19)

Decreasing Loops

Generalizing

loops

to prove linear and

exponential lower bounds for rc(n).

Example: il

(5,[ ])→

6

[0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with a basic term of size ≤

n

Basic Terms

: defined symbol only at root il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n)

and rc(n)

∈ O(n)

(20)

Decreasing Loops

Generalizing

loops

to prove linear and

exponential lower bounds for rc(n).

Example: il

(5,[ ])→

6

[0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with a basic term of size ≤

n

Basic Terms

: defined symbol only at root il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n)

and rc(n)

∈ O(n)

(21)

Decreasing Loops

Generalizing

loops

to prove linear and

exponential lower bounds for rc(n).

Example: il

(5,[ ])→

6

[0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with a basic term of size ≤

n

Basic Terms

: defined symbol only at root il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n)

and rc(n)

∈ O(n)

(22)

Decreasing Loops

Generalizing

loops

to prove linear and

exponential lower bounds for rc(n).

Example: il(5,

[ ])→

6

[0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with a basic term of size ≤

n

Basic Terms

: defined symbol only at root il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n)

and rc(n)

∈ O(n)

(23)

Decreasing Loops

Generalizing

loops

to prove linear and

exponential lower bounds for rc(n).

Example: il(5,

[ ])→

6

[0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with a basic term of size ≤

n

Basic Terms

: defined symbol only at root il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n)

and rc(n)

∈ O(n)

(24)

Decreasing Loops

Generalizing

loops

to prove linear and

exponential lower bounds for rc(n).

Example: il(5,

[ ])→

6

[0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with abasic

term of size

n

Basic Terms

: defined symbol only at root il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n)

and rc(n)

∈ O(n)

(25)

Decreasing Loops

Generalizing

loops

to prove linear and

exponential lower bounds for rc(n).

Example: il(5,

[ ])→

6

[0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with abasic

term of size

n

Basic Terms: defined symbol only at root

il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n)

and rc(n)

∈ O(n)

(26)

Decreasing Loops

Generalizing

loops

to prove linear and

exponential lower bounds for rc(n).

Example: il(5,

[ ])→

6

[0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with abasic

term of size

n

Basic Terms: defined symbol only at root il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n)

and rc(n)

∈ O(n)

(27)

Decreasing Loops

Generalizing

loops

to prove linear and

exponential lower bounds for rc(n).

Example: il(5,

[ ])→

6

[0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with abasic

term of size

n

Basic Terms: defined symbol only at root il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n)

and rc(n)

∈ O(n)

(28)

Decreasing Loops

Generalizing

loops

to prove linear and

exponential lower bounds for rc(n).

Example: il(5,

[ ])→

6 [0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with abasic

term of size

n

Basic Terms: defined symbol only at root il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n)

and rc(n)

∈ O(n)

(29)

Decreasing Loops

Generalizing

loops

to prove linear and

exponential lower bounds for rc(n).

Example: il(5,

[ ])→

6 [0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with abasic

term of size

n

Basic Terms: defined symbol only at root il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n)

and rc(n)

∈ O(n)

(30)

Decreasing Loops

Generalizing

loops

to prove linear and

exponential lower bounds for rc(n).

Example: il(5,

[ ])→

6 [0,1,2,3,4]

il(s(x),

ys) →

il(x, cons(x,

ys))

il(0,

ys) → ys

rc(n): Length of longest derivation starting with abasic

term of size

n

Basic Terms: defined symbol only at root il(s(0), cons(x,

ys))X

il(x, il(0,

ys))8

Here:

rc(n)

Ω(n) and rc(n)

∈ O(n)

(31)

Loops

il(s(x),

ys) →

il(x, cons(x,

ys))

il(x,

ys) →

il(s(x), cons(x,

ys))

il(x,

ys)→

il(s(x),

cons(x,ys))→

il(s(s(x)),

cons(s(x),cons(x,ys)))→

. . .

t tσ

+

(32)

Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys) →

il(s(x), cons(x,

ys))

il(x,

ys)→

il(s(x),

cons(x,ys))→

il(s(s(x)),

cons(s(x),cons(x,ys)))→

. . .

t tσ

+

(33)

Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys) →

il(s(x), cons(x,

ys))

il(x,

ys)→

il(s(x),

cons(x,ys))

il(s(s(x)),

cons(s(x),cons(x,ys)))→

. . .

t tσ

+

(34)

Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys) →

il(s(x), cons(x,

ys))

il(x,

ys)→

il(s(x),

cons(x,ys))→

il(s(s(x)),

cons(s(x),cons(x,ys)))→

. . .

t tσ

+

(35)

Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys) →

il(s(x), cons(x,

ys))

il(x,

ys)→

il(s(x),

cons(x,ys))→

il(s(s(x)),

cons(s(x),cons(x,ys)))→

. . .

t tσ

+

(36)

Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys) →

il(s(x), cons(x,

ys))

il(x,

ys)→

il(s(x),

cons(x,ys))→

il(s(s(x)),

cons(s(x),cons(x,ys)))→

. . .

t tσ

+

(37)

Generalizing Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),

ys) →

il(x,

cons(x,ys))

θ: Pumping Substitution σ: Result Substitution

`: Base Term

=

(38)

Generalizing Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),

ys) →

il(x,

cons(x,ys))

θ: Pumping Substitution σ: Result Substitution

`: Base Term

=

(39)

Generalizing Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),

ys) →

il(x,

cons(x,ys))

θ: Pumping Substitution σ: Result Substitution

`: Base Term

=

(40)

Generalizing Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),

ys) →

il(x,

cons(x,ys))

θ: Pumping Substitution σ: Result Substitution

`: Base Term

=

(41)

Generalizing Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),

ys) →

il(x,

cons(x,ys))

θ: Pumping Substitution σ: Result Substitution

`: Base Term

=

(42)

Generalizing Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),

ys) →

il(x,

cons(x,ys))

θ: Pumping Substitution σ: Result Substitution

`: Base Term

=

(43)

Generalizing Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),

ys) →

il(x,

cons(x,ys))

θ: Pumping Substitution

σ: Result Substitution

`: Base Term

=

(44)

Generalizing Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),

ys) →

il(x,

cons(x,ys))

θ: Pumping Substitution σ: Result Substitution

`: Base Term

=

(45)

Generalizing Loops

il(s(x),ys) → il(x,cons(x,ys))

il(x,

ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),

ys) →

il(x,

cons(x,ys))

θ: Pumping Substitution σ: Result Substitution

`: Base Term

=

(46)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys) →

n = il(sn(x),cons(sn(x),ys)) →

n−2δ0 = il(sn−1(x),cons(sn−1(x), ...)) → . . .

`θn rθn = `σθn = `θnδ = `θn−1δ

(47)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys) →

n = il(sn(x),cons(sn(x),ys)) →

n−2δ0 = il(sn−1(x),cons(sn−1(x), ...)) → . . .

`θn

rθn = `σθn = `θnδ = `θn−1δ

(48)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys)

→ rθn = il(sn(x),cons(sn(x),ys)) →

n−2δ0 = il(sn−1(x),cons(sn−1(x), ...)) → . . .

`θn

rθn = `σθn = `θnδ = `θn−1δ

(49)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys) →

n

= il(sn(x),cons(sn(x),ys)) →

n−2δ0 = il(sn−1(x),cons(sn−1(x), ...)) → . . .

`θn rθn

= `σθn = `θnδ = `θn−1δ

(50)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys) →

n = il(sn(x),cons(sn(x),ys))

n−2δ0 = il(sn−1(x),cons(sn−1(x), ...)) → . . .

`θn rθn

= `σθn = `θnδ = `θn−1δ

(51)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys) →

n = il(sn(x),cons(sn(x),ys))

n−2δ0 = il(sn−1(x),cons(sn−1(x), ...)) → . . .

`θn rθn = `σθn

= `θnδ = `θn−1δ

(52)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys) →

n = il(sn(x),cons(sn(x),ys))

n−2δ0 = il(sn−1(x),cons(sn−1(x), ...)) → . . .

`θn rθn = `σθn = `θnδ

= `θn−1δ

(53)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys) →

n = il(sn(x),cons(sn(x),ys))

n−2δ0 = il(sn−1(x),cons(sn−1(x), ...)) → . . .

`θn rθn = `σθn = `θnδ

= `θn−1δ

(54)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys) →

n = il(sn(x),cons(sn(x),ys))

n−2δ0 = il(sn−1(x),cons(sn−1(x), ...)) → . . .

`θn rθn = `σθn = `θnδ = `θn−1δ

(55)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys) →

n−1δ = il(sn(x),cons(sn(x),ys))

n−2δ0 = il(sn−1(x),cons(sn−1(x), ...)) → . . .

`θn rθn = `σθn = `θnδ = `θn−1δ

(56)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys) →

n−1δ = il(sn(x),cons(sn(x),ys))

n−2δ0 = il(sn−1(x),cons(sn−1(x), ...)) → . . .

`θn rθn = `σθn = `θnδ = `θn−1δ

(57)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys) →

n−1δ = il(sn(x),cons(sn(x),ys)) →

n−2δ0 =

il(sn−1(x),cons(sn−1(x), ...))

→ . . .

`θn rθn = `σθn = `θnδ = `θn−1δ

(58)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys) →

n−1δ = il(sn(x),cons(sn(x),ys)) →

n−2δ0 = il(sn−1(x),cons(sn−1(x), ...))

→ . . .

`θn rθn = `σθn = `θnδ = `θn−1δ

(59)

Generalizing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

n = il(sn+1(x),ys) →

n−1δ = il(sn(x),cons(sn(x),ys)) →

n−2δ0 = il(sn−1(x),cons(sn−1(x), ...)) → . . .

`θn rθn = `σθn = `θnδ = `θn−1δ

(60)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(61)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(62)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(63)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(64)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(65)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(66)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(67)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(68)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(69)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(70)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(71)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(72)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(73)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x

1, . . . , xm

∈ V,π

1, . . . , πm

∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(74)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x1, . . . , xm∈ V,π1, . . . , πm∈ Poswith

`basic

and linear,r /∈ V

`|π

i

=x

i

r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(75)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x1, . . . , xm∈ V,π1, . . . , πm∈ Poswith

`basic

and linear,r /∈ V

`|πi =xi r|ξ

i

=x

i

for some ξ

i

< π

i

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(76)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x1, . . . , xm∈ V,π1, . . . , πm∈ Poswith

`basic

and linear,r /∈ V

`|πi =xi

r|ξi =xi for some ξi< πi

`=`[x

1

]ξ

1. . .[xm]ξm

matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(77)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x1, . . . , xm∈ V,π1, . . . , πm∈ Poswith

`basic

and linear,r /∈ V

`|πi =xi

r|ξi =xi for some ξi< πi

`=`[x1]ξ1. . .[xm]ξm matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(78)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x1, . . . , xm∈ V,π1, . . . , πm∈ Poswith

`basic

and linear,r /∈ V

`|πi =xi

r|ξi =xi for some ξi< πi

`=`[x1]ξ1. . .[xm]ξm matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(79)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x1, . . . , xm∈ V,π1, . . . , πm∈ Poswith

`basic

and linear,r /∈ V

`|πi =xi

r|ξi =xi for some ξi< πi

`=`[x1]ξ1. . .[xm]ξm matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(80)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x1, . . . , xm∈ V,π1, . . . , πm∈ Poswith

`basic and linear

,r /∈ V

`|πi =xi

r|ξi =xi for some ξi< πi

`=`[x1]ξ1. . .[xm]ξm matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(81)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x1, . . . , xm∈ V,π1, . . . , πm∈ Poswith

`basic and linear

,r /∈ V

`|πi =xi

r|ξi =xi for some ξi< πi

`=`[x1]ξ1. . .[xm]ξm matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(82)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x1, . . . , xm∈ V,π1, . . . , πm∈ Poswith

`basic and linear

,r /∈ V

`|πi =xi

r|ξi =xi for some ξi< πi

`=`[x1]ξ1. . .[xm]ξm matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(83)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+C[

r

]

x1, . . . , xm∈ V,π1, . . . , πm∈ Poswith

`basic and linear,r /∈ V

`|πi =xi

r|ξi =xi for some ξi< πi

`=`[x1]ξ1. . .[xm]ξm matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(84)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→

+

C[r]

x1, . . . , xm∈ V,π1, . . . , πm∈ Poswith

`basic and linear,r /∈ V

`|πi =xi

r|ξi =xi for some ξi< πi

`=`[x1]ξ1. . .[xm]ξm matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(85)

Decreasing Loops

il(x,ys)

{x/s(x)} 99K

L99 {ys/cons(x,ys)}

il(s(x),ys) il(x,cons(x,ys))

π ξ

Decreasing Loop

`→+C[r]

x1, . . . , xm∈ V,π1, . . . , πm∈ Poswith

`basic and linear,r /∈ V

`|πi =xi

r|ξi =xi for some ξi< πi

`=`[x1]ξ1. . .[xm]ξm matchesr

Theorem: Linear Bounds

If a TRS has a decreasing loop, then rc(n)

∈Ω(n).

Decreasing Loops?

f(s(x), x)

f(x, x)

8

f(x)

x

8

(86)

Exponential Bounds

decreasing loop: linear bound Ω(n)

context around variable xis removed in each step, same rewrite rule again applicable to rhs

dparallel decreasing loops: exponential boundΩ(dn)

Fibonacci

f( s(s(x)) )

plus(

f(s(x))

, f(x) )

Here:

rc(n)

Ω(2

n

)

f(sn−2(0)) . . .

%

f(sn−1(0)) → f(sn−3(0)) . . .

% f(sn(0))

&

f(sn−2(0)) → f(sn−3(0)) . . .

&

f(sn−4(0)) . . .

tr(nodem−2(x, x)) . . .

%

tr(nodem−1(x, x)) → tr(nodem−2(x, x)) . . .

% tr(nodem(x, x))

&

tr(nodem−1(x, x)) → tr(nodem−2(x, x)) . . .

&

tr(nodem−2(x, x)) . . .

Referenzen

ÄHNLICHE DOKUMENTE

Unless all transaction classes are sterile, each execution site must wait a small period of time (meant to account for network delays) for transactions

The in- stantiation, rewriting, and forward instantiation processors are analogous to the narrowing processor (i.e., they adapt the techniques of instantiating, rewriting, and

Techniques for automated innermost termination analysis of term rewriting are very powerful and have been successfully used to analyze termination of programs in many

new approach: direct adaption of DP framework (CADE ’11) modular combination of different techniques. automated and more powerful than

We present an automated approach to prove termination of Java Bytecode (JBC) programs by automatically transforming them to term rewrite systems (TRSs).. In this way, the

14 To avoid the need for considering infinitely many rules in the reduction pair processor and in order to handle ITRSs where defined symbols like + oc- cur on non-increasing

More precisely, we consider transformations from context-sensitive rewrite systems to ordinary term rewrite systems that are sound with respect to termination: termination of

[r]