An Empirical Study of LLM-Generated Specifications for VeriFast
Not on the map. Why?
Abstract (arXiv)
Static verification tools can assure industrial scale software, but require significant human labor to write specifications. This is particularly true of static verifiers based on separation logic (SL verifiers), which excel at verifying heapmanipulating programs, but require many complex auxiliary specifications to reason about heap structure. Recent work applies large language models (LLMs) to generate code, tests, and proofs, including specifications for verifiers, but mostly targeting non-SL verifiers. To address this gap, this paper thoroughly evaluates how well LLMs perform when prompted to generate specifications for verifying 303 C functions with the SL verifier VeriFast. We explored eight prompting approaches, ten LLMs, and three input types in two stages. Quantitative and qualitative analyses are used to assess the LLM-generated code and specifications for functional behavior, verifiability and errors. The results show that LLMs preserve functional behavior in source code and specifications (both over 91%), but achieve modest verification success (31.4%). Using Gemini 2.5 Pro and providing formal contracts lead to higher success rates in our setting. Moreover, most errors (94%) come from LLMs' mistakes in the domainspecific knowledge of SL verifiers such as VeriFast. These findings provide guidance for optimizing LLM-generated specifications for SL verifiers.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 43 of its 85 references that are in the map. First posted on arXiv 25 Jun 2026.
Builds on
43 of 85 references.
References · 43
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2024The Llama 3 Herd of Modelscited by 14,192
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2020Dense Passage Retrieval for Open-Domain Question Answeringcited by 3,779
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2021An Explanation of In-context Learning as Implicit Bayesian Inferencecited by 915
- 2022STaR: Bootstrapping Reasoning With Reasoningcited by 895
- 2022CodeGen: An Open Large Language Model for Code with Multi-Turn Program Synthesiscited by 876
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 484
31 more
- 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 414
- 2022CodeT: Code Generation with Generated Testscited by 369
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 357
- 2024AutoCodeRover: Autonomous Program Improvementcited by 272
- 2023Software Testing with Large Language Models: Survey, Landscape, and Visioncited by 163
- 2022Automatic Generation of Programming Exercises and Code Explanations using Large Language Modelscited by 124
- 2023Baldur: Whole-Proof Generation and Repair with Large Language Modelscited by 118
- 2022Large Language Models are Zero-Shot Fuzzers: Fuzzing Deep-Learning Libraries via Large Language Modelscited by 102
- 2024RepoAgent: An LLM-Powered Open-Source Framework for Repository-level Code Documentation Generationcited by 69
- 2022CoCoMIC: Code Completion By Jointly Modeling In-file and Cross-file Contextcited by 64
- 2024Towards AI-Assisted Synthesis of Verified Dafny Methodscited by 58
- 2024Enchanting Program Specification Synthesis by Large Language Models using Static Analysis and Program Verificationcited by 55
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 53
- 2023Magnushammer: A Transformer-Based Approach to Premise Selectioncited by 50
- 2023Verus: Verifying Rust Programs using Linear Ghost Types (extended version)cited by 50
- 2024AutoVerus: Automated Proof Generation for Rust Codecited by 46
- 2023LLMSTEP: LLM proofstep suggestions in Leancited by 32
- 2024Automated Proof Generation for Rust Code via Self-Evolutioncited by 31
- 2024Rango: Adaptive Retrieval-Augmented Proving for Automated Software Verificationcited by 25
- 2023Lyra: Orchestrating Dual Correction in Automated Theorem Provingcited by 24
- 2024Evaluating LLM-driven User-Intent Formalization for Verification-Aware Languagescited by 16
- 2023Can ChatGPT support software verification?cited by 14
- 2023Leveraging Large Language Models for Automated Proof Synthesis in Rustcited by 11
- 2025ClassInvGen: Class Invariant Synthesis using Large Language Modelscited by 11
- 2026DafnyPro: LLM-Assisted Automated Verification for Dafny Programscited by 11
- 2024Laurel: Unblocking Automated Verification with Large Language Modelscited by 10
- 2024VeCoGen: Automating Generation of Formally Verified C Code with Large Language Modelscited by 10
- 2024dafny-annotator: AI-Assisted Verification of Dafny Programscited by 8
- 2024Leveraging Large Language Models to Boost Dafny's Developers Productivitycited by 7
- 2025Adaptive Proof Refinement with LLM-Guided Strategy Selectioncited by 4
- 2025Inferring multiple helper Dafny assertions with LLMscited by 3
Built on by
Not cited yet.