paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Automatic amortized resource analysis with the Quantum physicist’s method

基于量子物理学家方法的自动摊销资源分析
ICFP 5(ICFP)2021匹配度 2/10 · 该论文属于静态分析与类型系统(自动摊销资源分析 AARA)工作,虽与 PL/程序分析大方向沾边,但既不涉及 LLM/Agent 与静态分析的交叉,也不涉及浮点程序分析或贝叶斯程序分析,未命中用户画像中任一正在追的核心问题。引用 5 inbox
David M. Kahn, Jan Hoffmann
crossref: 2026-09-10

AI 速览

一句话:提出量子物理学家方法,扩展 AARA 类型系统,以更紧界分析栈等非单调资源。

论文提出“量子物理学家方法”(quantum physicist's method),用于改进摊销资源分析中的物理学家方法,从而更精确地分析非单调消耗的资源(如栈)。该方法包含 worldviews 与 resource tunneling,分别类比量子叠加与量子隧穿。作者将其用于扩展自动摊销资源分析(AARA)类型系统,使其能推导基于树深度的资源界,并引入 remainder contexts 以辅助线性类型系统的簿记。评估通过限制 OCaml 标准库 Set 模块函数的栈使用,与当前 AARA 实现相比,新系统以中等开销得到更紧的界。

问题
如何对非单调消耗的资源(如栈)进行更精确的自动摊销资源分析。
方法
提出量子物理学家方法,包含 worldviews 与 resource tunneling,并据此扩展 AARA 类型系统、引入 remainder contexts。
评估
在 OCaml 标准库 Set 模块函数上评估栈使用界的推导,并与先进 AARA 实现比较,结果显示界更紧且仅带来中等开销。
原文摘要(Abstract)

We present a novel method for working with the physicist's method of amortized resource analysis, which we call the quantum physicist's method. These principles allow for more precise analyses of resources that are not monotonically consumed, like stack. This method takes its name from its two major features, worldviews and resource tunneling, which behave analogously to quantum superposition and quantum tunneling. We use the quantum physicist's method to extend the Automatic Amortized Resource Analysis (AARA) type system, enabling the derivation of resource bounds based on tree depth. In doing so, we also introduce remainder contexts, which aid bookkeeping in linear type systems. We then evaluate this new type system's performance by bounding stack use of functions in the Set module of OCaml's standard library. Compared to state-of-the-art implementations of AARA, our new system derives tighter bounds with only moderate overhead.

链接与引用

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

BibTeX
@article{paperbot1141,
  title = {Automatic amortized resource analysis with the Quantum physicist’s method},
  author = {David M. Kahn and Jan Hoffmann},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {5},
  number = {ICFP},
  year = {2021},
  doi = {10.1145/3473581}
}