paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Scoped Effects, Scoped Operations, and Parameterized Algebraic Theories

作用域效应、作用域操作与参数化代数理论
TOPLAS 47(2)2025匹配度 1/10 · 论文是纯编程语言理论(代数效应、monad、形式语义),与用户关注的静态分析、LLM/Agent、浮点/贝叶斯程序分析均无直接关联,也未涉及任何AI或程序分析应用场景。引用 3 inbox
Cristina Matache, Sam Lindley, Sean Moss, Sam Staton, Nicolas Wu, Zhixuan Yang
crossref: 2026-09-10

AI 速览

一句话:将作用域效应翻译为参数化代数理论的变体,给出等式推理与用生成元和方程刻画 monad 的新方法。

代数效应通过代数操作与等式公理刻画 monad,但定界作用域、动态分配资源等编程特性需要作用域效应等扩展。本文提出一种新视角:将作用域效应翻译为参数化代数理论的一种变体。该翻译为作用域效应提供了新的等式推理方法,并给出一种替代性的 monad 刻画,其生成元和方程同时涉及作用域操作与代数操作。作者通过对若干已知作用域效应模型给出等式刻画,展示了该方法的表达力。

问题
代数效应可借操作与方程刻画 monad,但定界作用域或动态资源等机制需要作用域效应等扩展;如何为这些扩展建立统一的语义与等式推理基础是核心问题。
方法
把作用域效应翻译为参数化代数理论的一种变体,并据此用同时涉及作用域操作与代数操作的生成元和方程重新刻画 monad。
评估
通过对若干已知作用域效应模型给出等式刻画,展示该翻译与等式推理方法的表达力和适用性。
原文摘要(Abstract)

Notions of computation can be modeled by monads. Algebraic effects offer a characterization of monads in terms of algebraic operations and equational axioms, where operations are basic programming features, such as reading or updating the state, and axioms specify observably equivalent expressions. However, many useful programming features depend on additional mechanisms such as delimited scopes or dynamically allocated resources. Such mechanisms can be supported via extensions to algebraic effects including scoped effects and parameterized algebraic theories . We present a fresh perspective on scoped effects by translation into a variation of parameterized algebraic theories. The translation enables a new approach to equational reasoning for scoped effects and gives rise to an alternative characterization of monads in terms of generators and equations involving both scoped and algebraic operations. We demonstrate the power of our approach by way of equational characterizations of several known models of scoped effects.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{MatacheLMSWY25,
  title = {Scoped Effects, Scoped Operations, and Parameterized Algebraic Theories},
  author = {Cristina Matache and Sam Lindley and Sean Moss and Sam Staton and Nicolas Wu and Zhixuan Yang},
  journal = {ACM Transactions on Programming Languages and Systems},
  volume = {47},
  number = {2},
  year = {2025},
  doi = {10.1145/3731678}
}