o
play

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


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

  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

  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

  4. Introduction . . . direct techniques Polynomial Path (Automatic) Orders Complexity Analysis . . . by Rewriting Weak transformation Dependency techniques Pairs . . . . . . MA (ICS @ UIBK) Dependency Pairs and POP ∗ 3/17

  5. Introduction . . . direct techniques Polynomial Path (Automatic) Orders Complexity Analysis . . . by Rewriting Weak transformation Dependency techniques Pairs . . . . . . MA (ICS @ UIBK) Dependency Pairs and POP ∗ 3/17

  6. Introduction Term Rewriting TRS R bits 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

  7. Introduction Term Rewriting TRS R bits 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

  8. Introduction Term Rewriting TRS R bits 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

  9. Introduction Term Rewriting TRS R bits 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

  10. Introduction Term Rewriting TRS R bits 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

  11. Introduction Term Rewriting TRS R bits 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

  12. Introduction Term Rewriting TRS R bits 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 )))) confluent and terminating bits(s(s(0))) − → R s(bits(s(half(0)))) − → R s(bits(s(0))) − → R s(s(0)) constructor TRS → ! bits( n ) = v ⇐ ⇒ bits( � n � ) − R � v � computation MA (ICS @ UIBK) Dependency Pairs and POP ∗ 4/17

  13. Introduction Term Rewriting TRS R bits 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 )))) confluent and terminating bits(s(s(0))) − → R s(bits(s(half(0)))) − → R s(bits(s(0))) − → R s(s(0)) constructor TRS → ! bits( n ) = v ⇐ ⇒ bits( � n � ) − R � v � = � log( n + 1) � computation MA (ICS @ UIBK) Dependency Pairs and POP ∗ 4/17

  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

  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 dc R ( n ) = dl( n , T , − → R ) MA (ICS @ UIBK) Dependency Pairs and POP ∗ 5/17

  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 dc R ( n ) = dl( n , T , − → R ) capture complexity of computed functions ◮ runtime complexity rc R ( n ) = dl( n , B , − → R ) B := { f ( v 1 , . . . , v n ) | f defined, v i build from constructors } MA (ICS @ UIBK) Dependency Pairs and POP ∗ 5/17

  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 dc R ( n ) = dl( n , T , − → R ) avoid duplication of redexes ◮ innermost runtime complexity i rc i R ( n ) = dl( n , B , → R ) − B := { f ( v 1 , . . . , v n ) | f defined, v i build from constructors } MA (ICS @ UIBK) Dependency Pairs and POP ∗ 5/17

  18. Polynomial Path Orders Polynomial Path Orders > pop ∗ ◮ > pop ∗ ⊆ > mpo Theorem (A, Moser 2008) R ⊆ > pop ∗ ⇒ rc i R polynomially bounded MA (ICS @ UIBK) Dependency Pairs and POP ∗ 6/17

  19. Polynomial Path Orders Polynomial Path Orders > pop ∗ ◮ > pop ∗ ⊆ > mpo ◮ > pop ∗ ≈ > mpo ∩ predicative recursion Predicative Recursion [Bellantoni, Cook 1992] 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 Theorem (A, Moser 2008) R ⊆ > pop ∗ ⇒ rc i R polynomially bounded MA (ICS @ UIBK) Dependency Pairs and POP ∗ 6/17

  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 ∗ ⇒ rc i R polynomially bounded MA (ICS @ UIBK) Dependency Pairs and POP ∗ 6/17

  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 i 1. s − → R t ⇒ I ( s ) > I ( t ) Theorem (A, Moser 2008) R ⊆ > pop ∗ ⇒ rc i R polynomially bounded MA (ICS @ UIBK) Dependency Pairs and POP ∗ 6/17

  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 i 1. s − → 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 ∗ ⇒ rc i R polynomially bounded MA (ICS @ UIBK) Dependency Pairs and POP ∗ 6/17

  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

  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

  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

  26. Dependency Pairs for Complexity Analysis Dependency Pairs for Complexity Analysis � t if t a variable t ♯ = f ♯ ( t 1 , . . . , t n ) if t = f ( t 1 , . . . , t n ) WIDP( R ) = { l ♯ → c( r ♯ 1 , . . . r ♯ n ) | l → C [ r 1 , . . . , r n ] ∈ 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

  27. Dependency Pairs for Complexity Analysis Dependency Pairs for Complexity Analysis � t if t a variable t ♯ = f ♯ ( t 1 , . . . , t n ) if t = f ( t 1 , . . . , t n ) WIDP( R ) = { l ♯ → c( r ♯ 1 , . . . r ♯ n ) | l → C [ r 1 , . . . , r n ] ∈ R} ◮ C maximal context built from constructors and variables ◮ c fresh compound symbol (but we set c( t ) = t ) TRS R WIDP( R ) f ♯ (0) → c 1 f(0) → 0 f ♯ (s( x )) → c 2 (f ♯ ( x ) , f ♯ ( x )) f(s( x )) → d(f( x ) , f( x )) MA (ICS @ UIBK) Dependency Pairs and POP ∗ 8/17

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend