Abstract: We recast dataflow in a modern categorical light using profunctors as a generalization of relations. The well known causal anomalies associated with relational semantics of indeterminate dataflow are avoided, but still we preserve much of the intuitions of a relational model. The development fits with the view of categories of models for concurrency and the general treatment of bisimulation they provide. In particular it fits with the recent categorical formulation of feedback using traced monoidal categories. The payoffs are: (1) explicit relations to existing models and semantics, especially the usual axioms of monotone IO automata are read off from the definition of profunctors, (2) a new definition of bisimulation for dataflow, the proof of the congruence of which benefits from the preservation properties associated with open maps and (3) a treatment of higher-order dataflow as a biproduct, essentially by following the geometry of interaction programme.
Introduction
In the 1970s, Gilles Kahn demonstrated that deterministic dataflow networks could be elegantly modeled as functions on streams. However, the introduction of non-determinism—such as a "merge" component that interleaves inputs from multiple channels—breaks this simple functional model.
The central challenge is the Brock-Ackerman anomaly: two non-deterministic components may exhibit identical input-output relations yet behave differently when embedded within a feedback loop. This occurs because simple relations discard causal information—the specific temporal dependencies between inputs and outputs. To address this, a compositional model is required that respects these causal dependencies while maintaining the intuitive appeal of relational semantics.
Methodology: Profunctors and Path Categories
This research recasts dataflow using profunctors, which serve as a "fattened" generalization of relations. While a standard relation merely indicates whether an input is related to an output (a truth value), a profunctor maps to the category of Sets, allowing the model to distinguish between different ways or causal histories that lead to an output.
Path Categories and Traces
Instead of relating sets of values, the model relates "path categories" derived from Mazurkiewicz traces. These traces represent histories of events where independent actions (e.g., events on different ports) do not have a forced linear order. By modeling processes as profunctors between these path categories, the framework tracks which sequence of inputs enabled a specific output.
Feedback and Traced Monoidal Categories
To represent feedback loops, the authors utilize the categorical notion of a "trace." However, the standard "coend" definition of a trace in monoidal categories is often too permissive for dataflow, as it may allow outputs to precede the inputs that caused them. The paper introduces a restricted trace that enforces strict causal precedence.
Key Insights
- Automatic Axiomatization: A significant finding is that the standard axioms for "monotone port automata" are not arbitrary; they emerge naturally from the definition of profunctors over path categories.
- The Geometry of Interaction (GoI): By applying the GoI program from linear logic, the authors extend the model to "higher-order" dataflow, where processes themselves can be passed as values along channels.
- Bisimulation as a Congruence: Using the framework of "open maps," the authors derive a natural definition of bisimulation. They prove this is a congruence, ensuring that substituting a component with a bisimilar one does not alter the global behavior of the network.
Results and Future Work
The paper successfully defines SProf⊥, a category of stable port profunctors that constitutes a traced monoidal category. This provides a fully compositional semantics that resolves the Brock-Ackerman and Trakhtenbrot-Rabinovich anomalies.
Future research aims to incorporate "fairness"—the guarantee that a process will eventually process all input ports—which may require a more granular exploitation of event independence. Additionally, the authors seek to apply this profunctor-based domain theory to provide a compositional operational definition for complex hardware description languages like Verilog HDL.
Summary updated