从部分到单子:带效应的组合代数
From Partial to Monadic: Combinatory Algebra with Effects
AI总结:
本文提出 Monadic Combinatory Algebras(MCAs),以单子将部分组合代数推广到可表达非确定性、状态和续延等效应,并给出其 Freyd 范畴刻画及带效应可实现性构造。
摘要:
Partial Combinatory Algebras(PCAs,部分组合代数)为无类型 λ-演算提供了基础模型,并作为许多可计算性概念的基础,例如可实现性理论。然而,PCAs 仅将非终止性作为一种计算效应纳入其中,因此支持的计算概念非常有限。为了提供一个能更好地内化多种计算效应的框架,本文提出了 Monadic Combinatory Algebras(MCAs,单子组合代数)的概念。MCAs 通过将组合代数建立在由单子体现的底层计算效应之上来推广 PCAs 的概念。我们表明,MCAs 可以通过底层单子支持各种副作用,例如非确定性、有状态计算和续延。我们进一步沿用 PCAs 的类似联系,在 Freyd Categories(弗罗伊德范畴)中获得了 MCAs 的范畴论刻画。此外,我们探索了 MCAs 在可实现性理论中的应用,给出了通过证据框架导出的带效应可实现性三元组和集合的构造,从而推广了传统的基于 PCA 的可实现性语义。对 PCAs 这一基础概念的单子式推广为在内部推理带效应计算提供了一个全面而强大的框架,为更广泛地研究计算及其与可实现性模型和编程语言的关系铺平了道路。
英文摘要:
Partial Combinatory Algebras (PCAs) provide a foundational model of the untyped $λ$-calculus and serve as the basis for many notions of computability, such as realizability theory. However, PCAs support a very limited notion of computation by only incorporating non-termination as a computational effect. To provide a framework that better internalizes a wide range of computational effects, this paper puts forward the notion of Monadic Combinatory Algebras (MCAs). MCAs generalize the notion of PCAs by structuring the combinatory algebra over an underlying computational effect, embodied by a monad. We show that MCAs can support various side effects through the underlying monad, such as non-determinism, stateful computation and continuations. We further obtain a categorical characterization of MCAs within Freyd Categories, following a similar connection for PCAs. Moreover, we explore the application of MCAs in realizability theory, presenting constructions of effectful realizability triposes and assemblies derived through evidenced frames, thereby generalizing traditional PCA-based realizability semantics. The monadic generalization of the foundational notion of PCAs provides a comprehensive and powerful framework for internally reasoning about effectful computations, paving the path to a more encompassing study of computation and its relationship with realizability models and programming languages.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。