Verifying LLM-Generated Code in the Context of Software Verification with Ada/SPARK
Not on the map. Why?
Abstract (arXiv)
Large language models (LLMs) have demonstrated remarkable code generation capabilities, but the correctness of the generated code cannot be inherently trusted. This paper explores the feasibility of using formal software verification, specifically the SPARK framework for Ada, to ensure the reliability of LLM-generated code. We present Marmaragan, a tool that leverages an LLM in order to generate SPARK annotations for existing programs, enabling formal verification of the code. The tool is benchmarked on a curated set of SPARK programs, with annotations selectively removed to test specific capabilities. The performance of Marmaragan with GPT-4o on the benchmark is promising, with correct annotations having been generated for 50.7% of the benchmark cases. The results establish a foundation for future work on combining the power of LLMs with the reliability of formal software verification.
Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Builds on 7 of its 24 references that are in the map. First posted on arXiv 11 Feb 2025.
Builds on
7 of 24 references.
References · 7
- 2017Attention Is All You Needcited by 60,361
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2013Efficient Estimation of Word Representations in Vector Spacecited by 4,375
- 2022Draft, Sketch, and Prove: Guiding Formal Theorem Provers with Informal Proofscited by 291
- 2023Baldur: Whole-Proof Generation and Repair with Large Language Modelscited by 119
- 2022Thor: Wielding Hammers to Integrate Language Models and Automated Theorem Proverscited by 98
- 2023Magnushammer: A Transformer-Based Approach to Premise Selectioncited by 50
Built on by
Citing papers per year: 2025: 1; 2026: 3.
4 papers.
- 2025HoarePrompt: Structural Reasoning About Program Correctness in Natural Languagecited by 7
- 2026The Prover Is the Judge: Verified Security Software from AI Coding Agents in Ada/SPARKcited by 0
- 2026Can You Check That? The Checkability Boundary for Local LLM Network Automationcited by 0
- 2026Security in LLM-Assisted Coding: A Systematic Literature Reviewcited by 0
- 2026Security in LLM-Assisted Coding: A Systematic Literature Review11 Oct 2026
- 2026Can You Check That? The Checkability Boundary for Local LLM Network Automation25 Sep 2026
- 2026The Prover Is the Judge: Verified Security Software from AI Coding Agents in Ada/SPARK15 Jul 2026
- 2025HoarePrompt: Structural Reasoning About Program Correctness in Natural Language25 Mar 2025