Skip to content

How Stable Are LLM-Generated Proofs Under Program Refactoring? A Stress Test for Verifiable Code Generation

Oct 2026 · 0 citations · 31 references
Computer Science

TL;DR

RefactorProof measures unchanged-proof stability under program refactoring, not the cost of maintaining a proof after it breaks, which derives 458 Lean-certified variants from the 185 VERINA tasks that compile in the authors' pinned environment while holding the specification and evaluated proof fixed byte-for-byte.

Abstract

Benchmarks for verifiable code generation usually test a proof against one fixed implementation. We ask whether the same proof remains valid after a program refactoring that preserves behavior. We introduce RefactorProof, which derives 458 Lean-certified variants from the 185 VERINA tasks that compile in our pinned environment while holding the specification and evaluated proof fixed byte-for-byte. VERINA supplies reference proofs for 46 tasks, all from its basic split; the primary model-versus-reference comparisons further match on 21-25 short, non-recursive tasks. Structural refactorings expose substantial brittleness across proof sources: task-normalized structural PSR is 4.3% for the supplied references and 13.3-26.8% for the specialized provers. On the matched tasks, specialized prover proofs nevertheless have higher overall unchanged-proof survival than the supplied reference artifacts: +15.6 points for DeepSeek-Prover-V2-7B, +18.8 for Goedel-Prover-V2-32B, and +20.3 for Goedel-Prover-V2-8B; all three 95% CIs exclude zero. The ordering persists after excluding universally survived T1 variants, under family-balanced aggregation, and under alternative deployable valid-proof selection rules. However, unchanged-proof failure is not the same as high repair cost: predefined one-identifier edits repair 51/54 eligible reference structural failures and 58/85 eligible prover failures. RefactorProof therefore measures unchanged-proof stability under program refactoring, not the cost of maintaining a proof after it breaks.

View source

Similar papers

Preprint Sep 2026

SWE-Proof: Can Language Models Resolve Real-World Issues with Machine-Checked Proofs?

This work presents Benchproofer, a pipeline that turns a coding task with a known correct patch into a formally verified one, which writes a specification for the new code, summarizes the existing functions that code calls with axioms, and admits an instance only after mechanical and adversarial gates agree.

George Ma, Benjamin Mikek, Hao-Yu Li et al. · 2 citations
#artificial intelligence Preprint Sep 2026

Self-Spec Verifiable Code Generation

Large language models (LLMs) may generate unreliable code on corner cases missed by testing, while formal verification can provide machine-checkable guarantees. Recently, researchers have proposed several benchmarks to evaluate the capabilities of LLMs in generating formally verifiable code, where LLMs need to formulat...

Jia-Ru Qian, Yihong Dong, Yong-Ming Li et al. · 0 citations
#artificial intelligence Preprint Oct 2026

Scaling Lean Theorem Proving for Real-World Code Verification

EasyProver is presented, a Lean proving system built from recursive agents with isolated contexts, asynchronous search, parallel tactic probing, and an elastic elaboration service, and Aegis is introduced, which converts competitive programming problems into much harder verification tasks over real implementations.

Debargha Ganguly, Divya Raghunathan, Dejan Jovanovic et al. · 0 citations
Book Open access Oct 2026

Beyond Benchmarks: A Case Study of LLM-Generated Verus Specification Failures on Asterinas Vostd

Large language models (LLMs) have recently shown promise in automating formal specification generation, but their effectiveness has mainly been demonstrated on self-contained benchmark tasks. This paper examines the changes that occur when LLM-generated specifications are applied to an industrial verification project....

Du-Gang Liu, Ding Wang, Chao Jiang et al. · 1 citation

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.