b ohm reduction in infinitary term graph rewriting systems
play

B ohm Reduction in Infinitary Term Graph Rewriting Systems - PowerPoint PPT Presentation

B ohm Reduction in Infinitary Term Graph Rewriting Systems Patrick Bahr IT University of Copenhagen Overview 1. Motivation Why term graphs? Why infinitary term graph rewriting? Why B ohm reduction? 2. B ohm Reduction on


  1. B¨ ohm Reduction Idea f ( g ( f ( g ( . . . )))) ◮ terms like f ω and g ω are considered meaningless ◮ for each meaningless term g ω f ω t , add rule t → ⊥ ◮ meaningless terms are characterised by a set of axioms 7 R. Kennaway et al. “Infinitary lambda calculus”. In: Theoretical Computer Science (1997). 8 R. Kennaway, V. van Oostrom, and F.-J. de Vries. “Meaningless Terms in Rewriting”. In: J. Funct. Logic Programming (1999). 8 / 17

  2. B¨ ohm Reduction Idea f ( g ( f ( g ( . . . )))) ◮ terms like f ω and g ω are considered meaningless ◮ for each meaningless term g ω f ω t , add rule t → ⊥ ◮ meaningless terms are ⊥ characterised by a set of axioms 7 R. Kennaway et al. “Infinitary lambda calculus”. In: Theoretical Computer Science (1997). 8 R. Kennaway, V. van Oostrom, and F.-J. de Vries. “Meaningless Terms in Rewriting”. In: J. Funct. Logic Programming (1999). 8 / 17

  3. B¨ ohm Reduction Idea f ( g ( f ( g ( . . . )))) ◮ terms like f ω and g ω are considered meaningless ◮ for each meaningless term g ω f ω t , add rule t → ⊥ ◮ meaningless terms are ⊥ characterised by a set of axioms B¨ ohm reduction = infinitary rewriting with ⊥ -rules 7 R. Kennaway et al. “Infinitary lambda calculus”. In: Theoretical Computer Science (1997). 8 R. Kennaway, V. van Oostrom, and F.-J. de Vries. “Meaningless Terms in Rewriting”. In: J. Funct. Logic Programming (1999). 8 / 17

  4. Partial Order Infinitary Rewriting ◮ Alternative characterisation of B¨ ohm reduction ◮ Changes the notion of convergence instead of adding rules (uses a partial order instead of a metric) 9 B. “Partial Order Infinitary Term Rewriting”. In: LMCS (2014). 9 / 17

  5. Partial Order Infinitary Rewriting ◮ Alternative characterisation of B¨ ohm reduction ◮ Changes the notion of convergence instead of adding rules (uses a partial order instead of a metric) The Good & The Bad + less ad hoc + no need for infinitely many reduction rules - captures only a particular set of meaningless terms (namely: root-active terms) 9 B. “Partial Order Infinitary Term Rewriting”. In: LMCS (2014). 9 / 17

  6. Example: Convergence of a Reduction f a R = { a → g ( a ) } 10 / 17

  7. Example: Convergence of a Reduction f a R = { a → g ( a ) } 10 / 17

  8. Example: Convergence of a Reduction f f g a a R = { a → g ( a ) } 10 / 17

  9. Example: Convergence of a Reduction f f g a a R = { a → g ( a ) } 10 / 17

  10. Example: Convergence of a Reduction f f f g g a g a a R = { a → g ( a ) } 10 / 17

  11. Example: Convergence of a Reduction f f f g g a g a a R = { a → g ( a ) } 10 / 17

  12. Example: Convergence of a Reduction f f f f g g g a g g a g a a R = { a → g ( a ) } 10 / 17

  13. Example: Convergence of a Reduction f f f f f g g g g a g g g a g g a g a R = { a → g ( a ) } a 10 / 17

  14. Example: Convergence of a Reduction f f f f f g g g g a g g g a g g a g a R = { a → g ( a ) } a 10 / 17

  15. Example: Convergence of a Reduction f f f f f g g g g a g g g a g g a g a R = { a → g ( a ) } a f ( a ) ։ ω R f ( g ω ) 10 / 17

  16. Example: Non-Convergence f a h b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17

  17. Example: Non-Convergence f a h b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17

  18. Example: Non-Convergence f f a a h h g b b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17

  19. Example: Non-Convergence f f a a h h g b b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17

  20. Example: Non-Convergence f f a a h h g b b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17

  21. Example: Non-Convergence f f f g a a h h h g g a b b b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17

  22. Example: Non-Convergence f f f g a a h h h g g a b b b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17

  23. Example: Non-Convergence f f f g a a h h h g g a b b b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17

  24. Example: Non-Convergence f f f f g g a a h h h h g g g a a b g b b b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17

  25. Example: Non-Convergence f f f f f g g g a a h h h h h g g g g g a a b g g a b b b b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17

  26. Example: Non-Convergence f f f f f . . . g g g a a h h h h h g g g g g a a b g g a b b b b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17

  27. Example: Non-Convergence f f f f f . . . g g g a a h h h h h g g g g g a a b g g a b b b b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17

  28. Partial Order Convergence f f f f f f . . . g g g g a a h h h h h h g g g g g g g a a b g g g a a b b b b b 12 / 17

  29. Partial Order Convergence f f f f f f . . . g g g g a a h h h h h h g g g g g g g a a b g g g a a b b f b b b eventually stable: g g 12 / 17

  30. Partial Order Convergence f f f f f f . . . g g g g a a h h h h h h g g g g g g g a a b g g g a a b b f b b b p -converges to g ⊥ g 12 / 17

  31. Properties of Orthogonal TRS property metric B¨ ohm red. compression ✔ ✔ inf. strip lemma ✔ ✔ developments ✘ ✔ inf. confluence ✘ ✔ inf. normalisation ✘ ✔ 13 / 17

  32. Properties of Orthogonal TRS property metric B¨ ohm red. part. order compression ✔ ✔ ✔ inf. strip lemma ✔ ✔ ✔ developments ✘ ✔ ✔ inf. confluence ✘ ✔ ✔ inf. normalisation ✘ ✔ ✔ 13 / 17

  33. Properties of Orthogonal TRS property metric B¨ ohm red. part. order compression ✔ ✔ ✔ inf. strip lemma ✔ ✔ ✔ developments ✘ ✔ ✔ inf. confluence ✘ ✔ ✔ inf. normalisation ✘ ✔ ✔ Theorem If R is an orthogonal TRS and B the B¨ ohm extension of R (w.r.t. root-active terms), then s ։ p R t iff s ։ m B t . 13 / 17

  34. Term Graph Rewriting

  35. Properties of Orthogonal GRS property metric B¨ ohm red. part. order compression ? ✔ ✔ inf. strip lemma ✔ ✔ ✔ developments ✘ ✔ ✔ inf. normalisation ✘ ✔ ✔ inf. confluence ? ? ✘ 14 / 17

  36. Properties of Orthogonal GRS property metric B¨ ohm red. part. order compression ? ✔ ✔ inf. strip lemma ✔ ✔ ✔ developments ✘ ✔ ✔ inf. normalisation ✘ ✔ ✔ inf. confluence ? ? ✘ inf. confluence ✘ ✔ ✔ modulo bisim. 14 / 17

  37. Properties of Orthogonal GRS property metric B¨ ohm red. part. order compression ? ✔ ✔ inf. strip lemma ✔ ✔ ✔ developments ✘ ✔ ✔ inf. normalisation ✘ ✔ ✔ inf. confluence ? ? ✘ inf. confluence ✘ ✔ ✔ modulo bisim. Theorem If R is an orth. GRS and B the B¨ ohm extension of R (w.r.t. root-active term graphs), then g ։ p R h iff g ։ m B h . 14 / 17

  38. Soundness & Completeness Soundness of metric convergence For every left-linear, left-finite GRS R we have p g R h U ( · ) U ( R ) s 10 B. “Infinitary Term Graph Rewriting is Simple, Sound and Complete”. In: RTA . 2012. 15 / 17

  39. Soundness & Completeness Soundness of metric convergence For every left-linear, left-finite GRS R we have p g R h U ( · ) U ( · ) p U ( R ) s t 10 B. “Infinitary Term Graph Rewriting is Simple, Sound and Complete”. In: RTA . 2012. 15 / 17

  40. Soundness & Completeness Soundness of metric convergence For every left-linear, left-finite GRS R we have p g R h U ( · ) U ( · ) p U ( R ) s t Completeness property p U ( R ) s t U ( · ) g R 10 B. “Infinitary Term Graph Rewriting is Simple, Sound and Complete”. In: RTA . 2012. 15 / 17

  41. Soundness & Completeness Soundness of metric convergence For every left-linear, left-finite GRS R we have p g R h U ( · ) U ( · ) p U ( R ) s t Completeness property p p U ( R ) s t ′ t U ( · ) U ( · ) p g R h 10 B. “Infinitary Term Graph Rewriting is Simple, Sound and Complete”. In: RTA . 2012. 15 / 17

  42. Soundness & Completeness Soundness of metric convergence For every left-linear, left-finite GRS R we have B g R h U ( · ) U ( · ) B U ( R ) s t Completeness property B B U ( R ) s t ′ t U ( · ) U ( · ) B g R h 10 B. “Infinitary Term Graph Rewriting is Simple, Sound and Complete”. In: RTA . 2012. 15 / 17

  43. Working with Term Graphs Some Observations ◮ Term graphs can be messy ◮ Very operational style of term graph rewriting ◮ B¨ ohm reduction is not left-linear ◮ But: sharing simplifies some things ◮ Reduction produces no duplication ◮ Residuals & developments are easier 16 / 17

  44. Working with Term Graphs Some Observations ◮ Term graphs can be messy ◮ Very operational style of term graph rewriting ◮ B¨ ohm reduction is not left-linear ◮ But: sharing simplifies some things ◮ Reduction produces no duplication ◮ Residuals & developments are easier Example ( g ( x ) → f ( x , x )) ρ : g g r l f f ρ x c c 16 / 17

  45. Working with Term Graphs Some Observations ◮ Term graphs can be messy ◮ Very operational style of term graph rewriting ◮ B¨ ohm reduction is not left-linear ◮ But: sharing simplifies some things ◮ Reduction produces no duplication ◮ Residuals & developments are easier ◮ Weak convergence is even weirder than on terms: 16 / 17

  46. Working with Term Graphs Some Observations ◮ Term graphs can be messy ◮ Very operational style of term graph rewriting ◮ B¨ ohm reduction is not left-linear ◮ But: sharing simplifies some things ◮ Reduction produces no duplication ◮ Residuals & developments are easier ◮ Weak convergence is even weirder than on terms: f f f f f c c c c c c c c 16 / 17

  47. Future Work ◮ Infinitary confluence for term graphs ◮ Coinductive definition of infinitary term graph rewriting ◮ Axiomatic account of meaningless term graphs ◮ Partial-order reduction corresponding to B¨ ohm reductions other than root-active terms 17 / 17

  48. B¨ ohm Reduction in Infinitary Term Graph Rewriting Systems Patrick Bahr IT University of Copenhagen

  49. The Metric Model of Infinitary Rewriting Convergence based on the ‘usual’ complete metric space on terms d ( s , t ) = 2 − n n = depth of the shallowest discrepancy of s and t 18 / 17

  50. The Metric Model of Infinitary Rewriting Convergence based on the ‘usual’ complete metric space on terms d ( s , t ) = 2 − n n = depth of the shallowest discrepancy of s and t Convergence of reductions (a.k.a. strong convergence) ◮ convergence in the metric space, and ◮ rewrite rules are applied (eventually) at increasingly large depth 18 / 17

  51. The Metric Model of Infinitary Rewriting Convergence based on the ‘usual’ complete metric space on terms d ( s , t ) = 2 − n n = depth of the shallowest discrepancy of s and t Convergence of reductions (a.k.a. strong convergence) ◮ convergence in the metric space, and ◮ rewrite rules are applied (eventually) at increasingly large depth convergence of a reduction: depth at which the � rewrite rules are applied tends to infinity 18 / 17

  52. Partial Order Infinitary Rewriting Partial order on terms ◮ partial terms: terms with additional constant ⊥ ◮ partial order ≤ ⊥ reads as: “is less defined than” ◮ ≤ ⊥ is a complete semilattice (= cpo + glbs of non-empty sets) 19 / 17

  53. Partial Order Infinitary Rewriting Partial order on terms ◮ partial terms: terms with additional constant ⊥ ◮ partial order ≤ ⊥ reads as: “is less defined than” ◮ ≤ ⊥ is a complete semilattice (= cpo + glbs of non-empty sets) Convergence: limit inferior lim inf ι → α t ι = � � β ≤ ι<α t ι β<α 19 / 17

  54. Partial Order Infinitary Rewriting Partial order on terms ◮ partial terms: terms with additional constant ⊥ ◮ partial order ≤ ⊥ reads as: “is less defined than” ◮ ≤ ⊥ is a complete semilattice (= cpo + glbs of non-empty sets) Convergence: limit inferior lim inf ι → α t ι = � � β ≤ ι<α t ι β<α ◮ intuition: eventual persistence of nodes in the tree ◮ strong convergence: limit inferior of the contexts of the reduction 19 / 17

Recommend


More recommend