paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Tail Modulo Async-Await

异步等待下的尾模优化
ICFP 10(ICFP)2026匹配度 5/10 · 论文属于编程语言与编译优化领域,涉及异步尾调用优化的形式化证明与OCaml实现,符合用户对理论形式化与工程实现兼顾的偏好;但完全不涉及AI/LLM、静态分析、浮点程序分析或贝叶斯程序分析,与用户核心研究方向(PL与AI交叉、浮点、贝叶斯)缺乏直接关联。引用 0 inbox
Emma Nardino, Ludovic Henrio, Gabriel Radanne, Yannick Zakowski
crossref: 2026-09-10

AI 速览

一句话:将尾调用优化扩展到异步调用,提出 TMA 变换,避免多余任务,并可与 TMC 结合实现并行且空间优化的递归函数。

异步编程中的尾递归函数常因异步调用创建任务而无法获得尾调用优化,带来额外任务与空间开销。本文提出 TMA(Tail Modulo Async-Await),一种针对异步尾递归函数的代码变换,避免创建不必要的任务;并将 TMA 与已有的 TMC(Tail Modulo Constructors)优化结合,使构造子下含多个尾调用的递归函数被转换为并行版本,同时获得空间优化。作者在代表性演算上形式化这两种优化,并通过反向模拟证明其正确性。最后实现 OCaml 语法扩展原型,实验表明该方案能同时优化内存占用与执行时间。

问题
异步尾递归中的尾调用因任务创建而无法被有效优化,导致不必要的任务分配与空间开销。
方法
提出 TMA 代码变换,并与 TMC 结合,在代表性演算上形式化两种优化,通过反向模拟证明其正确性。
评估
将优化实现为 OCaml 语法扩展原型,并通过实验评估,显示其在内存占用和执行时间上均有优化。
原文摘要(Abstract)

This article extends tail-call optimisation by applying it to asynchronous calls. We first introduce TMA, a novel code transformation for asynchronous tail recursive functions that prevents the creation of unnecessary tasks. We then show how to combine TMA with the existing TMC optimisation; we obtain an optimisation able to turn a recursive function with multiple tail calls under constructors into a parallel version of the function, also optimised in space. We formalise both optimisations over representative calculi, and prove them correct through backward simulations. Finally, we provide a proof-of-concept implementation as an OCaml syntax extension and evaluate it experimentally, showing our approach optimises both memory and execution time

链接与引用

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

BibTeX
@article{NardinoHRZ26,
  title = {Tail Modulo Async-Await},
  author = {Emma Nardino and Ludovic Henrio and Gabriel Radanne and Yannick Zakowski},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {ICFP},
  year = {2026},
  doi = {10.1145/3828684}
}