o
play

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


  1. 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

  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 ∗ 2/16 ps

  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 ∗ 2/16 ps

  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 ∗ 3/16 ps

  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 ∗ 3/16 ps

  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 ∗ 3/16 ps

  7. Automatic Complexity Analysis The Primitive Recursive Functions ◮ initial functions 0, s , Π k i ◮ composition f ( � x ) = g ( h 1 ( � x ) , . . . , h m ( � x )) ◮ primitive recursion f ( z + 1 ,� x ) = g ( � x ) f ( z + 1 ,� x ) = h ( z ,� x , f ( z ,� x )) MA (ICS @ UIBK) POP ∗ 4/16 ps

  8. Automatic Complexity Analysis The Primitive Recursive Functions ◮ initial functions ε , s 0 , s 1 , Π k i ◮ composition f ( � x ) = g ( h 1 ( � x ) , . . . , h m ( � x )) ◮ primitive recursion on notation f ( ε,� x ) = g ( � x ) f ( z · i ,� x ) = h i ( z ,� x , f ( z ,� x )) , i ∈ { 0 , 1 } MA (ICS @ UIBK) POP ∗ 4/16 ps

  9. Automatic Complexity Analysis The Primitive Recursive Functions ◮ initial functions ε , s 0 , s 1 , Π k i ◮ composition f ( � x ) = g ( h 1 ( � x ) , . . . , h m ( � x )) ◮ primitive recursion on notation f ( ε,� x ) = g ( � x ) f ( z · i ,� x ) = h i ( z ,� x , f ( z ,� x )) , i ∈ { 0 , 1 } dup ( ε ) = ε exp ( ε ) = s 1 ( ε ) dup ( x · i ) = s i ( s i ( dup ( x )) exp ( x · i ) = dup ( exp ( x )) MA (ICS @ UIBK) POP ∗ 4/16 ps

  10. Automatic Complexity Analysis Bellantoni and Cook’s Definition of BC ◮ initial functions ε , s 0 , s 1 , Π k i , . . . ◮ composition f ( � x ) = g ( h 1 ( � x ) , . . . , h m ( � x )) ◮ predicative recursion on notation f ( ε,� x ; � y ) = g ( � x ; � y ) f ( z · i ,� x ; � y ) = h i ( z ,� x ; � y , f ( z ,� x ; � y )) , i ∈ { 0 , 1 } f ( x 1 , . . . , x m ; y 1 , . . . , y n ) � �� � � �� � normal safe MA (ICS @ UIBK) POP ∗ 5/16 ps

  11. Automatic Complexity Analysis Bellantoni and Cook’s Definition of BC ◮ initial functions ε , s 0 , s 1 , Π k i , . . . ◮ predicative composition f ( � x ; � y ) = g ( n 1 ( � x ; ) , . . . , n j ( � x ; ); s 1 ( � x ; � y ) , . . . , s k ( � x ; � y )) ◮ predicative recursion on notation f ( ε,� x ; � y ) = g ( � x ; � y ) f ( z · i ,� x ; � y ) = h i ( z ,� x ; � y , f ( z ,� x ; � y )) , i ∈ { 0 , 1 } f ( x 1 , . . . , x m ; y 1 , . . . , y n ) � �� � � �� � normal safe MA (ICS @ UIBK) POP ∗ 5/16 ps

  12. Automatic Complexity Analysis Bellantoni and Cook’s Definition of BC ◮ initial functions ε , s 0 , s 1 , Π k i , . . . ◮ predicative composition f ( � x ; � y ) = g ( n 1 ( � x ; ) , . . . , n j ( � x ; ); s 1 ( � x ; � y ) , . . . , s k ( � x ; � y )) ◮ predicative recursion on notation f ( ε,� x ; � y ) = g ( � x ; � y ) f ( z · i ,� x ; � y ) = h i ( z ,� x ; � y , f ( z ,� x ; � y )) , i ∈ { 0 , 1 } Theorem BC = FP polytime computable functions MA (ICS @ UIBK) POP ∗ 5/16 ps

  13. Automatic Complexity Analysis Bellantoni and Cook’s Definition of BC ◮ initial functions ε , s 0 , s 1 , Π k i , . . . ◮ predicative composition f ( � x ; � y ) = g ( n 1 ( � x ; ) , . . . , n j ( � x ; ); s 1 ( � x ; � y ) , . . . , s k ( � x ; � y )) ◮ predicative recursion on notation f ( ε,� x ; � y ) = g ( � x ; � y ) f ( z · i ,� x ; � y ) = h i ( z ,� x ; � y , f ( z ,� x ; � y )) , i ∈ { 0 , 1 } dup ( ε ) = ε exp ( ε ) = s 1 ( ε ) dup ( x · i ) = s i ( s i ( dup ( x ))) exp ( x · i ) = dup ( exp ( x )) MA (ICS @ UIBK) POP ∗ 5/16 ps

  14. Automatic Complexity Analysis Bellantoni and Cook’s Definition of BC ◮ initial functions ε , s 0 , s 1 , Π k i , . . . ◮ predicative composition f ( � x ; � y ) = g ( n 1 ( � x ; ) , . . . , n j ( � x ; ); s 1 ( � x ; � y ) , . . . , s k ( � x ; � y )) ◮ predicative recursion on notation f ( ε,� x ; � y ) = g ( � x ; � y ) f ( z · i ,� x ; � y ) = h i ( z ,� x ; � y , f ( z ,� x ; � y )) , i ∈ { 0 , 1 } dup ( ε ;) = ε exp ( ε ) = s 1 (; ε ) dup ( x · i ;) = s i (; s i (; dup ( x ;))) exp ( x · i ) = dup ( exp ( x );) MA (ICS @ UIBK) POP ∗ 5/16 ps

  15. Automatic Complexity Analysis Bellantoni and Cook’s Definition of BC ◮ initial functions ε , s 0 , s 1 , Π k i , . . . ◮ predicative composition f ( � x ; � y ) = g ( n 1 ( � x ; ) , . . . , n j ( � x ; ); s 1 ( � x ; � y ) , . . . , s k ( � x ; � y )) ◮ predicative recursion on notation f ( ε,� x ; � y ) = g ( � x ; � y ) f ( z · i ,� x ; � y ) = h i ( z ,� x ; � y , f ( z ,� x ; � y )) , i ∈ { 0 , 1 } dup ( ε ;) = ε exp ( ε ) = s 1 (; ε ) dup ( x · i ;) = s i (; s i (; dup ( x ;))) exp ( x · i ) = dup ( exp ( x );) MA (ICS @ UIBK) POP ∗ 5/16 ps

  16. Automatic Complexity Analysis by Rewriting Automatic Complexity Analysis by Rewriting dup ( ε ) = ε exp ( ε ) = s 1 ( ε ) dup ( x · i ) = s i ( s i ( dup ( x ))) exp ( x · i ) = dup ( exp ( x )) ⇓ dup( ǫ ) → ǫ exp( ǫ ) → s 1 ( ǫ ) dup(s i ( x )) → s i (s i (dup( x ))) exp(s i ( x )) → dup(exp( x )) MA (ICS @ UIBK) POP ∗ 6/16 ps

  17. Automatic Complexity Analysis by Rewriting Automatic Complexity Analysis by Rewriting dup ( ε ) = ε exp ( ε ) = s 1 ( ε ) dup ( x · i ) = s i ( s i ( dup ( x ))) exp ( x · i ) = dup ( exp ( x )) ⇓ dup( ǫ ) → ǫ exp( ǫ ) → s 1 ( ǫ ) dup(s i ( x )) → s i (s i (dup( x ))) exp(s i ( x )) → dup(exp( x )) → ! f ( w 1 , . . . , w n ) = v ⇐ ⇒ f( � w 1 � , . . . , � w n � ) − R � v � computation MA (ICS @ UIBK) POP ∗ 6/16 ps

  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 ∗ 7/16 ps

  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 dc R ( n ) = dl( n , T ( F , V ) , − → R ) ◮ runtime complexity rc R ( n ) = dl( n , T b , − → R ) T b := { f ( c 1 , . . . , c n ) | f ∈ D and c i ∈ T ( C , V ) } MA (ICS @ UIBK) POP ∗ 7/16 ps

  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 dc R ( n ) = dl( n , T ( F , V ) , − → R ) ◮ innermost runtime complexity i rc i − → R ) R ( n ) = dl( n , T b , T b := { f ( c 1 , . . . , c n ) | f ∈ D and c i ∈ T ( C , V ) } MA (ICS @ UIBK) POP ∗ 7/16 ps

  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 ∗ ⇒ rc i R polynomially bounded for constructor TRS R MA (ICS @ UIBK) POP ∗ 8/16 ps

  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 ∗ ⇒ rc i R polynomially bounded for constructor TRS R rev( xs ; ) → rev tl ( xs ; [ ]) rev tl ([ ]; ys ) → ys rev tl ( x : xs ; ys ) → rev tl ( xs ; x : ys ) MA (ICS @ UIBK) POP ∗ 8/16 ps

Recommend


More recommend