Formal verification can provably guarantee the correctness of critical system software, but the high proof burden has long hindered its wide adoption. Recently, Large Language Models (LLMs) have shown success in code analysis and synthesis. In this paper, we present a combination of LLMs and static analysis to synthesize invariants, assertions, and other proof structures for a Rust-based formal verification framework called Verus. In a few-shot setting, LLMs demonstrate impressive logical ability in generating postconditions and loop invariants, especially when analyzing short code snippets. However, LLMs lack the ability to retain and propagate context information, a strength of traditional static analysis. Based on these observations, we developed a prototype based on OpenAI's GPT-4 model. Our prototype decomposes the verification task into multiple smaller ones, iteratively queries GPT-4, and combines its output with lightweight static analysis. We evaluated the prototype with a developer in the automation loop on 20 vector-manipulating programs. The results demonstrate that it significantly reduces human effort in writing entry-level proof code.
AutoVerus: Automated Proof Generation for Rust Code
University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Columbia University(哥伦比亚大学);University of California Irvine(加州大学尔湾分校);University of Toronto(多伦多大学);Microsoft Research(微软研究院);Microsoft Research Asia(微软亚洲研究院);University of Chicago(芝加哥大学)
Automated Proof Generation for Rust Code via Self-Evolution
Peking University(北京大学);Microsoft Research(微软研究院);University of Illinois at Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);Columbia University(哥伦比亚大学);University of California Irvine(加州大学 Irvine 分校)
Automated Visualization Code Synthesis via Multi-Path Reasoning and Feedback-Driven Optimization
AI Research, Enhans, Seoul, South Korea Innovation \& Technology, KAIST, Daejeon, South Korea Department of Computer Science, University of California, Berkeley, CA, United States Department of Electrical