paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Abstracting definitional interpreters (functional pearl)

抽象定义解释器(函数式珍珠)
ICFP 1(ICFP)2017匹配度 3/10 · 论文属于抽象解释与高阶语言程序分析的形式化基础工作,与用户关注的LLM/Agent、机器学习系统、浮点程序分析及贝叶斯程序分析等交叉方向没有直接关联。虽然涉及静态分析理论基础,但不涉及当前研究画像中的核心问题。引用 57 inbox
David Darais, Nicholas Labich, Phúc C. Nguyen, David Van Horn
dblp: 2026-09-10crossref: 2026-09-10arxiv: 2026-09-10

AI 速览

一句话:提出以定义解释器作为高阶语言抽象解释的基础,并发现抽象定义解释器能自然继承下推控制流精度。

本文是一篇函数式珍珠,探讨以定义解释器(definitional interpreter)作为高阶语言抽象解释的基础。作者指出,单子风格的定义解释器可自然支持收集语义、抽象解释、符号执行及其混合。核心洞察在于复现 Reynolds 的观察:定义解释器使被定义语言继承定义语言的性质。作者证明这一点同样适用于抽象定义解释器:抽象定义解释器能继承所谓“下推控制流”性质,即抽象语义中函数调用与返回精确匹配,而这仅由定义语言的函数调用机制天然提供。以往为高阶语言实现该性质的方法从状态机语义出发,需要大量技术工程来恢复精度;本文方法则无需额外机制。

问题
高阶语言抽象解释中精确匹配函数调用与返回(下推控制流)通常需要复杂技术,难以自然获得。
方法
采用定义解释器(尤其是单子风格)作为抽象解释的基础,通过定义语言继承性质来构建抽象定义解释器。
评估
通过函数式珍珠的形式,以概念论证和示例展示抽象定义解释器无需额外机制即可继承下推控制流精度。
原文摘要(Abstract)

In this functional pearl, we examine the use of definitional interpreters as a basis for abstract interpretation of higher-order programming languages. As it turns out, definitional interpreters, especially those written in monadic style, can provide a nice basis for a wide variety of collecting semantics, abstract interpretations, symbolic executions, and their intermixings. But the real insight of this story is a replaying of an insight from Reynold's landmark paper, Definitional Interpreters for Higher-Order Programming Languages , in which he observes definitional interpreters enable the defined-language to inherit properties of the defining-language. We show the same holds true for definitional abstract interpreters. Remarkably, we observe that abstract definitional interpreters can inherit the so-called “pushdown control flow” property, wherein function calls and returns are precisely matched in the abstract semantics, simply by virtue of the function call mechanism of the defining-language. The first approaches to achieve this property for higher-order languages appeared within the last ten years, and have since been the subject of many papers. These approaches start from a state-machine semantics and uniformly involve significant technical engineering to recover the precision of pushdown control flow. In contrast, starting from a definitional interpreter, the pushdown control flow property is inherent in the meta-language and requires no further technical mechanism to achieve.

链接与引用

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

BibTeX
@article{DaraisLNH17,
  title = {Abstracting definitional interpreters (functional pearl)},
  author = {David Darais and Nicholas Labich and Phúc C. Nguyen and David Van Horn},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {1},
  number = {ICFP},
  year = {2017},
  doi = {10.1145/3110256}
}