Lune

FSE2022Top-tier venue

Using graph neural networks for program termination

Yoav Alon, Cristina David

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.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Let a Neural Network be Your Invariant cites Neural termination analysis
  • Learning to Execute Programs with Instruction Pointer Attention Graph Neural Networks cites LambdaNet: Probabilistic Type Inference using Graph Neural Networks
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Neural termination analysisMirco Giacobbe, Daniel Kroening, Julian ParsertFSE 2022 · 16 citations
  2. Let a Neural Network be Your InvariantMirco Giacobbe, Daniel Kroening, Abhinandan Pal, Michael TautschnigNeurIPS 2025 · 6 citations
  3. Integrating Large Language Models and Reinforcement Learning for Non-linear ReasoningYoav Alon, Cristina DavidFSE 2025 · 2 citations

Builds on10

  1. Towards Deeper Graph Neural NetworksMeng Liu, Hongyang Gao, Shuiwang JiKDD 2020 · 496 citations
  2. Graph Convolutional Networks with Markov Random Field Reasoning for Social Spammer DetectionYongji Wu, Defu Lian, Yiheng Xu, Le Wu et al.AAAI 2020 · 194 citations
  3. Self-Supervised Bug Detection and RepairMiltiadis Allamanis, Henry Jackson-Flux, Marc BrockschmidtNeurIPS 2021 · 145 citations
  4. LambdaNet: Probabilistic Type Inference using Graph Neural NetworksJiayi Wei, Maruth Goyal, Greg Durrett, Isil DilligICLR 2020 · 119 citations
  5. Learning to Execute Programs with Instruction Pointer Attention Graph Neural NetworksDavid Bieber, Charles Sutton, Hugo Larochelle, Daniel TarlowNeurIPS 2020 · 51 citations

Related papers

  1. Termination analysis without the tearsShaowei Zhu, Zachary KincaidPLDI 2021 · 16 citations
  2. EndWatch: A Practical Method for Detecting Non-Termination in Real-World SoftwareYao Zhang, Xiaofei Xie, Yi Li, Sen Chen et al.ASE 2023 · 4 citations
  3. Learning Probabilistic Termination ProofsAlessandro Abate, Mirco Giacobbe, Diptarko RoyCAV 2021 · 26 citations
  4. Large-scale analysis of non-termination bugs in real-world OSS projectsXiuhan Shi, Xiaofei Xie, Yi Li, Yao Zhang et al.FSE 2022 · 12 citations
  5. Detecting Condition-Related Bugs with Control Flow Graph Neural NetworkJian Zhang, Xu Wang, Hongyu Zhang, Hailong Sun et al.ISSTA 2023 · 19 citations
Dusk over the sea between two cliffs drawn in fine vertical lines