Double-Pushout Graph Rewriting¶
A graph-rewrite semantics that preserves an interface while two pushouts delete and add matched structure.
Core Idea¶
Double-pushout graph rewriting is a precise account of replacing part of a graph while preserving a specified interface. A rule is a span L←K→R; a match maps L into host G. The first pushout construction removes matched elements of L outside K and leaves context D, and the second glues in elements of R outside K to obtain H. Ehrig and colleagues show this in a typed mutual-exclusion graph grammar. Ordinary node deletion is restricted by the dangling condition.
The structure applies beyond teaching graphs. Andersen and colleagues implement DPO algorithms in MØD to model reaction patterns over molecule graphs, compose rules, and explore generated chemical networks. Their formaldehyde/glycolaldehyde example is a computational model application, not an experimental validation of every possible reaction. DPO's preserved interface and gluing check distinguish it from an arbitrary visual edit or a single-pushout variant.
How would you explain it like I'm…
Swap a Part, Keep the Plugs
Find, Remove, Glue In
Interface-Preserving Graph Replacement
Scope of Application¶
The preserved interface K and gluing conditions distinguish DPO rewriting from arbitrary graph edits.
- Model transformation. Rewrite typed software or process models.
- Chemical graph grammars. Represent reaction patterns over molecule structures.
- Formal verification. Reason about reachable graph states and invariant preservation.
- Diagrammatic reasoning. Apply categorical rewrite rules to graph-like representations.
Clarity¶
A DPO graph rule matches a left graph L in a host, preserves interface K, deletes L outside K and adds R outside K through two pushouts. Dangling edges can make a match invalid. Ehrig's mutual-exclusion grammar and MØD chemical graph modeling show formal and applied uses.
Manages Complexity¶
The host graph may contain context not shown in a local rule. A seemingly simple node deletion can be invalid when an unmatched edge would dangle; identification conditions also matter. Categories of typed or attributed graphs generalize the construction, while domain-specific constraints determine whether a formally possible rewrite is semantically meaningful.
Abstract Reasoning¶
Specify L←K→R, locate a match, check gluing, form the deletion context, glue in R, then inspect the result under domain constraints.
Knowledge Transfer¶
The categorical replacement pattern works in software models, chemistry and diagrammatic formalisms when the graph category supplies the required pushouts and admissible matches. A free-form object update or a rewrite that deletes incident context without a valid complement is not literal DPO rewriting.
Relationships to Other Abstractions¶
Current abstraction Double-Pushout Graph Rewriting Domain-specific
Parents (1) — more general patterns this builds on
-
Double-Pushout Graph Rewriting is a kind of Graph rewriting Domain-specific
DPO is a graph-rewriting semantics with a preserved interface and two pushouts.
Hierarchy path (1) — routes to 1 parentless root
- Double-Pushout Graph Rewriting → Graph rewriting → Transformation → Function (Mapping)
Neighborhood in Abstraction Space¶
Double-Pushout Graph Rewriting sits in a crowded region of the domain-specific corpus (35th percentile for distinctiveness): several abstractions share nearly its structure, so a description that fits it tends to fit its neighbors too.
Family — Graph Structures & Algorithms (24 abstractions)
Nearest neighbors
- Sierpiński Graph — 0.90
- Chase (algorithm) — 0.89
- Complete Bipartite Graph — 0.88
- Graph Invariant — 0.87
- Symbolic Cholesky Decomposition — 0.87
Computed from structural-signature embeddings · 2026-10-08