paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Asynchronous effects

异步效应
POPL 5(POPL)2021匹配度 1/10 · 该论文研究异步代数效应的核心演算、类型安全证明与原型实现,属于编程语言语义与并发理论,与用户关注的 LLM/Agent 静态分析、浮点程序分析、贝叶斯程序分析以及 AI 与 PL 交叉均无直接关系。引用 6 inbox
Danel Ahman, Matija Pretnar
crossref: 2026-09-10

AI 速览

一句话:提出异步代数效应核心演算 λæ,将操作调用解耦为信号与结果中断,并给出类型安全证明与原型。

论文研究如何用代数效应支持异步编程。传统代数效应通常同步处理操作调用,本文将其扩展为异步:调用操作时只发出需要执行实现的信号,运行中的计算可继续执行,随后被该操作的结果中断,并通过安装中断处理器对结果作出反应。作者在小型核心演算 λæ 中形式化该机制,在 Agda 中机器化验证其类型安全,并给出 OCaml 原型实现。案例研究涵盖多方 Web 应用、抢占式多线程、远程函数调用以及代数效应 runner 的并行变体,展示了该设计在异步场景中的表达力与灵活性。

问题
如何将异步性自然地融入代数效应,突破传统同步操作调用语义的限制。
方法
提出核心演算 λæ,将操作调用解耦为信号与结果中断,并用中断处理器响应结果;在 Agda 中形式化类型安全证明,在 OCaml 中实现原型。
评估
通过多方 Web 应用、抢占式多线程、远程函数调用和并行 runner 等示例展示表达力,并以 Agda 证明和 OCaml 原型验证形式化与可实现性。
原文摘要(Abstract)

We explore asynchronous programming with algebraic effects. We complement their conventional synchronous treatment by showing how to naturally also accommodate asynchrony within them, namely, by decoupling the execution of operation calls into signalling that an operation’s implementation needs to be executed, and interrupting a running computation with the operation’s result, to which the computation can react by installing interrupt handlers. We formalise these ideas in a small core calculus, called λ æ . We demonstrate the flexibility of λ æ using examples ranging from a multi-party web application, to preemptive multi-threading, to remote function calls, to a parallel variant of runners of algebraic effects. In addition, the paper is accompanied by a formalisation of λ æ ’s type safety proofs in Agda, and a prototype implementation of λ æ in OCaml.

链接与引用

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

BibTeX
@article{paperbot1158,
  title = {Asynchronous effects},
  author = {Danel Ahman and Matija Pretnar},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {5},
  number = {POPL},
  year = {2021},
  doi = {10.1145/3434305}
}