3DGen: AI-Assisted Generation of Provably Correct Binary Format Parsers
Not on the map. Why?
Abstract (arXiv)
Improper parsing of attacker-controlled input is a leading source of software security vulnerabilities, especially when programmers transcribe informal format descriptions in RFCs into efficient parsing logic in low-level, memory unsafe languages. Several researchers have proposed formal specification languages for data formats from which efficient code can be extracted. However, distilling informal requirements into formal specifications is challenging and, despite their benefits, new, formal languages are hard for people to learn and use. In this work, we present 3DGen, a framework that makes use of AI agents to transform mixed informal input, including natural language documents (i.e., RFCs) and example inputs into format specifications in a language called 3D. To support humans in understanding and trusting the generated specifications, 3DGen uses symbolic methods to also synthesize test inputs that can be validated against an external oracle. Symbolic test generation also helps in distinguishing multiple plausible solutions. Through a process of repeated refinement, 3DGen produces a 3D specification that conforms to a test suite, and which yields safe, efficient, provably correct, parsing code in C. We have evaluated 3DGen on 20 Internet standard formats, demonstrating the potential for AI-agents to produce formally verified C code at a non-trivial scale. A key enabler is the use of a domain-specific language to limit AI outputs to a class for which automated, symbolic analysis is tractable.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). First posted on arXiv 16 Apr 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 2; 2025: 3; 2026: 1.
6 papers.
- 2024AutoVerus: Automated Proof Generation for Rust Codecited by 49
- 2024LLM-Vectorizer: LLM-based Verified Loop Vectorizercited by 25
- 2026Intent Formalization: A Grand Challenge for Reliable Coding in the Age of AI Agentscited by 9
- 2025Large Language Models for Validating Network Protocol Parserscited by 5
- 2025Towards Functional Correctness of Large Code Models with Selective Generationcited by 1
- 2025Position: Intelligent Coding Systems Should Write Programs with Justificationscited by 0
- 2026Intent Formalization: A Grand Challenge for Reliable Coding in the Age of AI Agents17 Mar 2026
- 2025Position: Intelligent Coding Systems Should Write Programs with Justifications8 Aug 2025
- 2025Towards Functional Correctness of Large Code Models with Selective Generation19 May 2025
- 2025Large Language Models for Validating Network Protocol Parsers18 Apr 2025
- 2024AutoVerus: Automated Proof Generation for Rust Code19 Sep 2024
- 2024LLM-Vectorizer: LLM-based Verified Loop Vectorizer7 Jun 2024