Using Graph Neural Networks for Program Termination

Yoav Alon, Cristina David

Research output: Chapter in Book/Report/Conference proceedingConference Contribution (Conference Proceeding)

126 Downloads (Pure)

Abstract

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.
Original languageEnglish
Title of host publicationESEC/FSE 2022: Proceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering
PublisherAssociation for Computing Machinery
Number of pages12
ISBN (Print)978-1-4503-9413-0
DOIs
Publication statusE-pub ahead of print - 9 Nov 2022
EventESEC/FSE 2022: 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering - NUS U-Town, Queenstown, Singapore
Duration: 14 Nov 202218 Nov 2022
Conference number: 30
https://2022.esec-fse.org/

Conference

ConferenceESEC/FSE 2022
Country/TerritorySingapore
CityQueenstown
Period14/11/2218/11/22
Internet address

Fingerprint

Dive into the research topics of 'Using Graph Neural Networks for Program Termination'. Together they form a unique fingerprint.

Cite this