mlsanityData to 26 Nov 2026

Ranking Function Generation with LLMs for Termination

arXiv 2610.35523 ↗Submitted 26 Oct 2026cs.SE cs.AI cs.LOcited by 0

Not on the map. Why?

Abstract (arXiv)

Ranking functions are a fundamental technique for proving loop termination, but synthesizing them remains challenging and often requires substantial expertise. Despite considerable progress in their automated synthesis, existing approaches remain limited in their effectiveness. We propose RAINFALL, a neuro-symbolic framework that tightly integrates large language models (LLMs) with symbolic verification. To our best knowledge, RAINFALL is the first to employ a generate-verify-refine paradigm for LLM-based ranking function synthesis. RAINFALL formulates ranking function synthesis as a constrained code-completion task, inserting placeholders into the input program that the LLM must fill in four predefined slots per loop. The resulting program is checked by a symbolic verifier. Successful verification yields a valid ranking function, while verification failures produce diagnostics that are translated into natural-language feedback to guide iterative refinement. We evaluate RAINFALL on two public benchmark suites comprising 358 terminating C programs. Using DeepSeek-V4.1-Flash, RAINFALL synthesizes verified ranking functions for 333 programs (93.02%), outperforming all evaluated baselines. Notably, it solves 22 more programs than PROTON 2.1, the winner of the SV-COMP 2026 Termination Category. Combining RAINFALL with PROTON 2.1 further increases the success rate to 96.65% (346/358 programs). Ablation studies demonstrate the contributions of placeholder contracts, few-shot examples, symbolic verification, and diagnostic feedback, while experiments across different LLMs establish the broader applicability of the framework.

Key facts. No citing papers in the map yet (data through 26 Nov 2026). Builds on 19 of its 73 references that are in the map. Submitted 26 Oct 2026.

Builds on

19 of 73 references.

References · 19

  1. 2022CodeT: Code Generation with Generated Testscited by 411
  2. 2024LLM Hallucinations in Practical Code Generation: Phenomena, Mechanism, and Mitigationcited by 98
  3. 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 72
  4. 2024Towards AI-Assisted Synthesis of Verified Dafny Methodscited by 63
  5. 2023Lemur: Integrating Large Language Models in Automated Program Verificationcited by 59
  6. 2024PropertyGPT: LLM-driven Formal Verification of Smart Contracts through Retrieval-Augmented Property Generationcited by 41
  7. 2023Ranking LLM-Generated Loop Invariants for Program Verificationcited by 37
  8. 2024Evaluating LLM-driven User-Intent Formalization for Verification-Aware Languagescited by 19
  9. 2025Dafny as Verification-Aware Intermediate Language for Code Generationcited by 11
  10. 2014Termination Analysis by Learning Terminating Programscited by 10
  11. 2025Can LLMs Generate Reliable Test Case Generators? A Study on Competition-Level Programming Problemscited by 10
  12. 2024Specify What? Enhancing Neural Specification Synthesis by Symbolic Methodscited by 9
7 more
  1. 2024SpecEval: Evaluating Code Comprehension in Large Language Models via Program Specificationscited by 9
  2. 2020DynamiTe: Dynamic Termination and Non-termination Proofscited by 4
  3. 2014Ranking Templates for Linear Loopscited by 3
  4. 2015T2: Temporal Property Verificationcited by 2
  5. 2013Eventual Linear Ranking Functionscited by 1
  6. 2017On Multiphase-Linear Ranking Functionscited by 1
  7. 2025Modular Automatic Complexity Analysis of Recursive Integer Programscited by 1

Built on by

Not cited yet.