LLM Agents Reason About Code Without Running It

Verification Landscape
Django Bug Case Study
Certificate Structure
Performance Results
Cost & Trade-offs

The Code Verification Spectrum

Semi-formal reasoning occupies the middle ground between fully formal proof assistants (provably correct but impractical) and unstructured LLM judges (practical but unreliable).

Formal Verification (Lean, Coq)
Semi-Formal Certificates
Unstructured LLM

Agentic vs Single-Shot Reasoning

Agentic setup enables exploration through tool calls but constrains execution. The agent navigates the codebase without running code.

Django Bug django-13670: Function Shadowing

Two patches claim to fix two-digit year formatting for years before 1000 CE. Unstructured reasoning assumes format() is Python's builtin. The certificate forces interprocedural tracing.

Execution Trace Comparison

Three-Block Certificate Structure

The certificate template enforces explicit evidence for every claim. You cannot submit a valid certificate without completing all three blocks.

Tool Call → Premises Flow

The structured template creates demand for evidence, and the agent's tool calls supply it. Interprocedural reasoning emerges naturally from template requirements.

Accuracy Across Three Tasks

Semi-formal reasoning improves performance consistently across patch equivalence, fault localization, and code question answering.

Standard Agentic
Semi-Formal (Opus 4.5)
Baseline (Difflib/Single-Shot)

Patch Equivalence Breakdown

Performance varies between curated challenging examples and real-world SWE-bench agent-generated patches.

Inference Cost Gap (Unmeasured)

The paper reports no latency measurements, no tokens-per-certificate data, and no cost comparison. This visualization shows hypothetical overhead based on structured output requirements.

Unmeasured — Critical Gap

Three Open Problems

Deployment Readiness Heatmap

Different use cases have different readiness levels. Code review tooling is more viable than automated RL reward signals.