Evaluating the Ability of Large Language Models to Generate Verifiable Specifications in VeriFast

Wen Fan, Marilyn Rego, Xin Hu, Sanya Dod, Zhaorui Ni +3 more
11/4/2024
cs.SEcs.AIcs.LO

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Static verification is a powerful method for enhancing software quality, but it demands significant human labor and resources. This is particularly true of static verifiers that reason about heap manipulating programs using an ownership logic. LLMs have shown promise in a number of software engineering activities, including code generation, test generation, proof generation for theorem provers, and specification generation for static verifiers. However, prior work has not explored how well LLMs can perform specification generation for specifications based in an ownership logic, such as separation logic. To address this gap, this paper explores OpenAI's GPT-4o model's effectiveness in generating specifications on C programs that are verifiable with VeriFast, a separation logic based static verifier. Our experiment employs three different types of user inputs as well as basic and Chain-of-Thought (CoT) prompting to assess GPT's capabilities. Our results indicate that the specifications generated by GPT-4o preserve functional behavior, but struggle to be verifiable. When the specifications are verifiable they contain redundancies. Future directions are discussed to improve the performance.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{fan2024evaluating,
  title  = {Evaluating the Ability of Large Language Models to Generate Verifiable Specifications in VeriFast},
  author = {Wen Fan and Marilyn Rego and Xin Hu and Sanya Dod and Zhaorui Ni and Danning Xie and Jenna DiVincenzo and Lin Tan},
  year   = {2024},
  eprint = {2411.02318},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.02318v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.02318.svg)](https://codeofpaper.com/paper/2411.02318)

Discussion