FM-Agent: Scaling Formal Methods to Large Systems via LLM-Based Hoare-Style Reasoning

19d ago · Global · primary source: export.arxiv.org

A new framework called FM-Agent automates formal verification of large codebases, using large language models to apply Hoare-style compositional reasoning and uncover hundreds of bugs in previously tested systems, according to research published on arXiv [1]. The framework, detailed in a paper by Haoran Ding and colleagues, targets a persistent bottleneck in software verification: the manual effort required to write formal specifications for individual functions [1]. Hoare logic, a foundational method for proving program correctness, decomposes systems into smaller components but has historically struggled to scale because each function demands a precise specification [2]. The problem intensifies when code is generated by LLMs, as developers often lack a deep understanding of each function's expected behavior [3]. FM-Agent addresses this by introducing a top-down paradigm that derives a function's specification from how its callers expect it to behave, capturing developer intent even when the implementation contains bugs [4]. Because that intent is typically expressed in natural language, the framework generalizes Hoare-style inference to reason about functions against natural-language specifications, bypassing the formula-only limitation of existing verifiers [5]. After reasoning, FM-Agent automatically generates test cases to confirm bug existence and explain root causes [1]. In an evaluation, the framework successfully reasoned about large-scale systems within 2 days, including codebases of up to 143,000 lines of code [1]. The systems had already undergone developer testing, yet FM-Agent identified 522 newly discovered bugs [2]. The paper states these defects could lead to serious consequences such as system crashes and incorrect execution results [3]. The work lands as LLM-assisted software development becomes more prevalent, with models capable of generating large-scale systems like compilers [4]. The research community has increasingly focused on strengthening correctness guarantees for such generated code [5]. The paper appears on arXiv, a platform that has integrated with services like Hugging Face Spaces to make machine-learning research more accessible through interactive demos [8].

applicationresearch-paperinfrastructuretool-release

Background sources we checked (10)
  • arxiv.org ↗ LLM-assisted software development has become increasingly prevalent, and can generate large-scale systems, such as compilers. It becomes crucial to strengthen the correctness of the generated code. However, automated reasoning for large-scale systems remains challenging due to co…
  • arxiv.org ↗ LLM-assisted software development has become increasingly prevalent, and can generate large-scale systems, such as compilers. It becomes crucial to strengthen the correctness of the generated code. However, automated reasoning for large-scale systems remains challenging due to co…
  • arxiv.org ↗ LLM-assisted software development has become increasingly prevalent, and can generate large-scale systems, such as compilers. It becomes crucial to strengthen the correctness of the generated code. However, automated reasoning for large-scale systems remains challenging due to co…
  • arxiv.org ↗ FM-Agent: Scaling Formal Methods to Large Systems ... via LLM-Based Hoare-Style Reasoning ... Hoare logic offers an approach to decomposing a large system into smaller components and reasoning about them ... This paper presents FM-Agent, the first framework that ... realizes aut…
  • en.wikipedia.org ↗ This glossary of artificial intelligence is a list of definitions of terms and concepts relevant to the study of artificial intelligence (AI), its subdisciplines, and related fields. Related glossaries include Glossary of computer science, Glossary of robotics, Glossary of machin…
  • arxiv.org ↗ LLM-assisted software development has become increasingly prevalent, and can generate large-scale systems, such as compilers. It becomes crucial to strengthen the correctness of the generated code. However, automated reasoning for large-scale systems remains challenging due to co…
  • huggingface.co ↗ Hugging Face Machine Learning Demos on arXiv Back to Articles ... # Hugging Face Machine Learning Demos on arXiv Published November 17, 2022 Update on GitHub Upvote 1 - - - - - Abubakar Abid abidlabs Follow …
  • info.arxiv.org ↗ ## Hugging Face Spaces ... Hugging Face code repositories, About Hugging Face ... Collaborators: Abubakar Abid, Omar Sanseviero, Ahsen Khaliq, and the Hugging Face team ... Hugging Face Spaces includes links to demos created by the community or the authors themselves. By going to…
  • huggingface.co ↗ Demos on Hugging Face Spaces allow a wide audience to try out state-of-the-art machine learning research without writing any code. Hugging Face and ArXiv have collaborated to embed these demos directly along side papers on ArXiv! ... Thanks to this integration, users can now find…
  • en.wikipedia.org ↗ Hangzhou DeepSeek Artificial Intelligence Basic Technology Research Co., Ltd., doing business as DeepSeek, is a Chinese artificial intelligence (AI) company that develops large language models (LLMs). Based in Hangzhou, Zhejiang, DeepSeek is owned and funded by High-Flyer, a Chin…

Sources

Spot something wrong? Report an issue