The compact double category Int(Poly*) models control flow and data transformations

Abstract

Hasegawa showed that control flow in programming languages -- while loops and if-then-else statements -- can be modeled using traced cocartesian categories, such as the category Set* of pointed sets. In this paper we define an operad W of wiring diagrams that provides syntax for categories whose control flow moreover includes data transformations, including deleting, duplicating, permuting, and applying pre-specified functions to variables. In the most basic version, the operad underlies Int(Poly*), where Int(T) denotes the free compact category on a traced category T, as defined by Joyal, Street, and Verity; to do so, we show that Poly*, as well as any multivariate version of it, is traced. We show moreover that whenever T is uniform -- a condition also defined by Hasegawa and satisfied by Int(T) -- the resulting Int-construction extends to a double category Int(T), which is compact in the sense of Patterson. Finally, we define a universal property of the double category Int(Poly*) and Int(Set*) by which one can track trajectories as they move through the control flow associated to a wiring diagram.

0

Turn this paper into a full lesson

ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.

Discussion (0)

Sign in to join the discussion.

Loading comments…