Complexity Bounds for Ordinal-Based Termination Sylvain Schmitz - - PowerPoint PPT Presentation

complexity bounds for ordinal based termination
SMART_READER_LITE
LIVE PREVIEW

Complexity Bounds for Ordinal-Based Termination Sylvain Schmitz - - PowerPoint PPT Presentation

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability Complexity Bounds for Ordinal-Based Termination Sylvain Schmitz with numerous colleagues: Sergio Abriola, Diego Figueira, Santiago Figueira, J


slide-1
SLIDE 1

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Complexity Bounds for Ordinal-Based Termination

Sylvain Schmitz

with numerous colleagues: Sergio Abriola, Diego Figueira, Santiago Figueira, J´ erˆ

  • me Leroux, Philippe Schnoebelen

LSV, ENS Cachan & INRIA, France RP 2014, September 22nd 2014, Oxford

1/33

slide-2
SLIDE 2

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Outline

termination proofs using ranking functions into

  • rdinals

complexity bounds on termination times

◮ exact bounds ◮ “simple” case compared to

well-quasi-orders application: VAS Reachability

2/33

slide-3
SLIDE 3

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Termination Proofs

multiset path orderings for term rewriting systems lexicographic path orderings for term rewriting systems size-change abstractions for first-order programs disjunctive termination arguments (aka Ramsey-based) ranking functions

3/33

slide-4
SLIDE 4

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Complexity from Termination Proofs

multiset path orderings for term rewriting systems Hofbauer (1992): primitive-recursive lexicographic path orderings for term rewriting systems Weiermann (1995): multiply-recursive size-change abstractions for first-order programs Ben-Amram (2002): multiply-recursive disjunctive termination arguments (aka Ramsey-based) Figueira et al. (2011): primitive-recursive also Berardi, Oliva, and Steila (2014) tomorrow morning ranking functions this talk

3/33

slide-5
SLIDE 5

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Complexity Classification

Hofbauer (1992); Weiermann (1995); Ben-Amram (2002); Figueira et al. (2011); Berardi et al. (2014)

Elementary Tower = F3 = F ∗

=

k<ω Fk

Primitive-Recursive Ackermannian = Fω Multiply-Recursive = F ∗

<ωω

=

α<ωω Fα

Fωω

···

lpo sca mpo dta rank < ωωω rank < ωω

4/33

slide-6
SLIDE 6

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Ranking Functions

Turing (1949)

“Finally the checker has to ver- ify that the process comes to an end. Here again he should be assisted by the programmer giv- ing a further definite assertion to be verified. This may take the form of a quantity which is as- serted to decrease continually and vanish when the machine stops.”

Source: Beryl Turing and King’s College Library, Cambridge 5/33

slide-7
SLIDE 7

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Ranking Functions

  • perational semantics of programs using

transition systems S = Conf,→S well-order (wo) A,, aka well-founded linear

  • rder: no infinite decreasing sequence

x0 > x1 > ··· over A , e.g.

◮ N, ◮ A × B,lex for wo’s A,A and

B,B, where (n,m) lex (n′,m′) iff n <A n′ ∨ (n = n′ ∧ m B m′)

6/33

slide-8
SLIDE 8

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Ranking Functions

  • perational semantics of programs using

transition systems S = Conf,→S well-order (wo) A,, aka well-founded linear

  • rder: no infinite decreasing sequence

x0 > x1 > ··· over A ranking function f:Conf → A: c →S c′ implies f(c) > f(c′)

6/33

slide-9
SLIDE 9

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Example

Program:

ℓ0: while x >= 0 and y > 0 do i f x > 0 then a: x := x−1; n := 2n ; else b: x := n ; y := y−1; n := 2n ; done

7/33

slide-10
SLIDE 10

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Example

Program:

ℓ0: while x >= 0 and y > 0 do i f x > 0 then a: x := x−1; n := 2n ; else b: x := n ; y := y−1; n := 2n ; done

Transition system:

ℓ0

a: assume(x>0); assume(y>0); x := x−1; n := 2n; b: assume(x=0); assume(y>0); x := n; y := y−1; n := 2n;

7/33

slide-11
SLIDE 11

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Example

Program:

ℓ0: while x >= 0 and y > 0 do i f x > 0 then a: x := x−1; n := 2n ; else b: x := n ; y := y−1; n := 2n ; done

Transition system:

ℓ0

a: assume(x>0); assume(y>0); x := x−1; n := 2n; b: assume(x=0); assume(y>0); x := n; y := y−1; n := 2n;

Ranking function: f:{ℓ0} × Z3 → N2,lex f(ℓ0,x,y,n) = (y,x)

7/33

slide-12
SLIDE 12

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Example

Program:

ℓ0: while x >= 0 and y > 0 do i f x > 0 then a: x := x−1; n := 2n ; else b: x := n ; y := y−1; n := 2n ; done

Transition system:

ℓ0

a: assume(x>0); assume(y>0); x := x−1; n := 2n; b: assume(x=0); assume(y>0); x := n; y := y−1; n := 2n;

Ranking function: f:{ℓ0} × Z3 → N2,lex f(ℓ0,x,y,n) = (y,x) Termination time:

steps x y n 3 3 3 aaa 3 23 · 3 b 23 · 3 2 24 · 3 = 48 a23·3 2 223·3 · 48 b 223·3 · 48 1 223·3 · 96 a223·3·48 1 ... b ... ...

7/33

slide-13
SLIDE 13

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Example

Program:

ℓ0: while x >= 0 and y > 0 do i f x > 0 then a: x := x−1; n := 2n ; else b: x := n ; y := y−1; n := 2n ; done

Transition system:

ℓ0

a: assume(x>0); assume(y>0); x := x−1; n := 2n; b: assume(x=0); assume(y>0); x := n; y := y−1; n := 2n;

Ranking function: f:{ℓ0} × Z3 → N2,lex f(ℓ0,x,y,n) = (y,x) Termination time:

steps x y n 3 3 3 aaa 3 23 · 3 b 23 · 3 2 24 · 3 = 48 a23·3 2 223·3 · 48 b 223·3 · 48 1 223·3 · 96 a223·3·48 1 ... b ... ...

7/33

slide-14
SLIDE 14

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Example

Program:

ℓ0: while x >= 0 and y > 0 do i f x > 0 then a: x := x−1; n := 2n ; else b: x := n ; y := y−1; n := 2n ; done

Transition system:

ℓ0

a: assume(x>0); assume(y>0); x := x−1; n := 2n; b: assume(x=0); assume(y>0); x := n; y := y−1; n := 2n;

Ranking function: f:{ℓ0} × Z3 → N2,lex f(ℓ0,x,y,n) = (y,x) Termination time:

steps x y n 3 3 3 aaa 3 23 · 3 b 23 · 3 2 24 · 3 = 48 a23·3 2 223·3 · 48 b 223·3 · 48 1 223·3 · 96 a223·3·48 1 ... b ... ...

7/33

slide-15
SLIDE 15

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Example

Program:

ℓ0: while x >= 0 and y > 0 do i f x > 0 then a: x := x−1; n := 2n ; else b: x := n ; y := y−1; n := 2n ; done

Transition system:

ℓ0

a: assume(x>0); assume(y>0); x := x−1; n := 2n; b: assume(x=0); assume(y>0); x := n; y := y−1; n := 2n;

Ranking function: f:{ℓ0} × Z3 → N2,lex f(ℓ0,x,y,n) = (y,x) Termination time:

steps x y n 3 3 3 aaa 3 23 · 3 b 23 · 3 2 24 · 3 = 48 a23·3 2 223·3 · 48 b 223·3 · 48 1 223·3 · 96 a223·3·48 1 ... b ... ...

7/33

slide-16
SLIDE 16

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Example

Program:

ℓ0: while x >= 0 and y > 0 do i f x > 0 then a: x := x−1; n := 2n ; else b: x := n ; y := y−1; n := 2n ; done

Transition system:

ℓ0

a: assume(x>0); assume(y>0); x := x−1; n := 2n; b: assume(x=0); assume(y>0); x := n; y := y−1; n := 2n;

Ranking function: f:{ℓ0} × Z3 → N2,lex f(ℓ0,x,y,n) = (y,x) Termination time:

