The graphical presentation of programming most similar to that given here is Milner's action calculi. This is a framework for describing concurrent languages, based on symmetric monoidal 2-categories.
Since they are based on symmetric monoidal 2-categories, they are similar to the central categories presented here, but in action calculi the nodes (called controls) may contain sub-graphs.
For example, the lambda-calculus is given as having controls:
For example:
'hello' | |
'world' |
'world' |
In action calculi, control over reduction order is achieved by the use of sub-graphs inside controls, where in our presentation reduction order is given by control arcs.
Categorically, action calculi are based on symmetric monoidal 2-categories rather than premonoidal pre-2-categories, so the categorial presentation is simpler. There is a tradeoff here between the simpler categorical presentation, or the simpler graphical view given by control arcs.
To see the difference between these two presentations categorically, note that there are two ways to embed a premonoidal category into a monoidal category. The presentation here is based on an embedding into state transformers, described in an appendix. But it is also possible to use a CPS translation, in which any computation whose evaluation is delayed is placed in a continuation. Graphically, this corresponds to boxing the delayed computations, in a manner similar to the graphs above. Whether this informal connection can be formalized is left for future work.
In his thesis, Hasegawa presents a similar categorical model for lambda-calculi with explicit sharing. His setting is:
The second difference is an orthogonal issue, caused by different motivating examples. Hasegawa's motivating denotational example is the cartesian closed category Dom, where all objects have least elements, but maps are not necessarily strict: this provides a semantics for call by name or call by need languages. Our motivating example is the categories Cpo Cpo where Cpo only has a partial trace: this provides a semantics for call by value languages.