ISoLA & AISoLA 2026

International Symposium on Leveraging Applications of Formal Methods, Verification, and Validation • Kos, Greece

Talk

An Agentic Approach for Synthesizing Program Invariants

Time: Wednesday, 28.10

Room: Room 2

Authors: Yuan Xia, Asmaa Hassan Ahmed Hassan, Jyotirmoy Deshmukh

Abstract: Formal verification of distributed and concurrent programs hinges on discovering program invariants, yet existing techniques face a persistent tradeoff: model-checking and theorem-proving approaches offer correctness guarantees but scale poorly to large or infinite-state systems, while dynamic, data-driven methods scale well but produce invariants without formal soundness guarantees. We propose an agentic neurosymbolic architecture that closes this gap by tightly integrating data-driven invariant learning with large language model (LLM)-guided formal reasoning within a single, closed verification loop. Building on our prior work on runtime-monitored invariant synthesis (RunVS) and LLM-guided predicate and invariant refinement, we envision a pipeline of cooperating LLM agents: one agent learns candidate invariants from execution traces via speculative sampling and counterexample-guided refinement; a second agent translates a program and its candidate invariant into verification conditions; a third agent constructs Gentzen-style sequent-calculus proofs that reduce inductiveness checking to unsatisfiability (UNSAT) queries, validated by paired syntactic-rule and SMT-based semantic checkers. When a verification condition is not validated, structured feedback is routed back to revise the candidate invariant, closing the learn–verify–refine loop with minimal human involvement. We demonstrate the feasibility of each component on distributed algorithms, where LLM-generated proofs verify inductive-step conditions for a quantified global invariant. We discuss open challenges toward fully autonomous operation, including extending the framework to equipping the agentic loop with error-localization and self-healing capabilities which toward scalable, reliable, and low-manual-effort formal verification of complex distributed systems.