paperbot · PL 论文追踪

全部论文 待读 收藏

P2 A simple and efficient implementation of strong call by need by an abstract machine

强按需调用的简单高效实现:一种抽象机方法
ICFP 6(ICFP)2022匹配度 2/10 · 论文属于纯函数式编程/形式语义的抽象机推导,关注 lambda 演算强按需调用与 Krivine 机,与用户核心方向(PL 与 AI/LLM 交叉、静态分析、浮点/贝叶斯程序分析)无直接关联;仅在 PL/形式语义的理论形式上略有交集。引用 2 inbox
Małgorzata Biernacka, Witold Charatonik, Tomasz Drab
crossref: 2026-09-10

AI 速览

一句话:从 memothunk 求值器自动推导强按需调用抽象机,证明其保守扩展 Krivine 机并以双线性步模拟 normal order。

强按需调用(strong call-by-need)要求在 lambda 演算的抽象体之下继续归约,是实现惰性函数式语言中规范化求值的关键,但其高效实现通常较为复杂。本文从使用 memothunks 实现惰性的高阶求值器出发,借助实现“函数式对应”(functional correspondence)的现成变换工具,自动推导出对应的抽象机,从而得到简洁且易理解的机器描述。作者进一步证明:所得机器保守扩展了弱按需调用策略下的惰性 Krivine 机,并且以双线性(bilinear)步数模拟 normal-order 策略。这一结果既保证了机器相对于经典弱求值器的兼容性,也给出了其归约效率的理论刻画。

问题
强按需调用(strong call-by-need)需要在抽象体之下进行归约,其高效实现通常复杂且难以直接推导。
方法
先写出使用 memothunks 实现惰性的高阶求值器,再借助实现函数式对应的现成变换工具自动推导出强按需调用抽象机。
评估
形式化证明所得机器保守扩展弱按需调用的惰性 Krivine 机,并证明其以双线性步数模拟 normal-order 策略。
原文摘要(Abstract)

We present an abstract machine for a strong call-by-need strategy in the lambda calculus. The machine has been derived automatically from a higher-order evaluator that uses the technique of memothunks to implement laziness. The derivation has been done with the use of an off-the-shelf transformation tool implementing the "functional correspondence" between higher-order interpreters and abstract machines, and it yields a simple and concise description of the machine. We prove that the resulting machine conservatively extends the lazy version of Krivine machine for the weak call-by-need strategy, and that it simulates the normal-order strategy in bilinear number of steps.

链接与引用

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

BibTeX
@article{paperbot1482,
  title = {A simple and efficient implementation of strong call by need by an abstract machine},
  author = {Małgorzata Biernacka and Witold Charatonik and Tomasz Drab},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {6},
  number = {ICFP},
  year = {2022},
  doi = {10.1145/3549822}
}