English

A Diagrammatic Algebra for Program Logics

Logic in Computer Science 2024-10-07 v1

Abstract

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.

Keywords

Cite

@article{arxiv.2410.03561,
  title  = {A Diagrammatic Algebra for Program Logics},
  author = {Filippo Bonchi and Alessandro Di Giorgio and Elena Di Lavore},
  journal= {arXiv preprint arXiv:2410.03561},
  year   = {2024}
}

Comments

arXiv admin note: text overlap with arXiv:2210.09950

R2 v1 2026-06-28T19:08:48.554Z