Table of Contents
Fetching ...

Dependent Directed Wiring Diagrams for Composing Instantaneous Systems

Keri D'Angelo, Sophie Libkind

TL;DR

The paper develops a compositional framework for connecting input\/output systems where outputs may be instantly influenced by inputs. It extends directed wiring diagrams to a dependent variant that tracks output dependencies on inputs and enforces acyclicity, then builds two algebras, ${\mathsf{Mealy}}$ and ${\mathsf{SF}}$, for composing Mealy machines and stock-flow diagrams within this operadic setting. A natural transformation ${\mathsf{SF}} \Rightarrow {\mathsf{Mealy}}$ provides a semantics interpreting stock-flow diagrams as differential equations realized as Mealy machines, enabling modular modeling and analysis. The approach yields a principled method for composing instantaneous systems and their differential representations, with an accompanying Julia implementation and future work on unifying directed and undirected stock-flow approaches.

Abstract

Directed wiring diagrams can be used as a composition pattern for composing input/output systems such as Moore machines. In a Moore machine, the input parametrizes an internal state and the internal state defines the output. Because the value of the output is shielded from the input by the internal state, Moore machines can compose by connecting the output of any machine to the input of any other machine. These connections are defined by the trace wires in a directed wiring diagram. Unlike Moore machines, Mealy machines allow the output to be directly and instantaneously affected by the input. In order to compose such machines via directed wiring diagrams, it is necessary to avoid cycles between trace wires in the wiring digram and dependencies of outputs on inputs. To capture these patterns of composition, we introduce an operad of dependent directed wiring diagrams. We then define an algebra of Mealy machines on this operad and an algebra of stock and flow diagrams in which the values of auxiliary variables are parameterized by inputs. Finally, we give a semantics for this algebra of stock and flow diagrams by giving a morphism of algebras from stock and flow diagrams into Mealy machines.

Dependent Directed Wiring Diagrams for Composing Instantaneous Systems

TL;DR

The paper develops a compositional framework for connecting input\/output systems where outputs may be instantly influenced by inputs. It extends directed wiring diagrams to a dependent variant that tracks output dependencies on inputs and enforces acyclicity, then builds two algebras, and , for composing Mealy machines and stock-flow diagrams within this operadic setting. A natural transformation provides a semantics interpreting stock-flow diagrams as differential equations realized as Mealy machines, enabling modular modeling and analysis. The approach yields a principled method for composing instantaneous systems and their differential representations, with an accompanying Julia implementation and future work on unifying directed and undirected stock-flow approaches.

Abstract

Directed wiring diagrams can be used as a composition pattern for composing input/output systems such as Moore machines. In a Moore machine, the input parametrizes an internal state and the internal state defines the output. Because the value of the output is shielded from the input by the internal state, Moore machines can compose by connecting the output of any machine to the input of any other machine. These connections are defined by the trace wires in a directed wiring diagram. Unlike Moore machines, Mealy machines allow the output to be directly and instantaneously affected by the input. In order to compose such machines via directed wiring diagrams, it is necessary to avoid cycles between trace wires in the wiring digram and dependencies of outputs on inputs. To capture these patterns of composition, we introduce an operad of dependent directed wiring diagrams. We then define an algebra of Mealy machines on this operad and an algebra of stock and flow diagrams in which the values of auxiliary variables are parameterized by inputs. Finally, we give a semantics for this algebra of stock and flow diagrams by giving a morphism of algebras from stock and flow diagrams into Mealy machines.

Paper Structure

This paper contains 16 sections, 22 theorems, 56 equations, 4 figures.

Key Result

Lemma 2.2

If $f \colon \mathbb R^A \to \mathbb R^B$ respects $A \leftarrow R \to B$ and $g \colon \mathbb R^B \to \mathbb R^C$ respects $B \leftarrow S \to C$, then $g\circ f \colon \mathbb R^A \to \mathbb R^C$ respects the composite span $A \leftarrow R \times_B S \to C$.

Figures (4)

  • Figure 1: A directed wiring diagram $\binom{2}{2} + \binom{1}{1} \to \binom{3}{3}$. There are three input wires, a single trace wire, and three output wires.
  • Figure 2: (a) A directed wiring diagram $f \colon \binom{2}{2} \to \binom{3}{3}$ is depicted in purple. The blue dashed lines show a dependency $d_X \in R\binom{2}{2}$ where the first output port depends solely on the first input port and the second output port depends solely on the second input port. (b) In the resulting dependency $R(f)(d_X) \in R\binom{3}{3}$ the first output port depends on the first input port, the second output port has no dependencies, and the third output port depends on the first and second input ports.
  • Figure 3: Stock-flow diagrams representing a changing (a) water supply and (b) concentration of pollutants.
  • Figure 4: Dependent directed wiring diagrams for composing the stock-flow diagrams in \ref{['fig:water-pollutant-sf']}.

Theorems & Definitions (48)

  • Example 1.1
  • Example 1.2
  • Definition 2.2
  • Lemma 2.2
  • Lemma 2.2
  • Lemma 2.2
  • Lemma 2.2
  • Proposition 3.0
  • Example 3.1
  • Definition 3.2
  • ...and 38 more