VeCoGen: Automating Generation of Formally Verified C Code with Large Language Models
Not on the map. Why?
Abstract (arXiv)
Large language models have demonstrated impressive capabilities in generating code, yet they often produce programs with flaws or deviations from intended behavior, limiting their suitability for safety-critical applications. To address this limitation, this paper introduces VECOGEN, a novel tool that combines large language models with formal verification to automate the generation of formally verified C programs. VECOGEN takes a formal specification in ANSI/ISO C Specification Language, a natural language specification, and a set of test cases to attempt to generate a verified program. This program-generation process consists of two steps. First, VECOGEN generates an initial set of candidate programs. Secondly, the tool iteratively improves on previously generated candidates. If a candidate program meets the formal specification, then we are sure the program is correct. We evaluate VECOGEN on 15 problems presented in Codeforces competitions. On these problems, VECOGEN solves 13 problems. This work shows the potential of combining large language models with formal verification to automate program generation.
Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). First posted on arXiv 28 Nov 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 5; 2026: 5.
10 papers.
- 2025Bridging LLM Planning Agents and Formal Methods: A Case Study in Plan Verificationcited by 7
- 2025Survey of GenAI for Automotive Software Development: From Requirements to Executable Codecited by 5
- 2025Generating Automotive Code: Large Language Models for Software Development and Verification in Safety-Critical Systemscited by 3
- 2026Precise Debugging Benchmark: Is Your Model Debugging or Regenerating?cited by 2
- 2026Evaluating LLM-Generated ACSL Annotations for Formal Verificationcited by 1
- 2025When the Code Autopilot Breaks: Why LLMs Falter in Embedded Machine Learningcited by 0
- 2025AutoICE: Automatically Synthesizing Verifiable C Code via LLM-driven Evolutioncited by 0
- 2026An Empirical Study of LLM-Generated Specifications for VeriFastcited by 0
- 2026Natural-Language to SysMLv2 Translation via Conformance-Driven Iterative Refinementcited by 0
- 2026GenOS: Compositional Certificates for Semantic Robustness in AI Code Generationcited by 0
- 2026GenOS: Compositional Certificates for Semantic Robustness in AI Code Generation4 Aug 2026
- 2026Natural-Language to SysMLv2 Translation via Conformance-Driven Iterative Refinement14 Jul 2026
- 2026An Empirical Study of LLM-Generated Specifications for VeriFast25 Jun 2026
- 2026Precise Debugging Benchmark: Is Your Model Debugging or Regenerating?19 Apr 2026
- 2026Evaluating LLM-Generated ACSL Annotations for Formal Verification14 Feb 2026
- 2025AutoICE: Automatically Synthesizing Verifiable C Code via LLM-driven Evolution8 Dec 2025
- 2025Bridging LLM Planning Agents and Formal Methods: A Case Study in Plan Verification3 Oct 2025
- 2025When the Code Autopilot Breaks: Why LLMs Falter in Embedded Machine Learning13 Sep 2025
- 2025Survey of GenAI for Automotive Software Development: From Requirements to Executable Code20 Jul 2025
- 2025Generating Automotive Code: Large Language Models for Software Development and Verification in Safety-Critical Systems4 Jun 2025