arXiv · 2406.15882
Equivalence Hypergraphs: DPO Rewriting for Monoidal E-Graphs
Abstract
The technique of \emph{equality saturation}, which equips graphs with an equivalence relation, has proven effective for program optimisation. We give a categorical semantics to these structures, called \emph{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 \emph{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.
Explore related subjects
Keep this discovery
Aleksei Tiurin, Chris Barrett, Dan R. Ghica, Nick Hu. 2024-06-22. Equivalence Hypergraphs: DPO Rewriting for Monoidal E-Graphs. https://arxiv.org/abs/2406.15882
Cite the original work for its findings. Save a collection to share your selection of sources.