LLMs versus the Halting Problem: Characterizing Program Termination Reasoning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Sultan, Oren, Armengol-Estape, Jordi, Kesseli, Pascal, Vanegue, Julien, Shahaf, Dafna, Adi, Yossi, O'Hearn, Peter
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866916046297890816
author Sultan, Oren
Armengol-Estape, Jordi
Kesseli, Pascal
Vanegue, Julien
Shahaf, Dafna
Adi, Yossi
O'Hearn, Peter
author_facet Sultan, Oren
Armengol-Estape, Jordi
Kesseli, Pascal
Vanegue, Julien
Shahaf, Dafna
Adi, Yossi
O'Hearn, Peter
contents Determining whether a program terminates is a central problem in computer science. Turing's Halting Problem established termination as undecidable, showing that no algorithm can universally determine termination for all programs and inputs. Hence, verification tools approximate termination, sometimes failing to prove or disprove; these tools rely on problem specific architectures, and are usually tied to particular programming languages. Recent advances in LLMs raise a natural question: To what extent can they reason about program termination? We evaluate frontier LLMs on a diverse set of C programs from the International Competition on Software Verification (SV Comp) 2025. Our results show that GPT-5 and Claude Sonnet 4.5 achieve scores comparable to top ranked verification tools (with test time scaling). However, while models often correctly infer whether programs terminate, they frequently fail to construct a witness as formal proof, revealing a gap between semantic recognition and symbolic proof generation. Performance further degrades as code length increases. To analyze this gap, we introduce a divergence precondition formulation that characterizes non termination conditions as logical constraints. We hope these findings motivate future research on real-world termination benchmarks, neuro-symbolic approaches that combine LLMs with symbolic verification methods, and, more broadly LLM reasoning on other undecidable problems.
format Preprint
id arxiv_https___arxiv_org_abs_2601_18987
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle LLMs versus the Halting Problem: Characterizing Program Termination Reasoning
Sultan, Oren
Armengol-Estape, Jordi
Kesseli, Pascal
Vanegue, Julien
Shahaf, Dafna
Adi, Yossi
O'Hearn, Peter
Computation and Language
Artificial Intelligence
Programming Languages
Determining whether a program terminates is a central problem in computer science. Turing's Halting Problem established termination as undecidable, showing that no algorithm can universally determine termination for all programs and inputs. Hence, verification tools approximate termination, sometimes failing to prove or disprove; these tools rely on problem specific architectures, and are usually tied to particular programming languages. Recent advances in LLMs raise a natural question: To what extent can they reason about program termination? We evaluate frontier LLMs on a diverse set of C programs from the International Competition on Software Verification (SV Comp) 2025. Our results show that GPT-5 and Claude Sonnet 4.5 achieve scores comparable to top ranked verification tools (with test time scaling). However, while models often correctly infer whether programs terminate, they frequently fail to construct a witness as formal proof, revealing a gap between semantic recognition and symbolic proof generation. Performance further degrades as code length increases. To analyze this gap, we introduce a divergence precondition formulation that characterizes non termination conditions as logical constraints. We hope these findings motivate future research on real-world termination benchmarks, neuro-symbolic approaches that combine LLMs with symbolic verification methods, and, more broadly LLM reasoning on other undecidable problems.
title LLMs versus the Halting Problem: Characterizing Program Termination Reasoning
topic Computation and Language
Artificial Intelligence
Programming Languages
url https://arxiv.org/abs/2601.18987