mlsanityData to 7 Oct 2026

Can ChatGPT support software verification?

arXiv 2311.02433 ↗First posted 4 Nov 2023cs.SE cs.AI cs.FLcited by 14

Not on the map. Why?

Abstract (arXiv)

Large language models have become increasingly effective in software engineering tasks such as code generation, debugging and repair. Language models like ChatGPT can not only generate code, but also explain its inner workings and in particular its correctness. This raises the question whether we can utilize ChatGPT to support formal software verification. In this paper, we take some first steps towards answering this question. More specifically, we investigate whether ChatGPT can generate loop invariants. Loop invariant generation is a core task in software verification, and the generation of valid and useful invariants would likely help formal verifiers. To provide some first evidence on this hypothesis, we ask ChatGPT to annotate 106 C programs with loop invariants. We check validity and usefulness of the generated invariants by passing them to two verifiers, Frama-C and CPAchecker. Our evaluation shows that ChatGPT is able to produce valid and useful invariants allowing Frama-C to verify tasks that it could not solve before. Based on our initial insights, we propose ways of combining ChatGPT (or large language models in general) and software verifiers, and discuss current limitations and open issues.

Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Builds on 10 of its 31 references that are in the map. First posted on arXiv 4 Nov 2023.

Builds on

10 of 31 references.

References · 10

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2022Training language models to follow instructions with human feedbackcited by 15,712
  3. 2022Survey of Hallucination in Natural Language Generationcited by 2,056
  4. 2023Teaching Large Language Models to Self-Debugcited by 963
  5. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
  6. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
  7. 2022CodeT: Code Generation with Generated Testscited by 369
  8. 2023Check Your Facts and Try Again: Improving Large Language Models with External Knowledge and Automated Feedbackcited by 351
  9. 2023Impact of Code Language Models on Automated Program Repaircited by 85
  10. 2021Neural Termination Analysiscited by 16

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 4; 2025: 5; 2026: 5.

14 papers.

Sort:

By area: