paperbot · PL 论文追踪

全部论文 待读 收藏

P1 Neural termination analysis

神经网络终止性分析
FSE Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering2022匹配度 5/10 · 论文属于用机器学习(神经网络)改进程序终止性分析与形式化验证,与“AI→PL”方向有交集,且兼具形式化证书与实现;但它不使用 LLM/Agent,也不涉及浮点或贝叶斯程序分析,故与该研究画像核心方向匹配度中等。引用 1 inbox
Mirco Giacobbe, Daniel Kroening, Julian Parsert
crossref: 2026-09-12

AI 速览

一句话:用神经网络表示 ranking function,并经符号验证为程序提供终止性证书。

本文研究程序的自动终止性分析,核心是寻找并验证 ranking function(排名函数):它将程序状态映射为有下界的值,并随程序执行递减,从而证明终止。作者提出用神经网络表示候选 ranking function,先从程序采样执行轨迹进行训练,使网络输出沿轨迹递减;随后利用符号推理形式化验证该网络对所有可能执行都满足递减条件。验证成功即可得到程序的终止性证书,称为神经 ranking function。实验表明,得益于神经网络表达非线性函数的能力,该方法能处理现有最先进工具难以覆盖的程序,例如循环条件含析取以及包含非线性表达式的程序。

问题
自动终止性分析通常需要找到并验证 ranking function,但对含非线性表达式或复杂分支条件的程序,传统方法往往难以处理。
方法
从程序采样执行轨迹训练神经网络作为候选 ranking function,再用符号推理形式化验证其沿所有可能执行递减且有下界,成功后给出终止性证书。
评估
在现有最先进工具难以覆盖的程序上进行实验,包括循环条件含析取以及包含非线性表达式的程序,展示该方法能够成功证明终止。
原文摘要(Abstract)

We introduce a novel approach to the automated termination analysis of computer programs: we use neural networks to represent ranking functions. Ranking functions map program states to values that are bounded from below and decrease as a program runs; the existence of a ranking function proves that the program terminates. We train a neural network from sampled execution traces of a program so that the network's output decreases along the traces; then, we use symbolic reasoning to formally verify that it generalises to all possible executions. Upon the affirmative answer we obtain a formal certificate of termination for the program, which we call a neural ranking function. We demonstrate that, thanks to the ability of neural networks to represent nonlinear functions, our method succeeds over programs that are beyond the reach of state-of-the-art tools. This includes programs that use disjunctions in their loop conditions and programs that include nonlinear expressions.

链接与引用

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

BibTeX
@inproceedings{paperbot7022,
  title = {Neural termination analysis},
  author = {Mirco Giacobbe and Daniel Kroening and Julian Parsert},
  booktitle = {FSE},
  year = {2022},
  doi = {10.1145/3540250.3549120}
}