The Cost of Compositionality: A High-Performance Implementation of String Diagram Composition

Paul W. Wilson, F. Zanasi
{"title":"The Cost of Compositionality: A High-Performance Implementation of String Diagram Composition","authors":"Paul W. Wilson, F. Zanasi","doi":"10.4204/EPTCS.372.19","DOIUrl":null,"url":null,"abstract":"String diagrams are an increasingly popular algebraic language for the analysis of graphical models of computations across different research fields. Whereas string diagrams have been thoroughly studied as semantic structures, much less attention has been given to their algorithmic properties, and efficient implementations of diagrammatic reasoning are almost an unexplored subject. This work intends to be a contribution in such a direction. We introduce a data structure representing string diagrams in terms of adjacency matrices. This encoding has the key advantage of providing simple and efficient algorithms for composition and tensor product of diagrams. We demonstrate its effectiveness by showing that the complexity of the two operations is linear in the size of string diagrams. Also, as our approach is based on basic linear algebraic operations, we can take advantage of heavily optimised implementations, which we use to measure performances of string diagrammatic operations via several benchmarks.","PeriodicalId":11810,"journal":{"name":"essentia law Merchant Shipping Act 1995","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2021-05-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"4","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"essentia law Merchant Shipping Act 1995","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4204/EPTCS.372.19","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 4

Abstract

String diagrams are an increasingly popular algebraic language for the analysis of graphical models of computations across different research fields. Whereas string diagrams have been thoroughly studied as semantic structures, much less attention has been given to their algorithmic properties, and efficient implementations of diagrammatic reasoning are almost an unexplored subject. This work intends to be a contribution in such a direction. We introduce a data structure representing string diagrams in terms of adjacency matrices. This encoding has the key advantage of providing simple and efficient algorithms for composition and tensor product of diagrams. We demonstrate its effectiveness by showing that the complexity of the two operations is linear in the size of string diagrams. Also, as our approach is based on basic linear algebraic operations, we can take advantage of heavily optimised implementations, which we use to measure performances of string diagrammatic operations via several benchmarks.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
组合性的代价:字符串图组合的高性能实现
弦图是一种日益流行的代数语言,用于分析不同研究领域的计算图形模型。虽然字符串图作为语义结构已经被深入研究,但对其算法特性的关注却很少,并且图推理的有效实现几乎是一个未被探索的主题。这项工作打算在这个方向上作出贡献。我们介绍了一种用邻接矩阵表示字符串图的数据结构。这种编码的主要优点是为图的合成和张量积提供了简单有效的算法。我们通过显示这两个操作的复杂度在字符串图的大小上是线性的来证明它的有效性。此外,由于我们的方法基于基本的线性代数操作,我们可以利用高度优化的实现,我们使用它通过几个基准测试来测量字符串图解操作的性能。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Canonical Gradings of Monads Proceedings Fifth International Conference on Applied Category Theory, ACT 2022, Glasgow, United Kingdom, 18-22 July 2022 Polynomial Life: the Structure of Adaptive Systems Grounding Game Semantics in Categorical Algebra Jacobians and Gradients for Cartesian Differential Categories
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1