steps x y n 3 3 3 aaa 3 23 · 3 b 23 · 3 2 24 · 3 = 48 a23·3 2 223·3 · 48 b 223·3 · 48 1 223·3 · 96 a223·3·48 1 ... b ... ...

7/33

slide-17
SLIDE 17

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Example

Program:

ℓ0: while x >= 0 and y > 0 do i f x > 0 then a: x := x−1; n := 2n ; else b: x := n ; y := y−1; n := 2n ; done

Transition system:

ℓ0

a: assume(x>0); assume(y>0); x := x−1; n := 2n; b: assume(x=0); assume(y>0); x := n; y := y−1; n := 2n;

Ranking function: f:{ℓ0} × Z3 → N2,lex f(ℓ0,x,y,n) = (y,x) Termination time: non-elementary

steps x y n 3 3 3 aaa 3 23 · 3 b 23 · 3 2 24 · 3 = 48 a23·3 2 223·3 · 48 b 223·3 · 48 1 223·3 · 96 a223·3·48 1 ... b ... ...

7/33

slide-18
SLIDE 18

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Ranking Functions

Turing (1949)

“Finally the checker has to ver- ify that the process comes to an end. Here again he should be assisted by the programmer giv- ing a further definite assertion to be verified. This may take the form of a quantity which is as- serted to decrease continually and vanish when the machine

  • stops. To the pure mathemati-

cian it is natural to give an ordi- nal number.”

Source: Beryl Turing and King’s College Library, Cambridge 8/33

slide-19
SLIDE 19

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Ordinals

◮ isomorphism classes of wo’s

  • (N,) = ω
  • (A × B,lex) = o(A,A) · o(B,B)

◮ set-theoretic

construction

α = {β | β < α}

◮ Cantor normal form

(CNF) below ε0

α = ωα1 · c1 + ··· + ωαm · cm with α > α1 > ··· > αm and 0 < c1,...,cm < ω

Public domain image (source: Wikipedia) 9/33

slide-20
SLIDE 20

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Example

Program:

ℓ0: while x >= 0 and y > 0 do i f x > 0 then a: x := x−1; n := 2n ; else b: x := n ; y := y−1; n := 2n ; done

Ranking function: f:{ℓ0} × Z3 → ω2 f(ℓ0,x,y,n) = ω · y + x

10/33

slide-21
SLIDE 21

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Complexity Bounds

◮ the existence of a ranking function f:Conf → α

proves termination

◮ two main ingredients:

◮ the ordinal α used as range ◮ the function f itself

◮ goal: bound the length of program executions ◮ idea: bound the length of decreasing

sequences in α

11/33

slide-22
SLIDE 22

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

The Length of Decreasing Sequences

◮ no upper bound in general

e.g. in N,: N > N − 1 > N − 2 > ··· > 1 > 0

◮ even with a bound on the first element

e.g. in N2,lex: (1,1) > (1,0) > (0,N) > ··· > (0,1) > (0,0)

12/33

slide-23
SLIDE 23

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

The Length of Decreasing Sequences

◮ no upper bound in general

e.g. in N,: N > N − 1 > N − 2 > ··· > 1 > 0

◮ even with a bound on the first element

e.g. in N2,lex: (1,1) > (1,0) > (0,N) > ··· > (0,1) > (0,0)

12/33

slide-24
SLIDE 24

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

The Length of Decreasing Sequences

◮ no upper bound in general

e.g. in N,: N > N − 1 > N − 2 > ··· > 1 > 0

◮ even with a bound on the first element

e.g. in N2,lex: (1,1) > (1,0) > (0,N) > ··· > (0,1) > (0,0) ω + 1 > ω > N > ··· > 1 > 0

12/33

slide-25
SLIDE 25

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Ordinal Norm

Buchholz et al. (1994)

N(ωα1·c1+···+ωαm·cm) = max

1im(max(N(αi),ci))

In the case of ωd, corresponds to infinite norm

  • ver Nd:

(c1,...,cd)∞ = max

1idci

13/33

slide-26
SLIDE 26

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Ordinal Norm

Buchholz et al. (1994)

N(ωα1·c1+···+ωαm·cm) = max

1im(max(N(αi),ci))

In the case of ωd, corresponds to infinite norm

  • ver Nd:

