Infinitary Term Graph Rewriting
Term graph rewriting provides a formalism for implementing term rewriting in an efficient manner by avoiding duplication. Infinitary term rewriting has been introduced to study infinite term reduction sequences. Such infinite reductions can be used to reason about lazy evaluation. In this paper, we combine term graph rewriting and infinitary term rewriting thereby addressing both components of lazy evaluation: non-strictness and sharing. Moreover, we show how our theoretical underpinnings, based on a metric space and a complete semilattice, provides a unified framework for both term rewriting and term graph rewriting. This makes it possible to study the correspondences between these two worlds. As an example, we show how the soundness of term graph rewriting w.r.t. term rewriting can be extended to the infinitary setting.
💡 Research Summary
The paper presents a unified theoretical framework that combines infinitary term rewriting with term graph rewriting, thereby addressing both non‑strictness and sharing—two essential aspects of lazy evaluation. Traditional infinitary term rewriting extends the classical finite theory by endowing infinite reduction sequences with a meaningful semantics, typically using a metric space of terms where convergence is defined via limits of Cauchy sequences. In parallel, term graph rewriting offers an explicit representation of sharing and recursion by allowing cyclic graph structures, which can finitely encode certain infinite (rational) terms.
The authors first recall the two main convergence notions used in infinitary rewriting. The metric‑based approach defines weak m‑continuity (continuity of the term sequence at limit ordinals) and strong m‑continuity (additionally requiring that the depths of the contracted redexes tend to infinity). The order‑based approach works on a complete semilattice of partial terms equipped with the information‑preserving preorder ≤⊥, defining weak p‑continuity via limit inferior and strong p‑continuity via limit inferior of reduction contexts (terms with ⊥‑holes at the redex positions). Both frameworks guarantee that every continuous reduction has a limit, but they differ in how they treat divergent sub‑computations.
To lift these notions to graphs, the paper defines a distance function on term graphs that mirrors the term distance d(s,t)=2⁻ˢⁱᵐ(s,t), thus preserving the ultrametric property. It also introduces a ⊥‑label for undefined sub‑graphs, yielding a preorder ≤⊥ on graphs that forms a complete semilattice. With these structures in place, the authors can speak of metric convergence (strong/weak m‑continuity) and order convergence (strong/weak p‑continuity) directly on term graphs.
A central technical contribution is the proof that strong m‑convergence is a strict subset of strong p‑convergence for term graphs. Intuitively, if the contracted redexes move deeper and deeper (the metric condition), then the corresponding reduction contexts contain increasingly many ⊥‑holes, and their limit inferior coincides with the metric limit. Consequently, the metric calculus of infinitary term graph rewriting is embedded in the order calculus, and the two notions become equivalent under strong convergence.
The paper also investigates the class of rational terms—those that can be represented by finite, possibly cyclic graphs. It shows that for regular equation systems (rules whose left‑hand sides are constants) the set of rational terms is closed under normalising reductions. This closure result justifies using finite graph representations to simulate certain infinite reductions, extending earlier work by Kennaway et al. on finite representations of infinitary rewriting.
Building on the convergence results, the authors extend the classic soundness theorem for term graph rewriting (graph reductions simulate term reductions) to the infinitary setting. They prove that any strongly convergent graph reduction yields a strongly convergent term reduction to the same limit term, thereby establishing semantic equivalence between the two worlds even for infinite computations.
In conclusion, the paper delivers a robust mathematical foundation for reasoning about lazy evaluation with both sharing and non‑strictness. By unifying metric and order based convergence in a single framework, it opens the door to further investigations such as extending the results to more general rewrite systems, incorporating concurrency, or applying the theory to the design and verification of functional programming language implementations that rely on graph reduction machines.
Comments & Academic Discussion
Loading comments...
Leave a Comment