当前位置: X-MOL 学术arXiv.cs.PL › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Neural Termination Analysis
arXiv - CS - Programming Languages Pub Date : 2021-02-07 , DOI: arxiv-2102.03824
Mirco Giacobbe, Daniel Kroening, Julian Parsert

We introduce a novel approach to the automated termination analysis of computer programs: we train neural networks to act as ranking functions. Ranking functions map program states to values that are bounded from below and decrease as the program runs. The existence of a valid ranking function proves that the program terminates. While in the past ranking functions were usually constructed using static analysis, our method learns them from sampled executions. We train a neural network so that its output decreases along execution traces as a ranking function would; then, we use formal reasoning to verify whether it generalises to all possible executions. We present a custom loss function for learning lexicographic ranking functions and use satisfiability modulo theories for verification. Thanks to the ability of neural networks to generalise well, our method succeeds over a wide variety of programs. This includes programs that use data structures from standard libraries. We built a prototype analyser for Java bytecode and show the efficacy of our method over a standard dataset of benchmarks.

中文翻译:

神经终止分析

我们为计算机程序的自动终止分析引入了一种新颖的方法:我们训练神经网络来充当排名函数。等级函数将程序状态映射到从下面限制的值,并在程序运行时减小。有效排序功能的存在证明程序已终止。虽然过去通常使用静态分析来构建排名函数,但我们的方法是从采样执行中学习它们。我们训练一个神经网络,以便其输出沿着执行轨迹像排名函数那样递减;然后,我们使用形式推理来验证它是否可以推广到所有可能的执行。我们提出了一种自定义损失函数,用于学习词典顺序函数,并使用可满足性模理论进行验证。由于神经网络具有很好的泛化能力,我们的方法成功胜过各种程序。这包括使用标准库中数据结构的程序。我们为Java字节码构建了原型分析器,并在标准基准数据集中显示了我们方法的有效性。
更新日期:2021-02-09
down
wechat
bug