(c1,...,cd)∞ = max

1idci

13/33

slide-27
SLIDE 27

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Controlled Sequences

◮ g:N → N monotone a control function ◮ n0 ∈ N an initial norm and ι:Conf → N a norm

function on configurations

◮ a sequence β0,β1,... over α is (g,n0)-controlled

if ∀i.N(βi) gi(n0)

◮ f:Conf → α is (ι,g)-controlled if, for every

execution c0 →S c1 →S ··· in Conf,→S, the sequence f(c0),f(c1),... is (ι(c0),g)-controlled, i.e. if ∀i.N(f(ci)) gi(ι(c0))

14/33

slide-28
SLIDE 28

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Controlled Sequences

◮ g:N → N monotone a control function ◮ n0 ∈ N an initial norm and ι:Conf → N a norm

function on configurations

◮ a sequence β0,β1,... over α is (g,n0)-controlled

if ∀i.N(βi) gi(n0)

◮ f:Conf → α is (ι,g)-controlled if, for every

execution c0 →S c1 →S ··· in Conf,→S, the sequence f(c0),f(c1),... is (ι(c0),g)-controlled, i.e. if ∀i.N(f(ci)) gi(ι(c0))

14/33

slide-29
SLIDE 29

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Controlled Sequences

◮ g:N → N monotone a control function ◮ n0 ∈ N an initial norm and ι:Conf → N a norm

function on configurations

◮ a sequence β0,β1,... over α is (g,n0)-controlled

if ∀i.N(βi) gi(n0)

◮ f:Conf → α is (ι,g)-controlled if, for every

execution c0 →S c1 →S ··· in Conf,→S, the sequence f(c0),f(c1),... is (ι(c0),g)-controlled, i.e. if ∀i.N(f(ci)) gi(ι(c0))

14/33

slide-30
SLIDE 30

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Example

Program:

ℓ0: while x >= 0 and y > 0 do i f x > 0 then a: x := x−1; n := 2n ; else b: x := n ; y := y−1; n := 2n ; done

Ranking function: f:{ℓ0} × Z3 → ω2 f(ℓ0,x,y,n) = ω · y + x Control: ι(ℓ0,x,y,n) = max(x,y,n) g(x) = 2x

15/33

slide-31
SLIDE 31

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Length Functions

◮ (g,n0)-controlled decreasing sequences over α

are bounded; we note their maximal length Lα,g(n0)

◮ Descent Equation

Lα,g(n) = max

β<α,N(β)n1 + Lβ,g

  • g(n)
  • Proof idea.

Let β0 > β1 > β2 > ··· be (g,n)-controlled over α. Then β1 > β2 > ··· is (g,g(n))-controlled over β0. The longest sequence is thus

  • btained by maximising β0 < α among those with N(β0) n.

16/33

slide-32
SLIDE 32

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Length Functions

◮ (g,n0)-controlled decreasing sequences over α

are bounded; we note their maximal length Lα,g(n0)

◮ Descent Equation

Lα,g(n) = max

β<α,N(β)n1 + Lβ,g

  • g(n)
  • Proof idea.

Let β0 > β1 > β2 > ··· be (g,n)-controlled over α. Then β1 > β2 > ··· is (g,g(n))-controlled over β0. The longest sequence is thus

  • btained by maximising β0 < α among those with N(β0) n.

16/33

slide-33
SLIDE 33

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Subrecursive Functions

◮ goal: obtain explicit bounds for Lα,g ◮ goal: classification in complexity hierarchies ◮ use subrecursive functions indexed with ordinal

numbers

17/33

slide-34
SLIDE 34

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Fundamental Sequences

◮ for limit ordinals

λ = γ + ωβ for β > 0.

◮ sequence (λ(x))x<ω s.t.

∀x.λ(x) < λ and supxλ(x) = λ

◮ syntactic definition on

Cantor normal forms: (γ + ωβ+1)(x) = γ + ωβ · (x + 1) (γ + ωλ)(x) = γ + ωλ(x)

18/33

slide-35
SLIDE 35

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Hardy Hierarchy

◮ fix h:N → N monotone. ◮ Hardy hierarchy (hα:N → N)α

h0(x) = x , hα+1(x) = hα h(x)

  • , hλ(x) = hλ(x)(x) .

