Freyd categories provide a semantics for first-order effectful programming languages by capturing the two different orders of evaluation for products. We enrich Freyd categories in a duoidal category, which provides a new, third choice of parallel composition. Duoidal categories have two monoidal structures which account for the sequential and parallel compositions. The traditional setting is recovered as a full coreflective subcategory for a judicious choice of duoidal category. We give several worked examples of this uniform framework, including the parameterised state monad, basic separation semantics for resources, and interesting cases of change of enrichment
翻译:Freyd 类别为一阶有效编程语言提供了一种语义,通过捕捉两种不同的产品评价顺序,为一阶有效编程语言提供了一种语义。我们将Freed 类别丰富成一个二类动物类别,它提供了新的、第三种平行构成选择。二类动物类别有两个单级结构,它反映顺序和平行构成。传统环境被恢复为明智地选择二类动物类别的一个完整的核心可感性子类别。我们举出了这一统一框架的几个工作实例,包括参数化的状态调子、资源的基本分离语义以及令人感兴趣的浓缩变化案例。