Paper commentary
VerusWeave: A Benchmark for Proof Repair in Concurrent Verus Programs
VerusWeave tests coding agents on repairing concurrent Verus proofs
- Problem Existing Verus benchmarks cover concurrency proof patterns poorly, so it is unclear how well coding agents repair these proofs. Few examples connect atomic operations to abstract protocols.
- Method VerusWeave is a benchmark that removes selected proof annotations from concurrent Verus modules. Agents must fill the gaps while keeping executable code and specifications unchanged.
- Results Four coding-agent harnesses repaired 75 to 85 percent of focused tasks but only 29 to 47 percent of full-module variants.
Why concurrent proofs are hard to repair
Verus extends Rust with specifications and proof constructs, so a verifier can machine-check a program against its specification. Concurrent code is harder, since a proof must account for thread interference, shared-state invariants and memory-access permissions. Bugs can also hide in rare thread interleavings that ordinary testing seldom exposes.
Proof repair suits coding agents because they can edit proof annotations, run the verifier and react to its errors. Repair leaves executable code and specifications untouched, so a passing check is evidence relative to the encoded specification. Existing Verus benchmarks cover low-level concurrency primitives and proof patterns poorly.
Few existing examples connect atomic operations to abstract protocols, which leaves this area thinly tested. Coding agents' ability to repair such proofs, the difficulties they meet, and the effects of harness design remain underexplored. The authors don't yet know how well agents repair these proofs or where they fail. VerusWeave is introduced to measure this, with 75 focused tasks and 17 full-module variants.
The benchmark targets two proof-obligation families, ghost-resource manipulation around atomic operations and inductiveness proofs for tokenized state machines. Together these families split a concurrent correctness argument into an executable synchronization event and a permitted abstract change.
Two families of concurrency proofs
VerusWeave's tasks draw on two proof-obligation families in Verus's low-level concurrency support. Ghost-resource manipulation around atomic operations links an executable synchronization step to a change in abstract state. Inductiveness proofs for tokenized state machines then check that this abstract change is permitted by the protocol.
The two parts cover different halves of a concurrent correctness argument, so repairing one doesn't replace the other.
That ghost code tracks abstract protocol state and resource ownership, so it never changes what the program executes. The agent must work out how the operation changes the atomic value and what it returns. Then it updates the ghost state to match, because the invariants connect that state to the shared atomic value. Figure 1 shows the OnceImpl::get case, where the added ghost code recovers permission to the initialized cell.
A state-machine task keeps the tokenized_state_machine! definition, which lists states, initialization, transitions, invariants and ghost-resource ownership. The task deletes the inductive proof lemma for one selected transition, and the agent must rebuild it. Starting from states where the invariants hold, the agent must show that they still hold after that transition.
Figure 2 shows a reader-writer lock case, where the restored proof establishes zero reader counts at initialization. The same proof also rules out pending or active readers, so the initial state satisfies the invariant.
How tasks are built and scored
The authors selected source modules that contain the target proof-obligation families and inlined their local dependencies. They drew code from Verified Memory Allocator, Verified Node Replication, and vostd, and added examples from the Verus repository. Table I lists 19 modules, and the focused tasks split into 42 atomic-operation tasks and 33 state-machine tasks.
The wait task proof was developed during this work and later merged into vostd through pull request 702.
For 17 source modules, the authors removed all selected proofs at once to build full-module variants. These variants reuse the focused tasks' proof obligations, so they measure combined repair. The authors treat them as complementary evaluations rather than 92 independent obligations.
Every agent must follow one proof-repair contract: it may add proof code but must keep executable code, specifications and function contracts. It also can't mark an existing function as trusted, and the use of admit and assume is prohibited. These rules stop agents from passing by moving, removing or replacing existing behaviour.
Agents get 20 minutes per task, and a task that hits this limit is marked as timed out. The harness stores solutions, session logs, cost, tool calls and session duration in a run-level JSON file.
Single gaps versus whole modules across four harnesses
Single gaps and whole modules turn out to be very different problems for the same agents. With GPT-5.6 Luna, the four harnesses repaired 56–64 of 75 focused tasks, which is 75–85%. On the 17 full-module variants, the same harnesses repaired only 5–8, or 29–47%. The authors read this drop as evidence that coordinating several repairs in one module is harder than closing isolated gaps.
A follow-up used Claude Sonnet 4.6 with OpenCode and Pi. It targeted the tasks that every initial agent had failed, which were seven focused tasks. It solved five of those seven focused tasks. On the full-module side, it solved only one of the seven remaining unsolved tasks. They didn't test a larger follow-up set, so these counts stay small.
All seven focused tasks that no initial agent solved involved atomic operations. Repair success declined as proof omissions grew larger and as atomic sites increased. The qualitative analysis flagged arithmetic bounds, reuse of existing lemmas and unproductive reactions to verifier feedback as trouble spots.
Pi reached success rates among the highest observed. Pi kept the lowest mean cost per attempt on both task sets. Across the evaluated configurations, spending more tokens, tool calls or money didn't yield more successful repairs. That makes the benchmark usable for comparing repair effectiveness and resource efficiency under one protocol.
Limitations of the four-project sample
The benchmark draws on only four projects, not on representative Rust concurrency code. The authors chose these projects because few public projects use the concurrency interfaces they target. The sources are the Verified Memory Allocator, Verified Node Replication, vostd, and examples from the Verus repository. So the results describe these codebases, and they don't show how agents fare on other concurrent Rust code.
Because the tasks come from public repositories, models may have seen the source proofs during training. The authors can't exclude that prior exposure, since recent models were evaluated on these tasks. During runs, external search and download tools were disabled or blocked, while model-provider access stayed enabled. Session logs let the authors find and repeat runs that accessed external solutions.
The main comparison uses GPT-5.6 Luna, and the follow-up uses Claude Sonnet 4.6. All four harnesses ran with medium reasoning effort and otherwise default configurations. The authors didn't test other reasoning effort settings for these harnesses. Each task also had a 20-minute limit, so longer runs fall outside the reported results.
The benchmark covers only the atomic-operation and state-machine families of proof obligations. It doesn't yet test larger proof holes, logical atomicity, or weak-memory reasoning. The authors list executable-code generation alongside proofs as a possible extension. The 17 full-module variants reuse the focused tasks' proof obligations, so they add no new obligations.
Paper info
- Authors
- Pedro Ribeiro, Martim Afonso, André Vasconcelos, João F. Ferreira
- Venue
- arXiv · Preprint
- First published
- 2026-10-30
- Added
- 2026-11-7
- Updated
- 2026-10-30
- Version
- v1
- arXiv
- 2611.00287
- Category
- cs.SE · cs.AI · cs.LO · cs.PL
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
Concurrent software underpins critical infrastructure, including operating systems and databases, yet thread interactions can have bugs that bypass conventional testing. Verus extends Rust with formal verification capabilities, enabling developers to specify, implement and prove the correctness of concurrent code in the same language. Although coding agents have been explored for automated proof construction, existing Verus benchmarks offer limited coverage of concurrency-specific examples that connect atomic operations to abstract protocols. To address this gap, we introduce VerusWeave, the first benchmark dedicated to concurrent proof repair, derived from four open-source projects. It comprises 75 focused tasks and 17 full-module variants that exercise features used to verify low-level concurrent code. Tasks remove selected proof annotations and require agents to fill gaps, while preserving executable code and specifications. The evaluation harness validates repairs using Verus and a change checker, recording solutions, execution traces, and resource usage. An initial evaluation of four general-purpose coding-agent harnesses achieved 75-85% success on focused tasks and 29-47% on full-module variants, highlighting the challenge of autonomous module-wide repairs. VerusWeave provides a reusable foundation for evaluating automated proof construction for concurrent software.
Quote from the paper
Pedro Ribeiro, Martim Afonso, André Vasconcelos, João F. Ferreira (2026). VerusWeave: A Benchmark for Proof Repair in Concurrent Verus Programs. arXiv:2611.00287v1. https://arxiv.org/abs/2611.00287v1
BibTeX
@misc{ribeiro2026verusweave,
title = {{VerusWeave: A Benchmark for Proof Repair in Concurrent Verus Programs}},
author = {Pedro Ribeiro and Martim Afonso and André Vasconcelos and João F. Ferreira},
year = {2026},
eprint = {2611.00287},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2611.00287v1}
}