paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Cakes That Bake Cakes: Dynamic Computation in CakeML

烤蛋糕的蛋糕:CakeML 中的动态计算
PLDI 7(PLDI)2023匹配度 3/10 · 论文属于形式化验证与编译器/定理证明工程,与用户关注的“LLM/Agent 改进形式化验证”仅有间接关联;未涉及静态分析、Agentic 程序、浮点程序分析或贝叶斯程序分析,也未使用 LLM,因此不匹配核心研究方向。引用 16 inbox
Thomas Sewell, Magnus O. Myreen, Yong Kiam Tan, Ramana Kumar, Alexander Mihajlovic, Oskar Abrahamsson, Scott Owens
crossref: 2026-09-10

AI 速览

一句话:为已验证的 CakeML 编译器加入 Eval 原语,实现运行时代码求值与动态执行,并支持首个可验证的 LCF 风格定理证明器运行时环境。

本文扩展了经过形式化验证的 CakeML 编译器,引入新的语言原语 Eval,使程序能够在运行时求值新的 CakeML 语法。该实现支持一种雄心勃勃的运行时编译与动态执行形式:原有代码与动态加入的代码可以共享高阶值并相互递归调用。据作者所知,这是首个能够支持标准 LCF 风格定理证明器设计的可验证运行时环境。为支持动态计算语义而修改现代 CakeML 编译器流水线及其证明是一项庞大的工程。论文回顾了项目中的设计决策、证明技术与证明工程经验,并指出了若干意外出现的复杂问题。

问题
如何在经过形式化验证的编译器运行时环境中支持运行时代码的编译与动态执行,并使新旧代码共享高阶值且能相互递归调用。
方法
扩展 CakeML 编译器流水线及其机器化证明,引入新语言原语 Eval 以支持运行时语法求值,并系统总结相应的设计决策与证明技术。
评估
通过完整修改编译器与证明并机器化验证动态计算语义来评估;其运行时能力可支撑标准 LCF 风格定理证明器设计,同时总结了证明工程经验与意外复杂点。
原文摘要(Abstract)

We have extended the verified CakeML compiler with a new language primitive, Eval, which permits evaluation of new CakeML syntax at runtime. This new implementation supports an ambitious form of compilation at runtime and dynamic execution, where the original and dynamically added code can share (higher-order) values and recursively call each other. This is, to our knowledge, the first verified run-time environment capable of supporting a standard LCF-style theorem prover design. Modifying the modern CakeML compiler pipeline and proofs to support a dynamic computation semantics was an extensive project. We review the design decisions, proof techniques, and proof engineering lessons from the project, and highlight some unexpected complications.

链接与引用

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

BibTeX
@article{paperbot2011,
  title = {Cakes That Bake Cakes: Dynamic Computation in CakeML},
  author = {Thomas Sewell and Magnus O. Myreen and Yong Kiam Tan and Ramana Kumar and Alexander Mihajlovic and Oskar Abrahamsson and Scott Owens},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {7},
  number = {PLDI},
  year = {2023},
  doi = {10.1145/3591266}
}