FVEL: Interactive Formal Verification Environment with Large Language Models via Theorem Proving

Xiaohan Lin, Qingxing Cao, Yinya Huang, Haiming Wang, Jianqiao Lu +3 more
6/20/2024
cs.AIcs.CLcs.LG

No official code found. Best implementation: FVELER/FVEL (2 stars, last commit 2024-08-17).

Abstract

Formal verification (FV) has witnessed growing significance with current emerging program synthesis by the evolving large language models (LLMs). However, current formal verification mainly resorts to symbolic verifiers or hand-craft rules, resulting in limitations for extensive and flexible verification. On the other hand, formal languages for automated theorem proving, such as Isabelle, as another line of rigorous verification, are maintained with comprehensive rules and theorems. In this paper, we propose FVEL, an interactive Formal Verification Environment with LLMs. Specifically, FVEL transforms a given code to be verified into Isabelle, and then conducts verification via neural automated theorem proving with an LLM. The joined paradigm leverages the rigorous yet abundant formulated and organized rules in Isabelle and is also convenient for introducing and adjusting cutting-edge LLMs. To achieve this goal, we extract a large-scale FVELER3. The FVELER dataset includes code dependencies and verification processes that are formulated in Isabelle, containing 758 theories, 29,125 lemmas, and 200,646 proof steps in total with in-depth dependencies. We benchmark FVELER in the FVEL environment by first fine-tuning LLMs with FVELER and then evaluating them on Code2Inv and SV-COMP. The results show that FVEL with FVELER fine-tuned Llama3- 8B solves 17.39% (69 -> 81) more problems, and Mistral-7B 12% (75 -> 84) more problems in SV-COMP. And the proportion of proof errors is reduced. Project page: https://fveler.github.io/.

View on arXivView PDF

Code Implementations(1)

FVELER/FVELCommunity100%

An interactive formal verification environment with LLMs via theorem proving.

20Python, IsabelleJun 9, 20242 years ago

Similar Papers

Cite this paper

@article{lin2024fvel,
  title  = {FVEL: Interactive Formal Verification Environment with Large Language Models via Theorem Proving},
  author = {Xiaohan Lin and Qingxing Cao and Yinya Huang and Haiming Wang and Jianqiao Lu and Zhengying Liu and Linqi Song and Xiaodan Liang},
  year   = {2024},
  eprint = {2406.14408},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2406.14408},
  url    = {http://arxiv.org/abs/2406.14408v2},
  journal = {NEURIPS 2024 2024}
}

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/2406.14408.svg)](https://codeofpaper.com/paper/2406.14408)

Discussion