b ohm reduction for terms and term graphs
play

B ohm Reduction for Terms and Term Graphs Confluence in Infinitary - PowerPoint PPT Presentation

B ohm Reduction for Terms and Term Graphs Confluence in Infinitary Rewriting Patrick Bahr IT University of Copenhagen Infinitary Term Rewriting Assign outcome to (well-formed) infinite reductions. 1 / 32 Infinitary Term Rewriting Assign


  1. Axiomatic Characterisation A set of terms U is called meaningless if it satisfies a number of axioms. 5,6 1. U is closed under rewriting. 2. If a redex t overlaps a subterm in U , then t ∈ U . 3. U is closed under substitution. (for λ -calculus) 4. If t root-active/hypercollapsing, then t ∈ U . U 5. If s ↔ t , then s ∈ U if and only if t ∈ U . 5 Z. M. Ariola et al. “Syntactic definitions of undefined: On defining the undefined”. In: Theoretical Aspects of Computer Software . 1994. 6 R. Kennaway, V. van Oostrom, and F.-J. de Vries. “Meaningless Terms in Rewriting”. In: J. Funct. Logic Programming (1999). 9 / 32

  2. Properties of B¨ ohm Reduction ◮ Let R be an orthogonal TRS, and U a set of meaningless terms. ◮ Define B = R ∪ { t → ⊥ | t ∈ U ⊥ \ {⊥}} 10 / 32

  3. Properties of B¨ ohm Reduction ◮ Let R be an orthogonal TRS, and U a set of meaningless terms. ◮ Define B = R ∪ { t → ⊥ | t ∈ U ⊥ \ {⊥}} Theorem ◮ B is infinitarily confluent, i.e. t 1 և B t ։ B t 2 implies t 1 ։ B t ′ և B t 2 . ◮ B is infinitarily normalising, i.e. for each term t there is a reduction t ։ B t ′ to a normal form. 10 / 32

  4. Properties of B¨ ohm Reduction ◮ Let R be an orthogonal TRS, and U a set of meaningless terms. ◮ Define B = R ∪ { t → ⊥ | t ∈ U ⊥ \ {⊥}} Theorem ◮ B is infinitarily confluent, i.e. t 1 և B t ։ B t 2 implies t 1 ։ B t ′ և B t 2 . ◮ B is infinitarily normalising, i.e. for each term t there is a reduction t ։ B t ′ to a normal form. Corollary Each term has a unique infinitary normal form in B (called B¨ ohm tree). 10 / 32

  5. Partial Order Infinitary Rewriting

  6. Partial Order Infinitary Rewriting ◮ Alternative characterisation of B¨ ohm reduction ◮ Changes the notion of convergence instead of adding rules 7 B. “Partial Order Infinitary Term Rewriting”. In: Logical Methods in Computer Science (2014). 11 / 32

  7. Partial Order Infinitary Rewriting ◮ Alternative characterisation of B¨ ohm reduction ◮ Changes the notion of convergence instead of adding rules The Good & The Bad + less ad hoc + no need for infinitely many reduction rules - captures only a particular set of meaningless terms 7 B. “Partial Order Infinitary Term Rewriting”. In: Logical Methods in Computer Science (2014). 11 / 32

  8. Recap: Strong Convergence f a R = { a → g ( a ) } 12 / 32

  9. Recap: Strong Convergence f a R = { a → g ( a ) } 12 / 32

  10. Recap: Strong Convergence f f g a a R = { a → g ( a ) } 12 / 32

  11. Recap: Strong Convergence f f g a a R = { a → g ( a ) } 12 / 32

  12. Recap: Strong Convergence f f f g g a g a a R = { a → g ( a ) } 12 / 32

  13. Recap: Strong Convergence f f f g g a g a a R = { a → g ( a ) } 12 / 32

  14. Recap: Strong Convergence f f f f g g g a g g a g a a R = { a → g ( a ) } 12 / 32

  15. Recap: Strong Convergence f f f f f g g g g a g g g a g g a g a R = { a → g ( a ) } a 12 / 32

  16. Recap: Strong Convergence f f f f f g g g g a g g g a g g a g a R = { a → g ( a ) } a 12 / 32

  17. Recap: Strong Convergence 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 ω ) 12 / 32

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

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

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

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

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

  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 )) 13 / 32

  24. 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 )) 13 / 32

  25. 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 )) 13 / 32

  26. 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 )) 13 / 32

  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 )) 13 / 32

  28. 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 )) 13 / 32

  29. 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 )) 13 / 32

  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 b b b 14 / 32

  31. 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 14 / 32

  32. 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 14 / 32

  33. How does it work? (I) Partial order on terms ◮ partial terms: terms with additional constant ⊥ ◮ partial order ≤ ⊥ reads as: “is less defined than” ◮ ⊥ ≤ ⊥ t , ◮ s ≤ ⊥ t = ⇒ f ( s ) ≤ ⊥ f ( t ) ◮ e.g. f ( ⊥ , g ( x )) ≤ ⊥ f ( y , g ( x )) ◮ ≤ ⊥ is a complete semilattice (= cpo + glbs of non-empty sets) 15 / 32

  34. How does it work? (II) Convergence: limit inferior lim inf ι → α t ι = � � β ≤ ι<α t ι β<α 16 / 32

  35. How does it work? (II) 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 16 / 32

  36. 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 17 / 32

  37. 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 17 / 32

  38. 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 17 / 32

  39. Properties of Orthogonal TRS property metric B¨ ohm red. compression ✔ ✔ finite approx. ✔ ✔ developments ✘ ✔ inf. confluence ✘ ✔ inf. normalisation ✘ ✔ 18 / 32

  40. Properties of Orthogonal TRS property metric B¨ ohm red. part. order compression ✔ ✔ ✔ finite approx. ✔ ✔ ✔ developments ✘ ✔ ✔ inf. confluence ✘ ✔ ✔ inf. normalisation ✘ ✔ ✔ 18 / 32

  41. Partial Order vs. B¨ ohm Reduction Theorem If R is an orthogonal TRS and s , t total terms, then s ։ p R t iff s ։ m R t . 19 / 32

  42. Partial Order vs. B¨ ohm Reduction Theorem If R is an orthogonal TRS and s , t total terms, then s ։ p R t iff s ։ m R t . 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 . 19 / 32

  43. Term Graph Rewriting

  44. From Terms to Term Graphs f ( g ( a ) , h ( g ( a ) , a )) 20 / 32

  45. From Terms to Term Graphs f g h g a a a f ( g ( a ) , h ( g ( a ) , a )) 20 / 32

  46. From Terms to Term Graphs f f g g h h g a a a a f ( g ( a ) , h ( g ( a ) , a )) 20 / 32

  47. From Terms to Term Graphs f f unravel g g h h g a a a a f ( g ( a ) , h ( g ( a ) , a )) 20 / 32

  48. From Terms to Term Graphs f f unravel g g h h g a a a a a → b 20 / 32

  49. From Terms to Term Graphs f f unravel g g h h g a a b a a → b 20 / 32

  50. From Terms to Term Graphs f f unravel g g h h g b b b b a → b 20 / 32

  51. From Terms to Term Graphs f f g g h h g b b b b 20 / 32

Recommend


More recommend