Agentic Separation Logic Specification Synthesis
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
Specification synthesis, the task of automatically inferring formal specifications from program implementations and natural language, is important for refactoring, transpilation, optimization, and verification, yet remains an open challenge for large C++ repositories. Existing LLM-based approaches fail to simultaneously scale to such repositories, produce specifications expressive enough to capture systems-code features such as dynamic memory and heap-allocated data structures, and systematically validate those specifications to rule out incorrect candidates. We present Spec-Agent, an agentic system for synthesizing expressive, well-validated specifications across large C++ codebases. Spec-Agent targets a ladder of specification languages: propositional logic, first-order logic, propositional separation logic, and first-order separation logic. For each function, Spec-Agent uses static analysis and runtime heap tracing to select the appropriate target specification language, generalizes existing functional tests into fuzz harnesses, and iteratively refines LLM-generated candidates via counterexample-guided feedback. We evaluate Spec-Agent on open source C++ codebases comprising millions of lines of code. Spec-Agent synthesizes valid specifications for 85% of target functions, with no false positives observed under fuzzing and expert validation, outperforming Claude Code Opus 4.6 at 10x lower token cost.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 11 of its 36 references that are in the map. First posted on arXiv 26 May 2026.
Builds on
11 of 36 references.
Closest ancestors · 2
Same direction, newest first
- 2026Qwen3-Coder-Next Technical Report28 Feb
- 2025HarnessAgent: Scaling Automatic Fuzzing Harness Construction with Tool-Augmented LLM Pipelines3 Dec
Other references · 9
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2024Enchanting Program Specification Synthesis by Large Language Models using Static Analysis and Program Verificationcited by 58
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 57
- 2024SpecGen: Automated Generation of Formal Program Specifications via Large Language Modelscited by 53
- 2025ClassInvGen: Class Invariant Synthesis using Large Language Modelscited by 11
- 2025Shadows in the Code: Exploring the Risks and Defenses of LLM-based Multi-Agent Software Development Systemscited by 9
- 2019SLING: Using Dynamic Analysis to Infer Program Invariants in Separation Logiccited by 7
- 2023Towards General Loop Invariant Generation: A Benchmark of Programs with Memory Manipulationcited by 7
Built on by
Not cited yet.
Similar, not cited
Close in wording, no citation either way
- 2026Verus-SpecGym: An Agentic Environment for Evaluating Specification Autoformalization
- 2026LiveFMBench: Unveiling the Power and Limits of Agentic Workflows in Specification Generation
- 2026Agentic Model Checking
- 2026Automating Formal Verification with Agent-Guided Tree Search
- 2026Inductive Deductive Synthesis: Enabling AI to Generate Formally Verified Systems
- 2026LogicHunter: Testing LLM Agent Frameworks with an Agentic Oracle
- 2026SpecFirst: Behavioral Specification Elicitation as a First-Class Step in Agent-Based Program Synthesis from Scratch
- 2026SpecGuardBench: Can Coding Agents Construct Reliable Validation Harnesses from Natural Language Specifications?