AI & ML
Compositional Loop Invariant Inference for Multiphase Programs via Structured Neurosymbolic Reasoning
arXiv cs.SE0 views
arXiv:2611.07882v1 Announce Type: new Abstract: Loop invariants are essential for deductive program verification, yet automatically inferring them for {multiphase programs}, whose loops contain conditional branches that induce multiple execution phases with distinct behaviors, remains an open problem. Existing LLM-based methods either reason about loops as a whole or use explicit branch information to generate atomic assertions jointly across branches, without maintaining complete candidate sub-invariants for independent generation and targeted repair. We present CLOVER, a structured neurosymbolic reasoning framework for multiphase invariant inference built on two interlinked mechanisms. First, compositional inference: CLOVER statically decomposes a loop into symbolic {loop branch sequences}, conjunctions of the loop guard and branch conditions that characterize distinct execution scenarios, and guides the LLM to generate candidate sub-invariants for each one independently, so that each LLM query focuses on a single execution scenario rather than the entire loop. Second, counterexample-guided localized refinement: when SMT verification rejects a composed disjunctive invariant, CLOVER traces the counterexample back through the branch structure to identify which specific loop branch sequence caused the failure and repairs only that sub-invariant, preserving all correct components. Both mechanisms are unified by a shared symbolic structure derived from the loop's branch semantics, which guides what the LLM generates, how candidates are composed, and where refinement is directed. We evaluate CLOVER on 316 linear arithmetic, 50 nonlinear arithmetic, and 54 multiphase benchmarks. CLOVER solves 35 of 54 multiphase benchmarks, outperforming the best LLM-based baseline (29) by 20.7\% and the best traditional method (22) by 59.1\%. On linear/nonlinear benchmarks, CLOVER remains competitive, solving 355 of 366 programs overall.
Source:https://arxiv.org/abs/2611.07882PreviousWhich Signals of Code Correctness Survive Distribution Shift? Hidden-State and Causal Predictors of Program and Verdict CorrectnessNextA Low Similarity Score Does Not Show Independence after Source-Conditioned Repository Rewriting
Related posts
AI Companies Really, Really Want to Buy Your Work Files and Emails
0Wired
Ramp data shows AI spending stalling just as Anthropic nears its IPO
0TechCrunch
What I got wrong estimating LLM costs before the request
0dev.to
The Step-by-Step Guide to Shutting Off Apple Intelligence Features in iOS 27
0CNET News
Will Democrats Rein in Big Tech? It Starts With Privacy and Data Centers
0CNET News

“Most apps never make it off localhost”: Cursor takes on Lovable and Replit with fully managed app deployment
0The New Stack