Specify What? Enhancing Neural Specification Synthesis by Symbolic Methods
Paper in proceeding, 2025

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 the programs intent, rather than its behaviour, by generating specifications for buggy programs and observing robustness of the result against bugs.

Author

George Warren Granberry

Chalmers, Computer Science and Engineering (Chalmers), Formal methods

Wolfgang Ahrendt

Chalmers, Computer Science and Engineering (Chalmers), Formal methods

Moa Johansson

Chalmers, Computer Science and Engineering (Chalmers), Data Science and AI

Published in

Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)

03029743 (ISSN) 16113349 (eISSN)

Vol. 15234 LNCSp. 307-325
9783031765537 (ISBN)

Conference

19th International Conference on integrated Formal Methods, iFM 2024
Manchester, United Kingdom, 2024-11-12 - 2024-11-14

Categorizing

Subject Categories

Software Engineering

Identifiers

DOI

10.1007/978-3-031-76554-4_19

More information

Latest update

12/2/2024