Starting from the seminal works of Hoare and Milner, there was an explosion [Hoare:1978:CSP, Milner:1982:CCS, Sangiorgi:2001:PiCalculus, Cardelli2000, Castagna2005] of interest in process calculi: formal languages for specifying and reasoning about concurrent systems. The beauty of the approach, and often the focus of research, lies in compositionality: essentially, the behaviour of composite systems—usually understood as some kind of process equivalence, the most famous of which is bisimilarity—ought to be a function of the behaviour of its components. The central place of compositionality led to the study of syntactic formats for semantic specifications [de1985higher, bloom1995bisimulation, groote1993transition]; succinctly stated, syntactic operations with semantics defined using such formats are homomorphic wrt the semantic space of behaviours.
Another thread of concurrency theory research [Reisig1985, jensen2013coloured, harel1987statecharts] uses graphical formalisms, such as Petri nets. These often have the advantage of highlighting connectivity, distribution and the communication topology of systems. They tend to be popular with practitioners in part because of their intuitive and human-readable depictions, an aspect that should not be underestimated: indeed, pedagogical texts introducing CCS [Hoare:1978:CSP] and CSP [Milner:1982:CCS] often resort to pictures that give intuition about topological aspects of syntactic specifications. However, compositionality has not—historically—been a principal focus of research.
In this paper we propose a framework that allows us to eat our cake and have it too. We use string diagrams [Selinger2009] which have an intuitive graphical rendering, but also come with algebraic operations for composition. String diagrams combine the best of both worlds: they are a (2-dimensional) syntax, but also convey important topological information about the systems they specify. They have been used in recent years to give compositional accounts of quantum circuits[Abramsky2004, Coecke2008], signal flow graphs [Bonchi2015, BaezErbele-CategoriesInControl, Fong2015], Petri nets [BonchiHPSZ19], and electrical circuits [Fong2013, Ghica13], amongst several other applications.
Our main contribution is the adaptation of Turi and Plotkin’s bialgebraic semantics (abstract GSOS) [turi1997towards, klin2011bialgebras] for string diagrams. By doing so, we provide a principled justification and theoretical framework for giving definitions of operational semantics to the generators and operations of string diagrams, which are those of monoidal categories. More precisely we deal with string diagrams for symmetric monoidal categories which organise themselves as arrows of a particularly simple and well-behaved class known as props. Similar operational definitions have been used in the work on the algebra of Span(Graph) [Katis1997a], tile logic [Gadducci2000], the wire calculus [wirecalc] and recent work on modelling signal flow graphs and Petri nets [Bonchi2015, BonchiHPSZ19]. In each case, semantics was given either monolithically or via a set of SOS rules. The link with bialgebraic framework—developed in this paper—provides us a powerful theoretical tool that (i) justifies these operational definitions and (ii) guarantees compositionality.
In a nutshell, in the bialgebraic approach, the syntax of a language is the initial algebra (the algebra of terms) for a signature functor . A certain kind of distributive law, an abstract GSOS specification [turi1997towards], induces a coalgebra (a state machine) capturing the operational semantics of the language. The final -coalgebra provides the denotational universe: intuitively, the space of all possible behaviours. The unique coalgebra map represents the denotational semantics assigning to each term its behaviour.