paperbot · PL 论文追踪

全部论文 待读 收藏

P2 No-brainer CPS conversion (functional pearl)

无需动脑的 CPS 转换(函数式珍珠)
ICFP 1(ICFP)2017匹配度 1/10 · 该论文属于程序语言与编译理论中的 CPS 转换算法,关注无行政归约项和线性时间实现,与用户核心方向(LLM/Agent 与静态分析、浮点程序分析、贝叶斯程序分析及其与 LLM 的交叉)没有直接交集;仅在最宽泛的 PL 理论基础层面有微弱关联。引用 1 inbox
Milo Davis, William Meehan, Olin Shivers
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出线性时间 CPS 转换算法,不引入行政归约项,输出在 no-brainer 归约系统下即为范式。

传统上将直接风格(direct-style)λ-calculus 项转换为 continuation-passing style(CPS)的算法通常会引入“行政归约项”(administrative redexes),必须再经过一趟清理。本文提出一个简单且线性的时间 CPS 转换算法,完全不引入行政归约项。其输出项在一个更广的归约系统中已处于范式;该系统把行政归约项推广为“no-brainer redexes”,即归约后项的大小会缩小的归约项。作者陈述了刻画该算法理想性质的一系列定理,并给出完整证明的思路。作为 functional pearl,工作侧重算法与理论证明,而非实验评估。

问题
CPS 转换通常引入 administrative redexes,导致结果需要额外清理。
方法
设计一个简单线性时间的 CPS 转换算法,并定义 no-brainer redexes 归约系统来避免并消除这些冗余。
评估
通过定理与证明草图论证算法的正确性与范式性质;没有实验评估。
原文摘要(Abstract)

Algorithms that convert direct-style λ-calculus terms to their equivalent terms in continuation-passing style (CPS) typically introduce so-called “administrative redexes:” useless artifacts of the conversion that must be cleaned up by a subsequent pass over the result to reduce them away. We present a simple, linear-time algorithm for CPS conversion that introduces no administrative redexes. In fact, the output term is a normal form in a reduction system that generalizes the notion of “administrative redexes” to what we call “no-brainer redexes,” that is, redexes whose reduction shrinks the size of the term. We state the theorems which establish the algorithm's desireable properties, along with sketches of the full proofs.

链接与引用

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

BibTeX
@article{DavisMS17,
  title = {No-brainer CPS conversion (functional pearl)},
  author = {Milo Davis and William Meehan and Olin Shivers},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {1},
  number = {ICFP},
  year = {2017},
  doi = {10.1145/3110267}
}