Every constructive model of computation (CMC) has an underlying composition mechanism for combining simple computation devices into more complex ones. Composition can be done by (explicitly or implicitly) defining control flow, data flow or any combination thereof. Control flow specifies the order in which individual computation devices are activated, whereas data flow defines how data is exchanged among them. Unfortunately, traditional CMCs either mix data and control or only consider one dimension explicitly, which makes it difficult to reason about data flow and control flow separately. Reasoning about these dimensions orthogonally is a crucial desideratum for optimisation, maintainability and verification purposes. In this paper, we introduce a novel model that explicitly treats data flow and control flow as separate dimensions, while providing modularity. As the model is rooted in category theory, it provides category-theoretic operations for compositionally constructing sequential or parallel composites. Compositionality entails that a composite exhibits the same properties as its respective constituents, including separation of concerns and modularity.
翻译:每一种构造性计算模型都依赖于底层组合机制,将简单的计算设备组合成更复杂的系统。组合可以通过(显式或隐式地)定义控制流、数据流或二者的结合来实现。控制流规定了各个计算设备的激活顺序,而数据流则定义了数据在这些设备之间的交换方式。然而,传统的构造性计算模型要么将数据与控制混为一谈,要么仅显式考虑其中一维,这使得难以分别对数据流和控制流进行推理。正交地考虑这两个维度对于优化、可维护性和验证至关重要。本文提出了一种新颖的模型,该模型将数据流和控制流作为独立维度显式处理,同时保持了模块性。由于该模型植根于范畴论,它提供了范畴论操作,用于组合式构建顺序或并行复合体。组合性意味着复合体具有与其各自组成部分相同的性质,包括关注点分离和模块性。