Term Graph Rewriting and Parallel Term Rewriting
The relationship between Term Graph Rewriting and Term Rewriting is well understood: a single term graph reduction may correspond to several term reductions, due to sharing. It is also known that if term graphs are allowed to contain cycles, then one term graph reduction may correspond to infinitely many term reductions. We stress that this fact can be interpreted in two ways. According to the “sequential interpretation”, a term graph reduction corresponds to an infinite sequence of term reductions, as formalized by Kennaway et.al. using strongly converging derivations over the complete metric space of infinite terms. Instead according to the “parallel interpretation” a term graph reduction corresponds to the parallel reduction of an infinite set of redexes in a rational term. We formalize the latter notion by exploiting the complete partial order of infinite and possibly partial terms, and we stress that this interpretation allows to explain the result of reducing circular redexes in several approaches to term graph rewriting.
💡 Research Summary
The paper investigates the relationship between term graph rewriting (TGR) and traditional term rewriting (TR) with a focus on the effects of sharing and cycles. It distinguishes two interpretations of a single graph reduction when cycles are allowed: the “sequential interpretation,” where a graph reduction corresponds to an infinite sequence of term reductions, and the “parallel interpretation,” where the same graph reduction corresponds to the simultaneous reduction of an infinite set of redexes in a rational (finite‑subterm) infinite term.
The authors first formalize the algebra of possibly infinite, possibly partial terms, denoted CTΣ, as a complete partial order (CPO). Terms are modeled as partial functions from occurrence strings (ω*) to symbols or variables, with a domain that respects the usual tree‑shape constraints. The CPO ordering is defined by approximation (t ≤ t′ iff t is less defined than t′), and every ω‑chain has a least upper bound (lub), making CTΣ an ω‑complete lower semilattice.
Next, they recall orthogonal term rewriting systems (OTRS), which are left‑linear and non‑overlapping, guaranteeing confluence. Substitutions are extended continuously over CTΣ, and rewrite rules are pairs (l, r) with var(r) ⊆ var(l). A redex is an occurrence w together with a rule whose left‑hand side matches the subterm at w via some substitution.
The core of the paper is the definition of parallel term rewriting. For a finite set Φ of redexes, a “complete development” is a reduction sequence that reduces all redexes in Φ, respecting residuals after each step. A classic result (derived from the parallel moves lemma) states that any two complete developments of the same finite Φ are finite and end in the same term; thus the parallel reduction t →Φ t′ is well‑defined. For infinite Φ, the authors use the CPO structure: they consider an increasing chain of finite approximations of Φ, take the corresponding sequence of finite parallel reductions, and define the infinite parallel reduction as the lub of the resulting terms.
In the graph world, they introduce (possibly cyclic) term graphs and an “unravelling” function U that maps a graph to its rational term representation. Graph rewriting is presented via the double‑pushout (DPO) approach, but the paper also discusses single‑pushout, equational, and categorical variants. Graph rules are encoded as term rules, and the unravelling respects this encoding.
The main technical contributions are two theorems. The first shows that a single graph reduction G → G′ induces, on the unravelling U(G), a (possibly infinite) parallel reduction U(G) →Φ U(G′), where Φ consists of all redexes represented by the graph’s edges. The second theorem establishes adequacy: the unravelling U is a bijective correspondence between reductions of any orthogonal TGRS and parallel reductions of the corresponding TRS, provided we restrict to rational terms and rational parallel reduction sequences. In other words, every graph reduction can be simulated by a parallel term reduction, and every parallel term reduction can be simulated by a graph reduction.
A particularly insightful discussion concerns collapsing rules (rules whose right‑hand side is a variable). Using the rule RI: I(x) → x on the infinite term Iω (the infinite nesting of I), the sequential interpretation yields a fixed point Iω, while the parallel interpretation reduces all occurrences of I at once, yielding the completely undefined term ⊥ (the bottom of the CPO). Different graph rewriting frameworks handle this case differently: the operational DPO approach keeps the circular I graph unchanged (matching the sequential view), whereas other approaches (single‑pushout, equational, categorical) produce a graph with a single unlabeled node, representing ⊥, thus aligning with the parallel view. This illustrates that the choice of graph rewriting semantics influences the outcome for collapsing rules.
The paper concludes by summarizing the contributions: a formal CPO‑based treatment of infinite parallel term rewriting, a proof that graph reductions correspond to infinite parallel reductions, and an adequacy result linking TGRS and TRS. It also points to future work on non‑orthogonal systems, left‑infinite rules, and practical applications in programming language implementation and verification.
Comments & Academic Discussion
Loading comments...
Leave a Comment