◮ “transfinite iteration” ◮ examples for H(x) = x + 1:

Hk(x) = x + k , Hω(x) = 2x + 1 , Hω2(x) = 2x+1 · (x + 1) − 1 , Hω3 ≈ tower , Hωω ≈ ackermann

19/33

slide-36
SLIDE 36

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Hardy Hierarchy

◮ fix h:N → N monotone. ◮ Hardy hierarchy (hα:N → N)α

h0(x) = x , hα+1(x) = hα h(x)

  • , hλ(x) = hλ(x)(x) .

◮ “transfinite iteration” ◮ examples for H(x) = x + 1:

Hk(x) = x + k , Hω(x) = 2x + 1 , Hω2(x) = 2x+1 · (x + 1) − 1 , Hω3 ≈ tower , Hωω ≈ ackermann

19/33

slide-37
SLIDE 37

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Hardy Hierarchy

◮ fix h:N → N monotone. ◮ Hardy hierarchy (hα:N → N)α

h0(x) = x , hα+1(x) = hα h(x)

  • , hλ(x) = hλ(x)(x) .

◮ “transfinite iteration” ◮ examples for H(x) = x + 1:

Hk(x) = x + k , Hω(x) = 2x + 1 , Hω2(x) = 2x+1 · (x + 1) − 1 , Hω3 ≈ tower , Hωω ≈ ackermann

19/33

slide-38
SLIDE 38

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Cicho ´ n Hierarchy

Cicho´ n and Tahhan Bittar (1998)

◮ Cicho´

n hierarchy (hα:N → N)α h0(x) = 0 , hα+1(x) = 1 + hα

  • h(x)
  • , hλ(x) = hλ(x)(x)

◮ “counts” iterations in Hardy functions:

hα(x) = hhα(x)(x)

◮ for h strictly monotone,

hα(x) hα(x) + x

20/33

slide-39
SLIDE 39

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Cicho ´ n Hierarchy

Cicho´ n and Tahhan Bittar (1998)

◮ Cicho´

n hierarchy (hα:N → N)α h0(x) = 0 , hα+1(x) = 1 + hα

  • h(x)
  • , hλ(x) = hλ(x)(x)

◮ “counts” iterations in Hardy functions:

hα(x) = hhα(x)(x)

◮ for h strictly monotone,

hα(x) hα(x) + x

20/33

slide-40
SLIDE 40

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Cicho ´ n Hierarchy

Cicho´ n and Tahhan Bittar (1998)

◮ Cicho´

n hierarchy (hα:N → N)α h0(x) = 0 , hα+1(x) = 1 + hα

  • h(x)
  • , hλ(x) = hλ(x)(x)

◮ “counts” iterations in Hardy functions:

hα(x) = hhα(x)(x)

◮ for h strictly monotone,

hα(x) hα(x) + x

20/33

slide-41
SLIDE 41

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Ordinal Norm

Buchholz et al. (1994)

N(ωα1·c1+···+ωαm·cm) = max

1im(max(N(αi),ci))

In the case of ωd, corresponds to infinite norm

  • ver Nd:

(c1,...,cd)∞ = max

1idci

Monotonicity: if N(β) x and β < β′, then hβ(x) hβ′(x) hβ(x) hβ′(x)

21/33

slide-42
SLIDE 42

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Predecessors

◮ of ordinals > 0:

Px(α + 1) = α , Px(λ) = Px(λ(x)) .

◮ for α > 0:

hα(x) = 1 + hPx(α)

  • h(x)
  • .

◮ if N(α) x, then

Px(α) = max{β < α | N(β) x}

◮ if N(α) x, then

hα(x) = max

β<α,N(β)x1 + hβ

  • h(x)
  • 22/33
slide-43
SLIDE 43

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Predecessors

◮ of ordinals > 0:

Px(α + 1) = α , Px(λ) = Px(λ(x)) .

◮ for α > 0:

hα(x) = 1 + hPx(α)

  • h(x)
  • .

◮ if N(α) x, then

Px(α) = max{β < α | N(β) x}

◮ if N(α) x, then

hα(x) = max

β<α,N(β)x1 + hβ

  • h(x)
  • 22/33
