AxDafny: Agentic Verified Code Generation in Dafny
Benjamin Breen, Austin Letson, Borja Requena Pozo, Leopoldo Sarra
Abstract
We study agentic code generation in Dafny, where a model must generate both executable code and the proof artifacts for verification. We present AxDafny, a verifier-guided repair framework that iteratively generates implementations, invariants, assertions, and termination arguments. We also introduce LiveCodeBench-Pro-Dafny (LCB-Pro-Dafny), a benchmark of 250 competition-style programming problems translated into Dafny with formal specifications and a verifier-based evaluation harness. On LCB-Pro-Dafny, AxDafny substantially improves verification success over baseline GPT-5.5 performance. On DafnyBench, AxDafny achieves 92.7\% verification success, outperforming the strongest previously reported proof-hint baseline by 6.5 percentage points. Lastly, we show that verification success and runtime test performance measure different aspects of generated code.
Create a lesson
Related papers
VeriLadder: A Multi-Agent Specification Refinement System for Tool-Verified Verilog Datasets
Shared title terminologycs.AISaeid Rajabi, Chengmo Yang, Satwik Patnaik
ESM-Bench: A Benchmark for Evaluating Whether AI Agents Understand Earth System Model Physics and Code
Shared title terminologycs.AIKoutian Wu, Yuxuan Cao, Gengchen Mai et al.
MetaRigor: From Agentic Automation to Verifiable End-to-End Meta-Analysis Through Scientific Decision Boundaries
Shared title terminologycs.AIYifeng Xie, Chenke Li, Yangshuo Miao et al.
Trained on Harm, Still Refusing: A Training-Time Defense for Code Generation
Shared title terminologycs.AIMiaoqing Tian, Ruohan Li, Qian Lu et al.
From Manufacturing Event Logs to Simulation: Enabling SMEs with Agentic AI for SimPy Simulation Generation
Shared title terminologycs.AIRichard Reider, Lina Döring, Sebastian Lang et al.
Safe and Adaptive Cloud Healing: Verifying LLM-Generated Recovery Plans with a Neural-Symbolic World Model
Shared title terminologycs.AIJunyan Tan, Haoran Lin, Siyuan Guo et al.