complexity bounds for ordinal based termination
play

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


  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ˆ ome Leroux, Philippe Schnoebelen LSV, ENS Cachan & INRIA, France RP 2014, September 22nd 2014, Oxford 1/33

  2. Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability Outline termination proofs using ranking functions into ordinals complexity bounds on termination times ◮ exact bounds ◮ “simple” case compared to well-quasi-orders application: VAS Reachability 2/33

  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

  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

  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) Multiply-Recursive = F ∗ = � α<ω ω F α <ω ω lpo F ω ω rank < ω ω ω Primitive-Recursive Ackermannian sca = F ∗ = F ω = � k<ω F k <ω mpo dta rank < ω ω Elementary Tower = F 3 4/33

  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 Source: Beryl Turing and King’s College Library, Cambridge form of a quantity which is as- serted to decrease continually and vanish when the machine stops.” 5/33

  7. Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability Ranking Functions operational semantics of programs using transition systems S = � Conf , → S � well-order (wo) � A , � � , aka well-founded linear order: no infinite decreasing sequence x 0 > x 1 > ··· over A , e.g. ◮ � N , � � ◮ � A × B , � lex � for wo’s � A , � A � and � B , � B � , where ( n , m ) � lex ( n ′ , m ′ ) i ff n < A n ′ ∨ ( n = n ′ ∧ m � B m ′ ) 6/33

  8. Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability Ranking Functions operational semantics of programs using transition systems S = � Conf , → S � well-order (wo) � A , � � , aka well-founded linear order: no infinite decreasing sequence x 0 > x 1 > ··· over A ranking function f : Conf → A : c → S c ′ implies f ( c ) > f ( c ′ ) 6/33

  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

  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: b : a : assume(x > 0); assume(x=0); assume(y > 0); assume(y > 0); x := x − 1; x := n; ℓ 0 y := y − 1; n := 2n; n := 2n; 7/33

  11. Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability Example Ranking function: Program: ℓ 0 : while x > = 0 and y > 0 do f : { ℓ 0 } × Z 3 → � N 2 , � lex � i f x > 0 then a : x := x − 1; n := 2n ; f ( ℓ 0 , x , y , n ) = ( y , x ) else b : x := n ; y := y − 1; n := 2n ; done Transition system: b : a : assume(x > 0); assume(x=0); assume(y > 0); assume(y > 0); x := x − 1; x := n; ℓ 0 y := y − 1; n := 2n; n := 2n; 7/33

  12. Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability Example Ranking function: Program: ℓ 0 : while x > = 0 and y > 0 do f : { ℓ 0 } × Z 3 → � N 2 , � lex � x > 0 then i f a : x := x − 1; n := 2n ; f ( ℓ 0 , x , y , n ) = ( y , x ) else b : x := n ; y := y − 1; n := 2n ; done Termination time: Transition system: steps x y n a : b : 3 3 3 assume(x=0); assume(x > 0); 2 3 · 3 assume(y > 0); assume(y > 0); 0 3 aaa x := n; 2 3 · 3 2 4 · 3 = 48 x := x − 1; ℓ 0 b 2 n := 2n; y := y − 1; a 2 3 · 3 2 2 3 · 3 · 48 0 2 n := 2n; 2 2 3 · 3 · 48 2 2 3 · 3 · 96 b 1 a 2 23 · 3 · 48 0 1 ... b ... 0 ... 7/33

  13. Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability Example Ranking function: Program: ℓ 0 : while x > = 0 and y > 0 do f : { ℓ 0 } × Z 3 → � N 2 , � lex � x > 0 then i f a : x := x − 1; n := 2n ; f ( ℓ 0 , x , y , n ) = ( y , x ) else b : x := n ; y := y − 1; n := 2n ; done Termination time: Transition system: steps x y n a : b : 3 3 3 assume(x=0); assume(x > 0); 2 3 · 3 assume(y > 0); assume(y > 0); 0 3 aaa x := n; 2 3 · 3 2 4 · 3 = 48 x := x − 1; ℓ 0 b 2 n := 2n; y := y − 1; a 2 3 · 3 2 2 3 · 3 · 48 0 2 n := 2n; 2 2 3 · 3 · 48 2 2 3 · 3 · 96 b 1 a 2 23 · 3 · 48 0 1 ... b ... 0 ... 7/33

  14. Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability Example Ranking function: Program: ℓ 0 : while x > = 0 and y > 0 do f : { ℓ 0 } × Z 3 → � N 2 , � lex � x > 0 then i f a : x := x − 1; n := 2n ; f ( ℓ 0 , x , y , n ) = ( y , x ) else b : x := n ; y := y − 1; n := 2n ; done Termination time: Transition system: steps x y n a : b : 3 3 3 assume(x=0); assume(x > 0); 2 3 · 3 assume(y > 0); assume(y > 0); 0 3 aaa x := n; 2 3 · 3 2 4 · 3 = 48 x := x − 1; ℓ 0 b 2 n := 2n; y := y − 1; a 2 3 · 3 2 2 3 · 3 · 48 0 2 n := 2n; 2 2 3 · 3 · 48 2 2 3 · 3 · 96 b 1 a 2 23 · 3 · 48 0 1 ... b ... 0 ... 7/33

  15. Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability Example Ranking function: Program: ℓ 0 : while x > = 0 and y > 0 do f : { ℓ 0 } × Z 3 → � N 2 , � lex � x > 0 then i f a : x := x − 1; n := 2n ; f ( ℓ 0 , x , y , n ) = ( y , x ) else b : x := n ; y := y − 1; n := 2n ; done Termination time: Transition system: steps x y n a : b : 3 3 3 assume(x=0); assume(x > 0); 2 3 · 3 assume(y > 0); assume(y > 0); 0 3 aaa x := n; 2 3 · 3 2 4 · 3 = 48 x := x − 1; ℓ 0 b 2 n := 2n; y := y − 1; a 2 3 · 3 2 2 3 · 3 · 48 0 2 n := 2n; 2 2 3 · 3 · 48 2 2 3 · 3 · 96 b 1 a 2 23 · 3 · 48 0 1 ... b ... 0 ... 7/33

  16. Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability Example Ranking function: Program: ℓ 0 : while x > = 0 and y > 0 do f : { ℓ 0 } × Z 3 → � N 2 , � lex � x > 0 then i f a : x := x − 1; n := 2n ; f ( ℓ 0 , x , y , n ) = ( y , x ) else b : x := n ; y := y − 1; n := 2n ; done Termination time: Transition system: steps x y n a : b : 3 3 3 assume(x=0); assume(x > 0); 2 3 · 3 assume(y > 0); assume(y > 0); 0 3 aaa x := n; 2 3 · 3 2 4 · 3 = 48 x := x − 1; ℓ 0 b 2 n := 2n; y := y − 1; a 2 3 · 3 2 2 3 · 3 · 48 0 2 n := 2n; 2 2 3 · 3 · 48 2 2 3 · 3 · 96 b 1 a 2 23 · 3 · 48 0 1 ... b ... 0 ... 7/33

  17. Termination Proofs Ordinal Ranking Length Functions Subrecursive Functions VAS Reachability Example Ranking function: Program: ℓ 0 : while x > = 0 and y > 0 do f : { ℓ 0 } × Z 3 → � N 2 , � lex � x > 0 then i f a : x := x − 1; n := 2n ; f ( ℓ 0 , x , y , n ) = ( y , x ) else b : x := n ; y := y − 1; n := 2n ; done Termination time: non-elementary Transition system: steps x y n a : b : 3 3 3 assume(x=0); assume(x > 0); 2 3 · 3 assume(y > 0); assume(y > 0); 0 3 aaa x := n; 2 3 · 3 2 4 · 3 = 48 x := x − 1; ℓ 0 b 2 n := 2n; y := y − 1; a 2 3 · 3 2 2 3 · 3 · 48 0 2 n := 2n; 2 2 3 · 3 · 48 2 2 3 · 3 · 96 b 1 a 2 23 · 3 · 48 0 1 ... b ... 0 ... 7/33

  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- Source: Beryl Turing and King’s College Library, Cambridge serted to decrease continually and vanish when the machine stops. To the pure mathemati- cian it is natural to give an ordi- nal number.” 8/33

Recommend


More recommend