paperbot · PL 论文追踪

全部论文 待读 收藏

P1 On the naturalness of proofs

论证明的自然性
FSE Proceedings of the 2018 26th ACM Joint Meeting on European Software Engineering Conference and Symposium on the Foundations of Software Engineering2018匹配度 6/10 · 论文将语言模型用于 Coq/HOL Light 证明语料,研究证明的自然性与补全,属于 LLM 辅助形式化验证/证明工程,与“AI→PL 改进形式化验证”有交集;但它不涉及静态分析、浮点程序分析或贝叶斯程序分析,且重点在证明语言建模与补全而非分析/验证方法本身。引用 11 inbox
Vincent J. Hellendoorn, Premkumar T. Devanbu, Mohammad Amin Alipour
crossref: 2026-09-12

AI 速览

一句话:用语言模型分析 Coq 与 HOL Light 证明语料,发现证明具有高度可预测的语言规律性,补全可节省超 60% 输入。

机械化证明助手虽能辅助检查证明一致性,但编写证明仍然繁琐,若能像编程语言那样借助统计语言模型提供自动化提示,将显著提升效率。本文研究证明是否具有“自然性”,即是否存在可供语言模型利用的重复语言模式。作者收集 Coq 和 HOL Light 两个证明助手的大型证明语料,并应用当前最先进的语言模型进行预测实验。结果表明,证明文本的预测难度与主流编程语言相当,具有高度可预测性;基于此实现的 Coq 证明代码补全可节省超过 60% 的键入工作量。由于证明在 CompCert 等大型可验证正确程序开发中日益核心,该发现为引入语言学启发的工具支持(如错误发现、证明重写、依赖推荐乃至证明步骤合成)开辟了空间。

问题
机械化证明编写过程冗长繁琐,需要探索证明是否像编程语言一样存在可被统计语言模型利用的重复语言规律,以支持自动化辅助。
方法
收集 Coq 与 HOL Light 的大规模证明语料,应用最先进的语言模型度量并预测证明文本中的语言模式与可预测性。
评估
在证明语料上进行语言模型预测与代码补全实验,结果显示证明高度可预测,Coq 证明补全可减少超过 60% 的键入工作量。
原文摘要(Abstract)

Proofs play a key role in reasoning about programs and verification of properties of systems. Mechanized proof assistants help users in developing and checking the consistency of proofs using the proof language developed by the systems; but even then writing proofs is tedious and could benefit from automated insight. In this paper, we analyze proofs in two different proof assistant systems (Coq and HOL Light) to investigate if there is evidence of "naturalness" in these proofs: viz., recurring linguistic patterns that are amenable to language models, in the way that programming languages are known to be. Such models could be used to find errors, rewrite proofs, help suggest dependencies, and perhaps even synthesize (steps of) proofs. We apply state-of-the-art language models to large corpora of proofs to show that this is indeed the case: proofs are remarkably predictable, much like other programming languages. Code completion tools for Coq proofs could save over 60% of typing effort. As proofs have become increasingly central to writing provably correct, large programs (such as the CompCert C compiler), our demonstration that they are amenable to general statistical models unlocks a range of linguistics-inspired tool support.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot4671,
  title = {On the naturalness of proofs},
  author = {Vincent J. Hellendoorn and Premkumar T. Devanbu and Mohammad Amin Alipour},
  booktitle = {FSE},
  year = {2018},
  doi = {10.1145/3236024.3264832}
}