International Symposium on Leveraging Applications of Formal Methods, Verification, and Validation • Kos, Greece
Time: Wednesday, 28.10
Room: Room 2
Authors: Martin Hána, Nikolai Kosmatov, Virgile Prevosto, Julien Signoles
Abstract: Software engineering approaches assisted by Artificial Intel- ligence (AI) are receiving increasing attention. This work evaluates the ability of large language models (LLMs) to assist engineers in the formal verification process. We conduct an experiment using ChatGPT on a PKCS#1 v1.5 signature parser that was recently (manually) specified in ACSL and verified with the Frama-C platform. Our approach prompts the LLM to generate ACSL annotations directly from the C code, cross-checks the generated specifications against known security requirements, and iteratively refines them to achieve a complete proof. In this verifi- cation loop, annotations are progressively improved using feedback from Frama-C. For failing proof obligations, we instruct the LLM to supply a sequence of ACSL assertions that guide the prover. Using structured prompts, we repeatedly obtain a complete proof for the target parser. This demonstrates that substantial parts of the formal verification workflow can be mechanized. We present our LLM-assisted verification approach, report its benefits and limitations, and compare it with the prior manual proof in terms of specification auditability and human effort.
Paper: 978-3-032-41269-0_5