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.
翻译:有向接线图可作为输入/输出系统(如摩尔机)的组合模式。在摩尔机中,输入参数化内部状态,而内部状态决定输出。由于输出值通过内部状态与输入隔离,摩尔机可通过将任意机器的输出连接至其他机器的输入进行组合。这些连接由有向接线图中的迹线定义。与摩尔机不同,米利机允许输出直接且瞬时地受输入影响。为了通过有向接线图组合此类机器,必须避免接线图中迹线间的循环以及输出对输入的依赖关系。为捕捉此类组合模式,我们引入了依赖有向接线图的操作元。随后在此操作元上定义了米利机的代数,以及辅助变量值由输入参数化的存量流量图代数。最后,通过给出从存量流量图到米利机的代数态射,我们为该存量流量图代数提供了语义解释。