AutoSpec: Towards Verifiable Software Development via Automated Theorem Proving
Coding agents increasingly write software, but testing cannot rule out bugs. Interactive provers like Lean support rich specifications but normally require programs to be written in the prover's language. Existing vericoding benchmarks also do not separate implementation from specification proving.
AutoSpec extends the Aeneas Rust-to-Lean pipeline in two ways. Numeric retargeting at the LLBC level maps f64 and fixed-width integers to mathematical types (Rat, Real, Int, Nat). Term simplification makes the generated definitions easier to reason about with Mathlib. On this toolchain, a two-tier benchmark of 159 Rust programs across nine algorithmic domains was built, each with a manually written Lean specification. Eight coding agents were evaluated in isolated Lean workspaces with an LSP MCP server, with proofs checked by Lean Comparator; the study also analyzes proof-tree structure, tactic usage, and agent behaviour.

Claude Opus 5.5 solves 73.0% of testcases overall but only 50.0% of Tier 2; the other agents score between 2.5% and 18.9%. Graph, matrix, and DP tasks are hardest. The analysis identifies two bottlenecks: reasoning about loops and recursion, and acquiring Aeneas- and library-specific knowledge. A guidance ablation helps with the latter.


| Agent | Total | Tier 1 | Tier 2 |
|---|---|---|---|
| Claude Opus 5.5 | 73.0 | 89.2 | 50.0 |
| GPT 6 Sol | 18.9 | 25.8 | 9.1 |
| GPT 5.6 Sol | 12.6 | 17.2 | 6.1 |
| DeepSeek V4.1 Flash | 10.7 | 16.1 | 3.0 |
| Leanstral 1.5 | 2.5 | 4.3 | 0.0 |
