Back to AI News
arxiv

Ten-Step LLM-Assisted Workflow for Dafny Verification

The paper presents a systematic ten-step workflow for LLM-assisted formal verification of scientific algorithms in Dafny, covering formalization, contracts, invariant validation, proof construction, bottleneck profiling, and proof optimization. It combines LLM-driven development using Claude Opus 5 and Opus 5.5 with automated testing and verification feedback while retaining human oversight for correctness-critical decisions. The approach was evaluated on 37 complex algorithms from graph theory and labelled transition systems, including verification of the Hopcroft-Tarjan triconnectivity test. Many machine-checked verifications were reportedly completed within hours to a few days of interactive development.

AI Brief

It offers a concrete, structured workflow for using LLMs in formal verification, with evidence from complex algorithm proofs and implications for changing the verifier's role.

arXiv:2611.16886v1 Announce Type: cross Abstract: Formal verification of complex algorithms requires expertise in program specification, invariant construction, mathematical proof, and the management of automated theorem provers. Although large language models (LLMs) can generate program code and proof fragments, reliably developing complete machine-checked verifications remains challenging: it requires an iterative process of constructing and validating specifications and invariants, building proofs, diagnosing solver failures, and optimizing verification performance. This paper presents a systematic ten-step workflow for LLM-assisted verification of scientific algorithms using the Dafny verification system. The workflow integrates algorithm formalization, contract development, empirical invariant validation, proof construction, bottleneck profiling, and resource-driven proof optimization. We applied the workflow using Antrhopic's Claude Opus 5 and Opus 5.5 models, combining LLM-driven development with automated testing and verification feedback, while retaining human oversight for correctness-critical decisions and strategic interventions. We evaluate the approach on 37 complex algorithms from graph theory and labelled transition systems. Notably, we verified the Hopfcroft-Tarjan triconnectivity test, demonstrating that even highly challenging algorithmic verification tasks can be carried out through a structured LLM-assisted workflow. Many of our machine-checked verifications were obtained within hours to a few days of interactive development. Our results suggest that LLM-assisted workflows can shift the role of the human verifier from detailed proof construction toward supervision, specification review, and strategic guidance.
Be the first to rate this article.

Comments & Questions (0)

Captcha
Please be respectful — let's keep the conversation friendly.

No comments yet

Be the first to comment!