Equivalence Hypergraphs: DPO Rewriting for Monoidal E-Graphs
The technique of equality saturation, which equips graphs with an equivalence relation, has proven effective for program optimisation. We give a categorical semantics to these structures, called e-graphs, in terms of Cartesian categories enriched over the category of semilattices. This approach generalises to monoidal categories, which opens the door to new applications of e-graph techniques, from algebraic to monoidal theories. Finally, we present a sound and complete combinatorial representation of morphisms in such a category, based on a generalisation of hypergraphs which we call e-hypergraphs. They have the usual advantage that many of their structural equations are absorbed into a general notion of isomorphism. This new principled approach to e-graphs enables double-pushout (DPO) rewriting for these structures, which constitutes the main contribution of this paper.
Authors
- Dan R. Ghica (ORCID: https://orcid.org/0000-0002-4003-8893)
- Aleksei Tiurin
- Chris Barrett (ORCID: https://orcid.org/0000-0003-1708-3554)
- Nick Hu
Institutions
- Huawei Technologies (United Kingdom) (GB)
- University of Birmingham (GB)
Publication Details
- Published
- 2025-06-23
- DOI
- https://doi.org/10.1109/lics65433.2025.00023
- Primary Topic
- semigroups and automata theory
- Type
- article
- Field-Weighted Citation Impact
- 0.00