paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Higher-Order Asynchronous Effects

高阶异步效应
LMCS vol.Volume 20, Issue 32024匹配度 2/10 · 该论文研究高阶异步效应、代数效应与类型系统,属于编程语言理论/形式化方向,但并未涉及用户画像中的静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析等核心议题。仅在“理论形式化+原型实现”这一宽泛偏好上有微弱关联。引用 0 inbox
Danel Ahman, Matija Pretnar
crossref: 2026-09-10

AI 速览

一句话:提出高阶异步效应,将操作调用解耦为信号与中断,用核心演算统一异步与代数效应。

代数效应通常按同步方式处理,难以自然表达异步计算。本文在高阶代数效应中引入异步机制:将操作调用的执行解耦为“发出需要执行该操作的信号”和“用操作结果中断当前计算”,后者可通过安装中断处理器来响应。作者用一个小型核心演算形式化该思想,并以多方 Web 应用、抢占式多线程、可取消远程函数调用及并行效应 runner 等例子展示其灵活性。类型安全证明已在 Agda 中机器化,并给出 OCaml 原型实现。

问题
代数效应传统上采用同步处理,如何将其自然扩展到异步操作与中断式响应?
方法
提出高阶异步效应核心演算,将操作调用解耦为信号与中断,允许计算安装中断处理器;在 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 and demonstrate its flexibility using examples ranging from a multi-party web application, to pre-emptive multi-threading, to (cancellable) remote function calls, to a parallel variant of runners of algebraic effects. In addition, the paper is accompanied by a formalisation of the calculus's type safety proofs in Agda, and a prototype implementation in OCaml.

链接与引用

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

BibTeX
@article{paperbot2723,
  title = {Higher-Order Asynchronous Effects},
  author = {Danel Ahman and Matija Pretnar},
  journal = {Logical Methods in Computer Science},
  volume = {Volume 20, Issue 3},
  year = {2024},
  doi = {10.46298/lmcs-20(3:26)2024}
}