Specify What? Enhancing Neural Specification Synthesis by Symbolic Methods
George Granberry, Wolfgang Ahrendt, Moa Johansson

TL;DR
This paper explores combining Large Language Models with symbolic analysis tools to improve the synthesis of C program specifications, enhancing annotation quality and robustness against bugs.
Contribution
It introduces a hybrid approach that integrates LLM prompts with formal methods tools to generate more accurate and context-aware program specifications.
Findings
Symbolic analysis improves annotation relevance.
Inclusion of runtime error reports enhances specification quality.
Method infers program intent, not just behavior.
Abstract
We investigate how combinations of Large Language Models (LLMs) and symbolic analyses can be used to synthesise specifications of C programs. The LLM prompts are augmented with outputs from two formal methods tools in the Frama-C ecosystem, Pathcrawler and EVA, to produce C program annotations in the specification language ACSL. We demonstrate how the addition of symbolic analysis to the workflow impacts the quality of annotations: information about input/output examples from Pathcrawler produce more context-aware annotations, while the inclusion of EVA reports yields annotations more attuned to runtime errors. In addition, we show that the method infers rather the programs intent than its behaviour, by generating specifications for buggy programs and observing robustness of the result against bugs.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsNeural Networks and Applications
