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
Layer Rename & Cleanup: batch rename and delete empty layers in Aseprite (free Lite)
0dev.to

Open-Weight LLM vs Hosted API: What Self-Hosting Gives You That an API Can’t
0dev.to
Aizawl to Guwahati Flight Prices: Key Takeaways From a Booking-Window Analysis
0dev.to Data

Thinking Machines Ships Inkling 2 Small While Raising a 5B Round at 40B Valuation
0dev.to News

Ant Group Launches Ling-3.2-flash, a Native Multimodal Model
0dev.to News
OpenAI's $1.25 Trillion Funding Round Falls Short of Its $1.4 Trillion Target
0dev.to News