arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.02679math.CTcs.CG
收藏

递归渲染字符串图

Rendering string diagrams recursively

Celia Rubio-Madrigal, Jules Hedges

AI总结:

本文提出通过折叠字符串图的顺序与并行组合代数表示递归计算布局,以二叉空间划分树维护右梯形轮廓不变量,并给出基于 Haskell 和 Diagrams 的实现及矩阵代数编译示例。

摘要:

字符串图是一种图形语言,用于表示可按顺序或并行方式组合的过程;在图形上,这些组合分别对应水平并置或垂直并置。在本文中,我们展示了如何通过对字符串图基于顺序组合算子和并行组合算子的代数表示进行折叠,来计算其布局。该代数表示可被视为自由幺半范畴中的一个项,或线性逻辑的一个小片段的证明树。这与现有使用图布局技术的非组合性方法形成对比。关键创新在于将图存储在二叉空间划分树中,并把图轮廓的右梯形形状作为不变量加以维护。我们使用名为 Diagrams 的现有指称图形库,提供了 Haskell 实现。我们的渲染器还支持为图添加语义,从而充当编译器,并以矩阵代数作为示例。

英文摘要:

String diagrams are a graphical language used to represent processes that can be composed sequentially or in parallel, which correspond graphically to horizontal or vertical juxtaposition. In this paper we demonstrate how to compute the layout of a string diagram by folding over its algebraic representation in terms of sequential and parallel composition operators. The algebraic representation can be seen as a term of a free monoidal category or a proof tree for a small fragment of linear logic. This contrasts to existing non-compositional approaches that use graph layout techniques. The key innovation is storing the diagrams in binary space-partition trees, maintaining a right-trapezoidal shape for the diagram's outline as an invariant. We provide an implementation in Haskell, using an existing denotational graphics library called Diagrams. Our renderer also supports adding semantics to diagrams to serve as a compiler, with matrix algebra used as an example.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