paper-with-me

홈 › Papers

Inferring multiple helper Dafny assertions with LLMs

2025-10-31 · Álvaro Silva, Alexandra Mendes, Ruben Martins arxiv

The Dafny verifier provides strong correctness guarantees but often requires numerous manual helper assertions, creating a significant barrier to adoption. We investigate the use of Large Language Models (LLMs) to automatically infer missing helper assertions in Dafny programs, with a primary focus on cases involving multiple missing assertions. To support this study, we extend the DafnyBench benchmark with curated datasets where one, two, or all assertions are removed, and we introduce a taxonomy of assertion types to analyze inference difficulty. Our approach refines fault localization through a hybrid method that combines LLM predictions with error-message heuristics. We implement this approach in a new tool called DAISY (Dafny Assertion Inference SYstem). While our focus is on multiple missing assertions, we also evaluate DAISY on single-assertion cases. DAISY verifies 63.4% of programs with one missing assertion and 31.7% with multiple missing assertions. Notably, many programs can be verified with fewer assertions than originally present, highlighting that proofs often admit multiple valid repair strategies and that recovering every original assertion is unnecessary. These results demonstrate that automated assertion inference can substantially reduce proof engineering effort and represent a step toward more scalable and accessible formal verification.

📄 PDF Abstract BibTeX arXiv:2511.00125

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

Laurel: Unblocking Automated Verification with Large Language Models

2024-05-27 · Eric Mugnier, Emmanuel Anaya Gonzalez, Ranjit Jhala, Nadia Polikarpova 외

Program verifiers such as Dafny automate proofs by outsourcing them to an SMT solver. This automation is not perfect, however, and the solver often requires hints in the form of assertions, creating a burden for the proo…

LEMMA

AxDafny: Agentic Verified Code Generation in Dafny

2026-06-30 · Benjamin Breen, Austin Letson, Borja Requena Pozo, Leopoldo Sarra arxiv

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 impl…

Code Generation

Local Success Does Not Compose: Benchmarking Large Language Models for Compositional Formal Verification

2025-09-27 · Xu Xu, Xin Li, Xingwei Qu, Jie Fu 외 arxiv

We introduce DafnyCOMP, a benchmark for evaluating large language models (LLMs) on compositional specification generation in Dafny. Unlike prior benchmarks that focus on single-function tasks, DafnyCOMP targets programs …

Code Generation

AssertionBench: A Benchmark to Evaluate Large-Language Models for Assertion Generation

2024-06-26 · Vaishnavi Pulavarthi, Deeksha Nandal, Soham Dan, Debjit Pal

Assertions have been the de facto collateral for simulation-based and formal verification of hardware designs for over a decade. The quality of hardware verification, \ie, detection and diagnosis of corner-case design bu…

Prompt Engineering

DafnyBench: A Benchmark for Formal Software Verification

2024-06-12 · Chloe Loughridge, Qinyi Sun, Seth Ahrenbach, Federico Cassano 외

We introduce DafnyBench, the largest benchmark of its kind for training and evaluating machine learning systems for formal software verification. We test the ability of LLMs such as GPT-4 and Claude 3 to auto-generate en…