arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.03561cs.LO
收藏

程序逻辑的图解代数

A Diagrammatic Algebra for Program Logics

Filippo Bonchi, Alessandro Di Giorgio, Elena Di Lavore

AI总结:

本文通过引入带 $\oplus$ 上迹的带图和 Kleene-Cartesian 双范畴,为命令式程序提供了一种图解记法与证明系统,其表达能力至少与 Hoare 逻辑相当。

摘要:

带图(tape diagrams)为 rig 范畴中的箭头提供了一种方便的记法,即配备两个幺半积 $\oplus$ 和 $\otimes$ 的范畴,其中 $\otimes$ 对 $\oplus$ 满足分配律。在本文中,我们将带图扩展为在 $\oplus$ 上带有迹(traces),以处理命令式编程语言中的迭代。更准确地说,我们引入了 Kleene-Cartesian 双范畴,即这样的 rig 范畴:由 $\otimes$ 提供的幺半结构是一个笛卡尔双范畴,而由 $\oplus$ 提供的幺半结构是我们所称的 Kleene 双范畴。我们证明,相应的带图语言具有足够的表达能力来处理命令式程序,并且相应的定律提供了一个证明系统,其能力至少与 Hoare 逻辑的证明系统相当。

英文摘要:

Tape diagrams provide a convenient notation for arrows of rig categories, i.e., categories equipped with two monoidal products, $\oplus$ and $\otimes$, where $\otimes$ distributes over $\oplus $. In this work, we extend tape diagrams with traces over $\oplus$ in order to deal with iteration in imperative programming languages. More precisely, we introduce Kleene-Cartesian bicategories, namely rig categories where the monoidal structure provided by $\otimes$ is a cartesian bicategory, while the one provided by $\oplus$ is what we name a Kleene bicategory. We show that the associated language of tape diagrams is expressive enough to deal with imperative programs and the corresponding laws provide a proof system that is at least as powerful as the one of Hoare logic.

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

↑