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
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
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
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
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
Example: Convergence of a Reduction f a R = { a → g ( a ) } 10 / 17
Example: Convergence of a Reduction f a R = { a → g ( a ) } 10 / 17
Example: Convergence of a Reduction f f g a a R = { a → g ( a ) } 10 / 17
Example: Convergence of a Reduction f f g a a R = { a → g ( a ) } 10 / 17
Example: Convergence of a Reduction f f f g g a g a a R = { a → g ( a ) } 10 / 17
Example: Convergence of a Reduction f f f g g a g a a R = { a → g ( a ) } 10 / 17
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
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
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
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
Example: Non-Convergence f a h b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17
Example: Non-Convergence f a h b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17
Example: Non-Convergence f f a a h h g b b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17
Example: Non-Convergence f f a a h h g b b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17
Example: Non-Convergence f f a a h h g b b � a → g ( a ) R = h ( x ) → h ( g ( x )) 11 / 17
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
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
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
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
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
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
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
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
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
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
Properties of Orthogonal TRS property metric B¨ ohm red. compression ✔ ✔ inf. strip lemma ✔ ✔ developments ✘ ✔ inf. confluence ✘ ✔ inf. normalisation ✘ ✔ 13 / 17
Properties of Orthogonal TRS property metric B¨ ohm red. part. order compression ✔ ✔ ✔ inf. strip lemma ✔ ✔ ✔ developments ✘ ✔ ✔ inf. confluence ✘ ✔ ✔ inf. normalisation ✘ ✔ ✔ 13 / 17
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
Term Graph Rewriting
Properties of Orthogonal GRS property metric B¨ ohm red. part. order compression ? ✔ ✔ inf. strip lemma ✔ ✔ ✔ developments ✘ ✔ ✔ inf. normalisation ✘ ✔ ✔ inf. confluence ? ? ✘ 14 / 17
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
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
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
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
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
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
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
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
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
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
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
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
B¨ ohm Reduction in Infinitary Term Graph Rewriting Systems Patrick Bahr IT University of Copenhagen
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
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
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
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
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
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