Beyond Type-checking: Towards Holistic Evaluation of Formal Specification Generation
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
When generating verifiable code, natural language requirements are mapped to machine checked code using LLMs and agentic workflows. A crucial component of this pipeline is specification generation (SpecGen), which produces a formal contract against which an agent can prove implementation correctness. Proof generation can obtain deterministic feedback from a theorem prover, but SpecGen lacks a definitive check that a generated specification captures the user's intent. A checked proof can therefore establish correctness against a specification that misrepresents the intended behaviour. We take a step towards holistic SpecGen evaluation with a unified dataset assembled from 350 existing Lean tasks, including 189 from VERINA and 161 from CLEVER, and a framework covering formal validity, reference similarity and equivalence, and behavioural adequacy. We distinguish acceptance of required inputs from acceptance of valid outputs and rejection of invalid outputs, while making each metric's evidence scope explicit. Across four SpecGen configurations, restricting the generalized tree edit distance (GTED) comparison, a reference similarity measure, to 32 jointly measurable VERINA tasks changes the VERINA configuration's position from second to fourth in mean similarity, showing the importance of measurement coverage. In an authored control, a specification achieves 100% positive test recall and negative test rejection while accepting 0% of required inputs. This demonstrates that perfect postcondition scores can miss an unusable input contract, motivating separate feedback on input coverage and output constraints.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 9 of its 29 references that are in the map. First posted on arXiv 7 Oct 2026.
Builds on
9 of 29 references.
References · 9
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2024Autoformalizing Euclidean Geometrycited by 27
- 2025A benchmark for vericoding: formally verified program synthesiscited by 16
- 2025Mathesis: Towards Formal Theorem Proving from Natural Languagescited by 14
- 2026AlgoVeri: An Aligned Benchmark for Verified Code Generation on Classical Algorithmscited by 11
- 2025Generalized Tree Edit Distance (GTED): A Faithful Evaluation Metric for Statement Autoformalizationcited by 9
- 2026Inductive Deductive Synthesis: Enabling AI to Generate Formally Verified Systemscited by 3
- 2026Intent-aligned Formal Specification Synthesis via Traceable Refinementcited by 1
- 2026VeriContest: A Competitive-Programming Benchmark for Verifiable Code Generationcited by 1
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2025VeriEquivBench: An Equivalence Score for Ground-Truth-Free Evaluation of Formally Verifiable Code
- 2026P3: Joint Program-and-Proof Planning for Verified Code Generation
- 2024Evaluating the Ability of Large Language Models to Generate Verifiable Specifications in VeriFast
- 2026Automating Formal Verification with Agent-Guided Tree Search
- 2026Verus-SpecGym: An Agentic Environment for Evaluating Specification Autoformalization
- 2026LiveFMBench: Unveiling the Power and Limits of Agentic Workflows in Specification Generation
- 2026SWE-Proof: Can Language Models Resolve Real-World Issues with Machine-Checked Proofs?
- 2026Inferring Code Correctness from Specification