# Computational category-theoretic rewriting

arXiv: https://arxiv.org/abs/2111.03784 · HTML: https://mlsanity.com/paper/2111.03784/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 2 Nov 2021.

## Built on by (most cited first, 3 of 3)

- [A Categorical Representation Language and Computational System for Knowledge-Based Planning](https://mlsanity.com/paper/2305.17208/) (2023)
- [Graph Rewriting for Graph Neural Networks](https://mlsanity.com/paper/2305.18632/) (2023)
- [Automating Transfer of Robot Task Plans using Functorial Data Migrations](https://mlsanity.com/paper/2406.15961/) (2024)

## Abstract (arXiv)

We demonstrate how category theory provides specifications that can efficiently be implemented via imperative algorithms and apply this to the field of graph rewriting. By examples, we show how this paradigm of software development makes it easy to quickly write correct and performant code. We provide a modern implementation of graph rewriting techniques at the level of abstraction of finitely-presented C-sets and clarify the connections between C-sets and the typed graphs supported in existing rewriting software. We emphasize that our open-source library is extensible: by taking new categorical constructions (such as slice categories, structured cospans, and distributed graphs) and relating their limits and colimits to those of their underlying categories, users inherit efficient algorithms for pushout complements and (final) pullback complements. This allows one to perform double-, single-, and sesqui-pushout rewriting over a broad class of data structures.
