arXiv:2608.30803cs.LOAug 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2608.30803

Schwarz: Solver-Aware Agentic Program Verification

Jingyu Ke, Ling-I Wu, Guoqiang Li

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Jingyu Ke

Shanghai Jiao Tong University

windocotber@sjtu.edu.cn

Ling-I Wu

Shanghai Jiao Tong University

edithwuly@sjtu.edu.cn

Guoqiang Li

Shanghai Jiao Tong University

li.g@sjtu.edu.cn

Abstract—Agentic verification systems can often generate source-level specifications that look plausible, but plausibility is not enough: the verifier must still turn those specifications into SMT obligations that the solver can prove. When this step fails, current LLM-driven loops usually expose only a coarse verifier error, timeout, or unknown solver result. The model cannot tell whether the specification is wrong, a helper lemma is missing, the proof context contains irrelevant facts, or the obligation needs a different theory view. This paper presents SCHWARZ, an agentic verification harness that makes SMT-backed proof failure local, checkable, and repairable. SCHWARZ turns failed verification into obligation-local repair tasks: program-point snapshots expose checked facts at a boundary, local lemmas let the agent propose missing proof steps, and theory-aware solver policies guide the agent toward solver-friendly formulations for numeric, quantified, memory, and floating-point obligations. We implement SCHWARZ for C and Rust/Verus and evaluate it on 1,475 tasks. On 475 benchmarks from recent agentic verification tools, SCHWARZ solves 95.2% of the tasks. On 1,000 tasks from the SV-COMP 2026 ReachSafety track, averaging 1,427 LOC, SCHWARZ solves 91.5% of the tasks, compared with 60.1% for CPAchecker. Ablations and comparison with a pure-agent baseline show that solver-aware repair is effective and scalable.

I. INTRODUCTION

Large software projects continue to ship security-critical defects even after extensive testing, review, and deployment. Empirical studies of mature open-source systems show that vulnerabilities are distributed across real project histories and related code regions, not merely isolated toy examples [1]. Formal verification can provide stronger assurance by proving program properties over all executions, but applying it to realistic software still requires substantial proof engineering. In deductive and SMT-backed verification workflows, the checker reduces programs equipped with source-level specifications and auxiliary proof artifacts to verification conditions (VCs). Proof engineers must supply loop invariants, ghost state, intermediate assertions, and lemmas that expose enough semantic structure for automated checkers to prove those VCs [2], [3].

A common failure mode in this workflow is deceptively simple. A user, or an LLM agent, adds a source-level specification that matches the intended safety argument, yet the verifier still rejects the program. The reported failure may be only a failed assertion, a timeout, or an unknown SMT result. From this signal alone, it is unclear whether the specification is wrong, whether an intermediate lemma is missing, whether the solver is distracted by irrelevant context, or whether the obligation needs a different arithmetic, bit-vector, quantified,

Figure

Fig. 1. A C ReachSafety code fragment adapted from SV-COMP.

or floating-point formulation. We call this property solver dischargeability: a program fact is not only intended to be true, but is also expressed with the local facts, decomposition, and theory encoding needed for the configured SMT backend to prove it.

An example from the SV-COMP ReachSafety suite illustrates the gap. As shown in Figure 1, the loop summary establishes x=n3x = n^3, z=6n+6z = 6n + 6, and the final position of nn, from which the algebraic fact AA follows. The final assertion is a different SMT target GcG_c: since aa is a short, the C expression 6∗a6 * a is first evaluated under integer-promotion semantics, and the verifier must also prove that the promoted multiplication and surrounding 64-bit arithmetic are defined. The unrepaired query asks the old bit-vector context and AA to prove GcG_c, and all configured solvers time out. The accepted SCHWARZ proof introduces a local bridge BcB_c for the C-evaluation step: it checks that the promoted term agrees with the 64-bit algebraic term and that the relevant multiplications and additions do not overflow. With this bridge available, the final assertion is discharged without forcing the top-level bit-vector query to rediscover the C promotion and definedness reasoning.

Recent agentic-assisted verification systems seek to reduce the manual burden of generating source-level specifications and auxiliary proof artifacts by placing a large language model inside a checked repair loop. Systems built around interactive theorem provers such as Rocq and Lean expose explicit goals, hypotheses, tactics, and proof states checked by a trusted kernel [4], [5]. This gives the model feedback for proof search, but it also mixes the program’s semantic intent with theorem-prover context, tactic structure, and low-level axiomatic details. SMT-backed loops offer a complementary route by reusing mature solvers and keeping the model closer to source-level specifications, but current interfaces usually expose only coarse verifier errors, timeouts, or unknown results [6], [7]. They therefore hide the local proof context, missing helper facts, and theory-level choices that often determine whether an SMT obligation can be discharged [8]–[12].

The key idea is to treat a failed proof not as a single request to rewrite the whole specification, but as a diagnostic question: which local obligation failed, what facts were visible there, and what checked helper fact or theory view would make the obligation dischargeable? SCHWARZ realizes this idea with three solver-facing optimization mechanisms. When the agent does not know where the proof failed, checked snapshots expose the symbolic facts available at selected program points. When the proof is too large for one solver step, obligation-local lemmas let the agent propose a missing intermediate fact, which must itself be proved before it can be used. When the solver is reasoning in an unsuitable representation, theory-aware solver policies guide the agent toward solver-friendly formulations for numeric, quantified, memory, and floating-point obligations.

SCHWARZ does not ask the model to certify correctness. The model owns search: it proposes source-level specifications, proof decompositions, local lemmas, theory-aware solver policies, and counterexample inputs. The checker owns authority: it preserves executable source code, regenerates proof obligations from trusted front ends, checks SMT obligations with configured solvers, and accepts unsafe claims only through concrete replay. Thus, every accepted safe or unsafe outcome is grounded in deterministic checking rather than model rationale.

Our evaluation separates three questions that are often conflated in agentic verification. First, can SCHWARZ reproduce or exceed the results of recent agentic-verification systems on their own benchmark settings? Second, how much do solver-facing lemmas and theory-aware policies contribute beyond source-level specification generation alone? Third, what capability profile does SCHWARZ exhibit on feature-rich C verification tasks? We evaluate SCHWARZ on 1,475 tasks: 475 benchmarks from AutoRocq and KVerus, and a curated 1,000-task SV-COMP 2026 C ReachSafety suite averaging 1,427 LOC. SCHWARZ solves 95.2% of the 475 existing agentic-verification tasks and 91.5% of the SV-COMP tasks, with no incorrect SCHWARZ-accepted verdicts. Comparisons with a pure-agent baseline and CPAchecker, the ReachSafety champion, show that SCHWARZ improves the SV-COMP score from 72.5% to 90.7% over the pure-agent baseline and achieves a higher accepted pass rate than CPAchecker, 91.5% versus 60.1%. Ablations show that local proof repair and theory-aware solver policies improve agentic verification.

The paper makes three contributions.

• It identifies solver dischargeability as a bottleneck in SMT-backed agentic verification, where plausible source-level specifications fail because the repair loop does not expose missing local lemmas, irrelevant context, or unsuitable theory formulations.

• It presents SCHWARZ, a language-independent verification system that turns failed verifier runs into checked, obligation-local repair tasks through program-point snapshots, local lemmas, and a set of theory-aware solver policies.

• It evaluates SCHWARZ across 475 recent agentic-verification benchmarks and a curated 1,000-task SV-COMP 2026 C ReachSafety suite, showing that solver-aware repair is effective and scalable beyond small benchmarks.

References (46)