slide-44
SLIDE 44

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Predecessors

◮ of ordinals > 0:

Px(α + 1) = α , Px(λ) = Px(λ(x)) .

◮ for α > 0:

hα(x) = 1 + hPx(α)

  • h(x)
  • .

◮ if N(α) x, then

Px(α) = max{β < α | N(β) x}

◮ if N(α) x, then

hα(x) = max

β<α,N(β)x1 + hβ

  • h(x)
  • 22/33
slide-45
SLIDE 45

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Predecessors

◮ of ordinals > 0:

Px(α + 1) = α , Px(λ) = Px(λ(x)) .

◮ for α > 0:

hα(x) = 1 + hPx(α)

  • h(x)
  • .

◮ if N(α) x, then

Px(α) = max{β < α | N(β) x}

◮ if N(α) x, then

hα(x) = max

β<α,N(β)x1 + hβ

  • h(x)
  • 22/33
slide-46
SLIDE 46

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Length Function Theorem

Theorem

If N(α) n, then Lα,g(n) = gα(n).

Corollary

If f:Conf → α is a (ι,g)-controlled ranking function for S = Conf,→S, and c0 is an initial configuration in Conf, then S terminates from c0 in time O(gα(ι(c0)).

23/33

slide-47
SLIDE 47

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Example

Program:

ℓ0: while x >= 0 and y > 0 do i f x > 0 then a: x := x−1; n := 2n ; else b: x := n ; y := y−1; n := 2n ; done

Ranking function: f:{ℓ0} × Z3 → ω2 f(ℓ0,x,y,n) = ω · y + x Control: ι(ℓ0,x,y,n) = max(x,y,n) g(x) = 2x Actual complexity: gω·y+x(n) gω2(ι(ℓ0,x,y,n))

24/33

slide-48
SLIDE 48

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Complexity Classification

Elementary Tower = F3 = F ∗

=

k<ω Fk

Primitive-Recursive Ackermannian = Fω Multiply-Recursive = F ∗

<ωω

=

α<ωω Fα

Fωω

···

lpo sca mpo dta rank < ωωω rank < ωω

25/33

slide-49
SLIDE 49

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Complexity Classification

Wainer (1970)

Elementary Tower = F3 = F ∗

=

k<ω Fk

Primitive-Recursive Ackermannian = Fω Multiply-Recursive = F ∗

<ωω

=

α<ωω Fα

Fωω

···

lpo sca mpo dta rank < ωωω rank < ωω F ∗

def

=

  • β<ωα

DTime

  • Hβ(n)
  • 25/33
slide-50
SLIDE 50

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Complexity Classification

Wainer (1970)

Elementary Tower = F3 = F ∗

=

k<ω Fk

Primitive-Recursive Ackermannian = Fω Multiply-Recursive = F ∗

<ωω

=

α<ωω Fα

Fωω

···

lpo sca mpo dta rank < ωωω rank < ωω F<α

def

=

  • β<ωα

DTime

  • Hβ(n)
  • assuming prim. rec. (ι,g)

25/33

slide-51
SLIDE 51

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

An Application

◮ very high bounds in general: interesting for

complex algorithms

◮ provide the first known upper bound on VAS

Reachability through the decomposition algorithms of Mayr (1981); Kosaraju (1982); Lambert (1992)

◮ work in progress with J´

erˆ

  • me Leroux

26/33

slide-52
SLIDE 52

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Vector Addition Systems

◮ a VAS V = d,T,v0

◮ d ∈ N dimension ◮ T ⊆ Zd finite set of transitions ◮ v0 ∈ Nd initial vector

◮ operational semantics: Nd,→V where v → v′ if

v′ − v ∈ T.

◮ reachability problem: given V and vf ∈ Nd, does

v0 →∗

V vf?

27/33

slide-53
SLIDE 53

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Vector Addition Systems

◮ a VAS V = d,T,v0

◮ d ∈ N dimension ◮ T ⊆ Zd finite set of transitions ◮ v0 ∈ Nd initial vector

◮ operational semantics: Nd,→V where v → v′ if

v′ − v ∈ T.

◮ reachability problem: given V and vf ∈ Nd, does

v0 →∗

V vf?

27/33

slide-54
SLIDE 54

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

VAS Chains (informally)

Kosaraju (1982) vin 1

C1

R1 vout 1 vin 2

C2

R2 vout 2 vin n

Cn

Rn vout n

◮ strongly connected components Ci ◮ input vector vin

i and output vector vout i

in (N ⊎ {⋆})d

◮ labelled using transitions from T ◮ rigid set Ri s.t. ∀u label in Ci and ∀1 j d,

u(j) = 0

28/33

slide-55
SLIDE 55

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

VAS Chains (informally)

Kosaraju (1982) vin 1

C1

R1 vout 1 vin 2

C2

R2 vout 2 vin n

Cn

Rn vout n

◮ θ conditions to ensure existence of a run,

among which

◮ transition counts unbounded ◮ ⋆-components of input/output vectors unbounded ◮ ... 28/33

slide-56
SLIDE 56

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Decomposing VAS Chains

Kosaraju (1982)

Initial

v0 R = ∅ vf

∀t ∈ T

Example: Bounded Transition

vin i

Ci

Ri vout i u

vin i

Ci \ {u}

Ri vin i ↾ Ri vin i ↾ Ri

Ci \ {u}

Ri vout i

u u

29/33

slide-57
SLIDE 57

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Termination

Kosaraju (1982)

◮ associate with each component Ci a triple in

[d] × N × [2d]

  • 1. d − |Ri| the number of non-rigid components
  • 2. |Ci| the number of arcs
  • 3. total number of ⋆’s in vin

i and vout i

◮ associate with a VAS chain the corresponding

multiset of triples

◮ ranking function into ωd·ω·2d

30/33

slide-58
SLIDE 58

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Termination

Kosaraju (1982)

◮ associate with each component Ci a triple in

[d] × N × [2d]

  • 1. d − |Ri| the number of non-rigid components
  • 2. |Ci| the number of arcs
  • 3. total number of ⋆’s in vin

i and vout i

◮ associate with a VAS chain the corresponding

multiset of triples

◮ ranking function into ωd·ω·2d

30/33

slide-59
SLIDE 59

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Controlling Decompositions

Figueira et al. (2011)

Use Length Function Theorem for Dickson’s Lemma (Figueira et al., 2011) to control bounded values during decomposition: h(x) = Hωd+1(x) Then overall bound on complexity

  • Hωd+1ωd·ω·2d

(v0 + vf) Hωω2 (e(n)) for some elementary function e and an instance

  • f size n.

31/33

slide-60
SLIDE 60

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Regarding VAS Reachability

cons

◮ huge gap with ExpSpace lower bound ◮ non primitive-recusive upper bound,

even for fixed dimension d pros

◮ very simple complexity argument: the

algorithm and the ranking function were already provided by Kosaraju (1982)

◮ illustrates the power of length

function theorems

32/33

slide-61
SLIDE 61

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Concluding Remarks

◮ Length Function Theorem for ordinals below ε0 ◮ crucial use of the Cicho´

n hierarchy and ordinal norms

◮ bounds on complexity of programs with ordinal

ranking functions

◮ beyond ordinals: well-quasi-orders

◮ many results already: McAloon (1984); Clote (1986);

Weiermann (1994); Cicho´ n and Tahhan Bittar (1998); Figueira et al. (2011); S. and Schnoebelen (2011); Abriola et al. (2012)

◮ how to relate maximal order types to length functions in

general?

33/33

slide-62
SLIDE 62

Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability

Concluding Remarks

◮ Length Function Theorem for ordinals below ε0 ◮ crucial use of the Cicho´

n hierarchy and ordinal norms

◮ bounds on complexity of programs with ordinal

ranking functions

◮ beyond ordinals: well-quasi-orders

◮ many results already: McAloon (1984); Clote (1986);

Weiermann (1994); Cicho´ n and Tahhan Bittar (1998); Figueira et al. (2011); S. and Schnoebelen (2011); Abriola et al. (2012)

◮ how to relate maximal order types to length functions in

general?

33/33

slide-63
SLIDE 63

References

Complexity Classification

Wainer (1970); S. (2013)

Elementary Tower = F3 = F ∗

=

k<ω Fk

Primitive-Recursive Ackermannian = Fω Multiply-Recursive = F ∗

<ωω

=

α<ωω Fα

Fωω

···

lpo sca mpo dta rank < ωωω rank < ωω F<α

def

=

  • β<ωα

FDTime

  • Hβ(n)
  • ,

def

=

  • p∈F<α

DTime

  • Hωα(p(n))
  • 34/33
slide-64
SLIDE 64

References Abriola, S., Figueira, S., and Senno, G., 2012. Linearizing bad sequences: upper bounds for the product and majoring well quasi-orders. In WoLLIC 2012, vol. 7456 of LNCS, pp. 110–126.

  • Springer. doi:10.1007/978-3-642-32621-9 9.

Ben-Amram, A.M., 2002. General size-change termination and lexicographic descent. In The Essence of Computation, vol. 2566 of LNCS, pp. 3–17. Springer. doi:10.1007/3-540-36377-7 1. Berardi, S., Oliva, P ., and Steila, S., 2014. Proving termination with transition invariants of height

  • mega. Preprint. arXiv:1407.4692[cs.LO].

Buchholz, W., Cicho´ n, E.A., and Weiermann, A., 1994. A uniform approach to fundamental sequences and

  • hierarchies. Math. Logic Quart., 40(2):273–286.

doi:10.1002/malq.19940400212. Cicho´ n, E.A. and Tahhan Bittar, E., 1998. Ordinal recursive bounds for Higman’s Theorem. Theor.

  • Comput. Sci., 201(1–2):63–84.

doi:10.1016/S0304-3975(97)00009-1. Clote, P ., 1986. On the finite containment problem for Petri nets. Theor. Comput. Sci., 43:99–105. doi:10.1016/0304-3975(86)90169-6. Cook, B., Podelski, A., and Rybalchenko, A., 2011. Proving program termination. Communications of the ACM, 54(5):88–98. doi:10.1145/1941487.1941509. Figueira, D., Figueira, S., Schmitz, S., and Schnoebelen, Ph., 2011. Ackermannian and primitive-recursive bounds with Dickson’s Lemma. In LICS 2011, pp. 269–278. IEEE. doi:10.1109/LICS.2011.39. Hofbauer, D., 1992. Termination proofs by multiset path

  • rderings imply primitive recursive derivation
  • lengths. Theor. Comput. Sci., 105(1):129–140.

doi:10.1016/0304-3975(92)90289-R. Kosaraju, S.R., 1982. Decidability of reachability in vector addition systems. In STOC ’82, pp. 267–281. ACM. doi:10.1145/800070.802201. Lambert, J.L., 1992. A structure to decide reachability in Petri nets. Theor. Comput. Sci., 99(1):79–104. doi:10.1016/0304-3975(92)90173-D. Mayr, E.W., 1981. An algorithm for the general Petri net reachability problem. In STOC’81, pp. 238–246.

  • ACM. doi:10.1145/800076.802477.

McAloon, K., 1984. Petri nets and large finite sets.

  • Theor. Comput. Sci., 32(1–2):173–183.

doi:10.1016/0304-3975(84)90029-X. Schmitz, S. and Schnoebelen, Ph., 2011. Multiply-recursive upper bounds with Higman’s

  • Lemma. In ICALP 2011, vol. 6756 of LNCS, pp.

441–452. Springer. doi:10.1007/978-3-642-22012-8 35. Schmitz, S., 2013. Complexity hierarchies beyond

  • Elementary. Preprint. arXiv:1312.5686[cs.CC].

Turing, A.M., 1949. Checking a large routine. In EDSAC 1949, pp. 67–69. Wainer, S.S., 1970. A classification of the ordinal recursive functions. Arch. Math. Logic, 13(3): 136–153. doi:10.1007/BF01973619. Weiermann, A., 1994. Complexity bounds for some finite forms of Kruskal’s Theorem. J. Symb. Comput., 18(5):463–488. doi:10.1006/jsco.1994.1059. Weiermann, A., 1995. Termination proofs for term rewriting systems by lexicographic path orderings imply multiply recursive derivation lengths. Theor.

  • Comput. Sci., 139(1–2):355–362.

doi:10.1016/0304-3975(94)00135-6. 35/33