A Diagrammatic Basis for Computer Programming

📅 2025-12-08
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This paper addresses the formal modeling of imperative programs and program logic. We propose a graphical semantic framework based on rig categories. Our method introduces Kleene–Cartesian rig categories, where the tensor product ⊗ models Cartesian structure (capturing sequential composition and tuple formation), while the monoidal sum ⊕ models Kleene structure (encoding nondeterministic choice and iteration); tape diagrams serve as intuitive graphical representations of morphisms in this category. This framework unifies the algebraic features of Cartesian and Kleene bicategories, providing a foundation that simultaneously ensures algebraic rigor and visual intelligibility for program structure. Experimental evaluation demonstrates that our approach significantly enhances graphical reasoning capabilities and formal verification efficiency for imperative programs—particularly in the joint modeling of loops, conditional branches, and assertion logic.

Technology Category

Application Category

📝 Abstract
Tape diagrams provide a convenient graphical notation for arrows of rig categories, i.e., categories equipped with two monoidal products, $oplus$ and $otimes$. In this work, we introduce Kleene-Cartesian rig categories, namely rig categories where $otimes$ provides a Cartesian bicategory, while $oplus$ a Kleene bicategory. We show that the associated tape diagrams can conveniently deal with imperative programs and various program logic.
Problem

Research questions and friction points this paper is trying to address.

Develops tape diagrams for rig categories
Introduces Kleene-Cartesian rig categories
Applies diagrams to imperative programs and logic
Innovation

Methods, ideas, or system contributions that make the work stand out.

Tape diagrams for rig categories graphical notation
Kleene-Cartesian rig categories combine two bicategory structures
Diagrams handle imperative programs and program logic
🔎 Similar Papers
No similar papers found.