CARTOGRAPHER: A Tool for String Diagrammatic Reasoning (Tool Paper)

Authors Paweł Sobociński, Paul W. Wilson, Fabio Zanasi

Thumbnail PDF


  • Filesize: 407 kB
  • 7 pages

Document Identifiers

Author Details

Paweł Sobociński
  • University of Southampton, UK
Paul W. Wilson
  • University of Southampton, UK and University College, London, UK
Fabio Zanasi
  • University College London, UK


The authors thank Aleks Kissinger for valuable discussion, and the anonymous referees for their comments and feedback.

Cite AsGet BibTex

Paweł Sobociński, Paul W. Wilson, and Fabio Zanasi. CARTOGRAPHER: A Tool for String Diagrammatic Reasoning (Tool Paper). In 8th Conference on Algebra and Coalgebra in Computer Science (CALCO 2019). Leibniz International Proceedings in Informatics (LIPIcs), Volume 139, pp. 20:1-20:7, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2019)


We introduce cartographer, a tool for editing and rewriting string diagrams of symmetric monoidal categories. Our approach is principled: the layout exploits the isomorphism between string diagrams and certain cospans of hypergraphs; the implementation of rewriting is based on the soundness and completeness of convex double-pushout rewriting for string diagram rewriting.

Subject Classification

ACM Subject Classification
  • Software and its engineering → Visual languages
  • tool
  • string diagram
  • symmetric monoidal category
  • graphical reasoning


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. John Baez and Jason Erbele. Categories In Control. Theory and Applications of Categories, 30:836-881, 2015. URL:
  2. Krzysztof Bar, Aleks Kissinger, and Jamie Vicary. Globular: an online proof assistant for higher-dimensional rewriting. In Leibniz International Proceedings in Informatics, volume 52, pages 34:1-34:11, 2016. URL:
  3. Filippo Bonchi, Fabio Gadducci, Aleks Kissinger, Pawel Soboci'nski, and Fabio Zanasi. Confluence of Graph Rewriting with Interfaces. In Programming Languages and Systems - 26th European Symposium on Programming, ESOP 2017, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Uppsala, Sweden, April 22-29, 2017, Proceedings, pages 141-169, 2017. URL:
  4. Filippo Bonchi, Fabio Gadducci, Aleks Kissinger, Pawel Soboci'nski, and Fabio Zanasi. Rewriting with Frobenius. In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, LICS 2018, Oxford, UK, July 09-12, 2018, pages 165-174, 2018. URL:
  5. Filippo Bonchi, Fabio Gadducci, Aleks Kissinger, Paweł Sobociński, and Fabio Zanasi. Rewriting modulo symmetric monoidal structure. In Proceedings of the 31st Annual ACM/IEEE Symposium on Logic in Computer Science - LICS '16, pages 710-719, New York, NY, USA, 2016. ACM Press. URL:
  6. Filippo Bonchi, Joshua Holland, Robin Piedeleu, Pawel Soboci'nski, and Fabio Zanasi. Diagrammatic algebra: from linear to concurrent systems. PACMPL, 3(POPL):25:1-25:28, 2019. URL:, URL:
  7. Filippo Bonchi, Paweł Sobociński, and Fabio Zanasi. The Calculus of Signal Flow Diagrams I: Linear relations on streams. Inf. Comput., 252:2-29, 2017. Google Scholar
  8. Benjamin Cabrera, Tobias Heindel, Reiko Heckel, and Barbara König. Updating Probabilistic Knowledge on Condition/Event Nets using Bayesian Networks. In 29th International Conference on Concurrency Theory, CONCUR 2018, September 4-7, 2018, Beijing, China, pages 27:1-27:17, 2018. URL:
  9. Lucas Dixon and Aleks Kissinger. Open-graphs and monoidal theories. Mathematical Structures in Computer Science, 23(2):308-359, 2013. Google Scholar
  10. Andrew Fagan and Ross Duncan. Optimising Clifford Circuits with Quantomatic. Electronic Proceedings in Theoretical Computer Science, 287:85-105, January 2019. URL:
  11. Brendan Fong, Paolo Rapisarda, and Paweł Sobociński. A categorical approach to open and interconnected dynamical systems. In Thirty-first annual ACM/IEEE symposium on Logic and Computer Science (LiCS 2016), pages 495-504, 2016. URL:
  12. E.R. Gansner, E. Koutsofios, S.C. North, and K.-P. Vo. A technique for drawing directed graphs. IEEE Transactions on Software Engineering, 19(3):214-230, March 1993. URL:
  13. Bart Jacobs, Aleks Kissinger, and Fabio Zanasi. Causal Inference by String Diagram Surgery. CoRR, 2019. URL:
  14. Bart Jacobs and Fabio Zanasi. The Logical Essentials of Bayesian Reasoning. In Joost-Peter Katoen Gilles Barthe and Alexandra Silva, editors, Probabilistic Programming. Cambridge University Press, Cambridge, 2019. URL:
  15. Andre Joyal and Ross Street. The Geometry of Tensor Calculus, i. Adv. Math., 88:55-112, 1991. Google Scholar
  16. Oleg Kiselyov, Chung-chieh Shan, Daniel P Friedman, and Amr Sabry. Backtracking, Interleaving, and Terminating Monad Transformers. SIGPLAN Not., page 12, 2005. Google Scholar
  17. Aleks Kissinger and Vladimir Zamdzhiev. Quantomatic: A Proof Assistant for Diagrammatic Reasoning. arXiv:1503.01034 [cs, math], 9195:326-336, 2015. arXiv: 1503.01034. URL:
  18. José Meseguer and Ugo Montanari. Petri nets are monoids. Information and Computation, 88(2):105-155, October 1990. URL:
  19. Peter Selinger. A survey of graphical languages for monoidal categories. arXiv:0908.3347 [math], 813:289-355, 2010. arXiv: 0908.3347. URL:
  20. Fabio Zanasi. Rewriting in Free Hypergraph Categories. In Proceedings Third Workshop on Graphs as Models, GaM@ETAPS 2017, Uppsala, Sweden, 23rd April 2017., pages 16-30, 2017. URL: