mlsanityData to 14 Oct 2026

Inferring multiple helper Dafny assertions with LLMs

arXiv 2511.00125 ↗First posted 31 Oct 2025cs.SE cs.AI cs.LOcited by 4

Not on the map. Why?

Abstract (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.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 16 of its 39 references that are in the map. First posted on arXiv 31 Oct 2025.

Builds on

16 of 39 references.

References · 16

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2023Jina Embeddings 2: 8192-Token General-Purpose Text Embeddings for Long Documentscited by 104
  3. 2023Clover: Closed-Loop Verifiable Code Generationcited by 67
  4. 2024Towards AI-Assisted Synthesis of Verified Dafny Methodscited by 58
  5. 2024DafnyBench: A Benchmark for Formal Software Verificationcited by 57
  6. 2023Verus: Verifying Rust Programs using Linear Ghost Types (extended version)cited by 53
  7. 2023Lemur: Integrating Large Language Models in Automated Program Verificationcited by 49
  8. 2024PropertyGPT: LLM-driven Formal Verification of Smart Contracts through Retrieval-Augmented Property Generationcited by 37
  9. 2023Ranking LLM-Generated Loop Invariants for Program Verificationcited by 33
  10. 2024VerMCTS: Synthesizing Multi-Step Programs using a Verifier, a Large Language Model, and Tree Searchcited by 14
  11. 2023From Words to Code: Harnessing Data for Program Synthesis from Natural Languagecited by 11
  12. 2023Leveraging Large Language Models for Automated Proof Synthesis in Rustcited by 11
4 more
  1. 2024dafny-annotator: AI-Assisted Verification of Dafny Programscited by 8
  2. 2024Leveraging Large Language Models to Boost Dafny's Developers Productivitycited by 7
  3. 2025Specification-Guided Repair of Arithmetic Errors in Dafny Programs using LLMscited by 2
  4. 2025Confident RAG: Enhancing the Performance of LLMs for Mathematics Question Answering through Multi-Embedding and Confidence Scoringcited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 4.

4 papers.