on confluence of innermost terminating term rewriting
play

On Confluence of Innermost Terminating Term Rewriting Systems - PowerPoint PPT Presentation

On Confluence of Innermost Terminating Term Rewriting Systems Masahiko Sakai (Nagoya University) joint work with Sayaka Ishizuki, Michio Oyamaguchi Sep. 9, 2017, IFIP WG 1.6, Oxford 1 This talk Background: - Open problems on


  1. On Confluence of Innermost Terminating Term Rewriting Systems Masahiko Sakai (Nagoya University) joint work with Sayaka Ishizuki, Michio Oyamaguchi Sep. 9, 2017, IFIP WG 1.6, Oxford 1

  2. This talk • Background: - Open problems on confluence for inner- most terminating TRSs • Tackling the open problem in negative direc- tion - A simple proof of undecidability of ground confluence for terminating TRSs • Sufficient conditions of confluence for inner- most terminating TRSs 2

  3. Confluence for terminating TRSs • Well-known result of [KB’70] : for SN( → R ) CP R ⊆ ∗ → R · ∗ ← R iff CR( → R ) • Notations: SN( → ) : → is terminating CR( → ) : → is Church-Rosser ( ∗ → ⊆ ∗ → · ∗ ← ← ) Conf( → ) : → is confluent ( ∗ ← · ∗ → ⊆ ∗ → · ∗ ← ) NF( → ) : the set of normal forms CP R : the set of critical pairs of R 3

  4. Critical pairs • Ex. R = { h ( k ( x )) → f ( x ) , k ( c ) → d } h ( d ) ← R h ( k ( c )) → R f ( c ) CP R = { ( h ( d ) , f ( c )) } • Formally, for ℓ → r, ℓ ′ → r ′ ∈ R (no common variables), let θ = mgu( ℓ | p , ℓ ′ ) for some pos. p , i.e. ℓθ [ r ′ θ ] p ← R ℓθ [ ℓ ′ θ ] p = ℓθ → R rθ Then ( ℓθ [ r ′ θ ] p , rθ ) is a critical pair 4

  5. Confluence for terminating TRSs • Well-known result of [KB’70] : for SN( → R ) CP R ⊆ ∗ → R · ∗ ← R iff CR( → R ) • How about on innermost terminating TRSs? - Innermost rewrite step → rewrites a redex i having no redex strictly below 5

  6. Confluence for innermost terminating TRSs • An open problem [Ohlebusch’01] : for SN( → i R ) CP R ⊆ ∗ i R · ∗ → ← i R iff CR( → R ) • A partial result for the problem [Gramlich’95] Th. The claim holds if OV( R ) Proof: by showing SN( → R ) • R is overlay OV( R ) : CPs are all produced from root-overlaps 6

  7. The open prob. is negatively solved • Counter example [presented at IWC’16] : R = { f ( x ) → x, h ( k ( x )) → f ( x ) , k ( c ) → d, g ( x ) → x, f ( c ) → g ( c ) , g ( x ) → h ( k ( x )) } CP R = { ( x, h ( k ( x ))) , ( h ( d ) , f ( c )) , ( c, g ( c )) } i R ) and CP R ⊆ ∗ i R · ∗ • SN( → → ← i R , but is not con- fluent x f ( x ) h ( k ( x )) c f ( c ) h ( k ( c )) h ( d ) i i i ¬ i i i i i i i g ( x ) g ( c ) 7

  8. Characterization of confluence [presented at IWC’16] • Instances of CPs by normalized substitutions iCP : { ( uσ, vσ ) | ( u, v ) ∈ CP , σ : normalized subst. } Note that iCP ⊇ CP • Th. For SN( → i ) , iCP ⊆ ∗ i · ∗ → ← CR( → ) iff i • New open problem Is confluence of innermost terminating TRSs decidable? 8

  9. This talk • Background: - Open problems on confluence for inner- most terminating TRSs • Tackling the open problem in negative direc- tion - A simple proof of undecidability of ground confluence for terminating TRSs • Sufficient conditions of confluence for inner- most terminating TRSs 9

  10. Tackling the new open problem • Tried to show undecidability of confluence in vain, and have shown undecidability of ground confluence for terminating TRSs [Ka- pur’87] ) • Normal technique to show undecidability: re- ducing an undecidable problem (here PCP) into confluence problem We adopt the policy that an instance has a solution iff non-confluent - Difficulties: necessary to design innermost terminating TRSs 10

  11. PCP (Post’s correspondence problem) • Instance: a set P of pair of strings Ex. P = { ( aa, a ) , ( b, ab ) } • Answer: whether there exist non-empty se- quence ( u i , v i ) ∈ P ( 1 ≤ i ≤ n ) s.t. u 1 · · · u n = v 1 · · · v n (called solution) For ex. above, it is YES because sequence ( aa, a ) , ( b, ab ) gives a solution aab • Known as undecidable whether an instance has a solution or not 11

  12. TRS construction for confluence • Unary representation a ( a ( b ( e ))) of string aab (abbreviated as aab ( e ) ) • For an instance { ( aa, a ) , ( b, ab ) } , R = { f ( x, x, y ) → c, f ( aa ( x ) , a ( y ) , 1( z )) ↔ f ( x, y, z ) , f ( aa ( e ) , a ( e ) , 1( e )) → c ′ , f ( b ( x ) , ab ( y ) , 2( z )) ↔ f ( x, y, z ) , f ( b ( e ) , ab ( e ) , 2( e )) → c ′ } f f | | c ′ aab ( e ) b ( e ) c i i i aab ( e ) ab ( e ) 1(2( e )) 2( e ) 12

  13. TRS construction for confluence • For an instance { ( aa, a ) , ( b, ab ) } , R = { f ( x, x, y ) → c, f ( aa ( x ) , a ( y ) , 1( z )) ↔ f ( x, y, z ) , f ( aa ( e ) , a ( e ) , 1( e )) → c ′ , f ( b ( x ) , ab ( y ) , 2( z )) ↔ f ( x, y, z ) , f ( b ( e ) , ab ( e ) , 2( e )) → c ′ } f f | | e aa ( e ) c i i a ( e ) aa ( e ) 2( e ) 1(2( e )) 13

  14. Innermost-terminating TRS constr. • Idea: introduce an argument that control in- nermost or not R = { d → e, f ( x, x, y, z ) → c, f ( aa ( x ) , a ( y ) , 1( z ) , d ) ← f ( x, y, z, d ) , f ( aa ( x ) , a ( y ) , 1( z ) , e ) → f ( x, y, z, d ) , f ( aa ( e ) , a ( e ) , e, z ′ ) → c ′ , · · · } ¬ i f f f | | | aab ( e ) b ( e ) aab ( e ) c ′ c aab ( e ) ab ( e ) aab ( e ) i i 1(2( e )) 2( e ) 1(2( e )) e d d 14

  15. Innermost-terminating TRS constr. • Rules avoiding unexpected normal forms caused by non-solution (complement rules) R = { d → e, f ( x, x, y, z ′ ) → c, f ( aa ( x ) , a ( y ) , 1( z ) , e ) → f ( x, y, z, d ) , f ( b ( x ) , ab ( y ) , 2( z ) , e ) → f ( x, y, z, d ) , f ( e, y, z, z ′ ) → c, f ( b ( x ) , y, 1( z ) , z ′ ) → c,, · · · } ¬ i f f f f | | | | e aa ( e ) e aa ( e ) c a ( e ) a ( e ) aa ( e ) aa ( e ) i i i 2( e ) 2( e ) 1(2( e )) 1(2( e )) e d e d i 15

  16. Problem on non-ground terms • Unexpected normal forms cannot be re- moved due to variables. Construction failed. R = { d → e, f ( x, x, y, z ′ ) → c, f ( aa ( x ) , a ( y ) , 1( z ) , e ) → f ( x, y, z, d ) , f ( b ( x ) , ab ( y ) , 2( z ) , e ) → f ( x, y, z, d ) , f ( e, y, z, z ′ ) → c, f ( b ( x ) , y, 1( z ) , z ′ ) → c, · · · } ¬ i f f f f | | | | aa ( x ) x x aa ( x ) c a ( x ) a ( x ) aa ( x ) aa ( x ) i i i 2( e ) 2( e ) 1(2( e )) 1(2( e )) e d e d • Obtained undecidability of ground confluence 16

  17. Terminating TRS construction for grand confluence • NON-terminating const. (already shown) R = { f ( x, x, z ) → c, f ( aa ( x ) , a ( y ) , 1( z )) ↔ f ( x, y, z ) , f ( aa ( e ) , a ( e ) , 1( e )) → c ′ , f ( b ( x ) , ab ( y ) , 2( z )) ↔ f ( x, y, z ) , f ( b ( e ) , ab ( e ) , 2( e )) → c ′ } f f | | c ′ aab ( e ) b ( e ) c aab ( e ) ab ( e ) 1(2( e )) 2( e ) 17

  18. Terminating TRS construction for grand confluence • terminating const. R = { f ( x, x, z ) → c, f ( aa ( x ) , a ( y ) , 1( z )) → f ( x, y, z ) , f ( aa ( e ) , a ( e ) , 1( e )) → c ′ , f ( b ( x ) , ab ( y ) , 2( z )) → f ( x, y, z ) , f ( b ( e ) , ab ( e ) , 2( e )) → c ′ } ∪ complement rules f f | | c ′ aab ( e ) b ( e ) c aab ( e ) ab ( e ) 1(2( e )) 2( e ) 18

  19. Terminating TRS construction for grand confluence • terminating const. R = { f ( x, x, z ) → c, f ( aa ( x ) , a ( y ) , 1( z )) → f ( x, y, z ) , f ( aa ( e ) , a ( e ) , 1( e )) → c ′ , f ( b ( x ) , ab ( y ) , 2( z )) → f ( x, y, z ) , f ( b ( e ) , ab ( e ) , 2( e )) → c ′ } ∪ complement rules f f | | e aa ( e ) c a ( e ) aa ( e ) 2( e ) 1(2( e )) 19

  20. This talk • Background: - Open problems on confluence for inner- most terminating TRSs • Tackling the open problem in negative direc- tion - A simple proof of undecidability of ground confluence for terminating TRSs • Sufficient conditions of confluence for inner- most terminating TRSs 20

  21. Characterization of confluence [presented at IWC’16] • Th. For SN( → i ) , iCP ⊆ ∗ i · ∗ → ← iff CR( → ) i where iCP = { ( uσ, vσ ) | ( u, v ) ∈ CP , σ : normal. subst. } Note that iCP ⊇ CP 21

  22. Sufficient conditions • Ground innermost rewrite step s → gi t : s → i t and the redex is a ground term • → gi rewrite sequences are stable under substitutions • Th.[presented at IWC’16] For SN( → i ) , CP ⊆ ∗ gi · ∗ → ← = ⇒ CR( → ) gi 22

  23. Sufficient conditions • Bidirectional parallel step s ← → t : � s = s [ s 1 , . . . , s n ] , t = s [ t 1 , . . . , t n ] , and s i ↔ t i • Th. For SN( → i ) , CP ⊆ ∗ → · ∗ → gi · ← ← = ⇒ CR( → ) � gi Proven by Lem. in the next slide • An example: R = { k ( c ) → d, h ( k ( x ) , x ) → g ( x ) , g ( c ) → h ( k ( c ) , c ) } CP R = { ( h ( d, c ) , g ( c )) } gi h ( d, c ) h ( k ( c ) , c ) g ( c ) gi ¬ i 23

  24. Sufficient conditions • Lem. For SN( → i ) , iCP ⊆ ∗ → · ∗ → i · ← ← iff CR( → ) � i → t implies s ∗ i · ∗ Proof ( ⇒ ): Show that s ← → ← i t � by Noetherian induction on { s, t } wrt multiset extension of → i ∪ ⊲ ( ⊲ : proper subterm rel.) → ε< f ( t 1 , . . . , t n ) = t Case s = f ( s 1 , . . . , s n ) ← � s ⊲ s i , t ⊲ t i and s i ← → t i for each i � By IH s i ∗ i · ∗ → ← i t i Hence, s ∗ i · ∗ → ← i t Case s = ℓσ → i rσ = t : it is trivial 24

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