paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Modular, higher order cardinality analysis in theory and practice

模块化高阶基数分析:理论与实践
JFP vol.272017匹配度 2/10 · 该论文属于程序分析与抽象解释,具备理论证明与编译器实现,但研究对象是惰性函数式语言的高阶基数分析,用于优化单次使用的 thunk 与 lambda,与用户核心关注的 LLM/Agentic 程序静态分析、浮点程序分析、贝叶斯程序分析等交叉方向无直接关联。引用 7 inbox
ILYA SERGEY, DIMITRIOS VYTINIOTIS, SIMON L. PEYTON JONES, JOACHIM BREITNER
crossref: 2026-09-10

AI 速览

一句话:提出一种模块化高阶基数分析,可识别单次使用的 thunk 与 lambda,并证明其相对 call-by-need 语义的可靠性。

自20世纪80年代中期以来,函数式语言编译器一直在尝试识别并利用只使用一次的 thunk 和 lambda,但在实践中兼顾分析能力与简洁性并不容易。本文针对高阶语言提出一种模块化的基数分析,可发现 single-entry thunk 与 one-shot lambda。作者证明该分析相对于标准 call-by-need 语义是可靠的,并在一个完整的最先进优化编译器中实现和测量。结果显示,该分析能识别大量单次使用的对象,并支撑多种程序优化。本文扩展了 POPL 2014 会议论文,补充了证明、更详细的评估,并深入考察导致分析精度损失的因素。

问题
如何在高阶惰性函数式语言中,以模块化、简单且有效的方式静态识别只使用一次的 thunk 与 lambda,从而支持编译器优化。
方法
提出高阶基数分析,证明其相对标准 call-by-need 语义的可靠性,并在实际优化编译器中实现该分析。
评估
在完整的最先进优化编译器中测量分析发现的 single-entry thunk 和 one-shot lambda 数量及其启用的优化,并分析精度损失来源。
原文摘要(Abstract)

Abstract Since the mid '80s, compiler writers for functional languages (especially lazy ones) have been writing papers about identifying and exploiting thunks and lambdas that are used only once. However, it has proved difficult to achieve both power and simplicity in practice. In this paper, we describe a new, modular analysis for a higher order language, which is both simple and effective. We prove the analysis sound with respect to a standard call-by-need semantics, and present measurements of its use in a full-scale, state-of-the-art optimising compiler. The analysis finds many single-entry thunks and one-shot lambdas and enables a number of program optimisations. This paper extends our preceding conference publication (Sergey et al. 2014 Proceedings of the 41st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL 2014) . ACM, pp. 335–348) with proofs, expanded report on evaluation and a detailed examination of the factors causing the loss of precision in the analysis.

链接与引用

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

BibTeX
@article{paperbot73,
  title = {Modular, higher order cardinality analysis in theory and practice},
  author = {ILYA SERGEY and DIMITRIOS VYTINIOTIS and SIMON L. PEYTON JONES and JOACHIM BREITNER},
  journal = {Journal of Functional Programming},
  volume = {27},
  year = {2017},
  doi = {10.1017/s0956796817000016}
}