利用图神经网络实现程序终止
Using Graph Neural Networks for Program Termination
摘要:
终止性分析研究程序的终止行为,旨在检测非终止性,这是已知的导致各种程序错误(例如挂起程序,拒绝服务漏洞)。除了正式的方法,已经进行了各种尝试,以估计终止行为的程序使用神经网络。然而,这些方法中的大多数仍然依赖于正式的方法来提供强有力的可靠性保证,因此受到类似的限制。在本文中,我们远离正式的方法,拥抱随机性质的机器学习模型。而不是旨在严格的保证,可以解释的求解器,我们的目标是提供一个程序的终止行为和可能的原因nontermination(适用时),程序员可以用于调试目的的估计。与以前的方法使用神经网络的程序终止相比,我们还利用了图形表示的程序,采用图神经网络。为了进一步帮助程序员在理解和调试nontermination错误,我们适应的注意和语义分割,以前用于其他应用领域的概念,程序。总体而言,我们设计和实现了分类程序终止的基础上图卷积网络和图注意力网络,以及一个语义分割图神经网络,本地化AST节点可能会导致非终止。我们还说明了如何将语义分割提供的信息与程序切片相结合,以进一步帮助调试。
英文摘要:
Termination analyses investigate the termination behavior of programs, intending to detect nontermination, which is known to cause a variety of program bugs (e.g. hanging programs, denial-of-service vulnerabilities). Beyond formal approaches, various attempts have been made to estimate the termination behavior of programs using neural networks. However, the majority of these approaches continue to rely on formal methods to provide strong soundness guarantees and consequently suffer from similar limitations. In this paper, we move away from formal methods and embrace the stochastic nature of machine learning models. Instead of aiming for rigorous guarantees that can be interpreted by solvers, our objective is to provide an estimation of a program's termination behavior and of the likely reason for nontermination (when applicable) that a programmer can use for debugging purposes. Compared to previous approaches using neural networks for program termination, we also take advantage of the graph representation of programs by employing Graph Neural Networks. To further assist programmers in understanding and debugging nontermination bugs, we adapt the notions of attention and semantic segmentation, previously used for other application domains, to programs. Overall, we designed and implemented classifiers for program termination based on Graph Convolutional Networks and Graph Attention Networks, as well as a semantic segmentation Graph Neural Network that localizes AST nodes likely to cause nontermination. We also illustrated how the information provided by semantic segmentation can be combined with program slicing to further aid debugging.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。