Towards Automated Formal Verification of Backend Systems with LLMs
Not on the map. Why?
Abstract (arXiv)
Software testing plays a critical role in ensuring that systems behave as intended. However, existing automated testing approaches struggle to match the capabilities of human engineers due to key limitations such as test locality, lack of general reliability, and business logic blindness. In this work, we propose a novel framework that leverages functional programming and type systems to translate Scala backend code into formal Lean representations. Our pipeline automatically generates theorems that specify the intended behavior of APIs and database operations, and uses LLM-based provers to verify them. When a theorem is proved, the corresponding logic is guaranteed to be correct and no further testing is needed. If the negation of a theorem is proved instead, it confirms a bug. In cases where neither can be proved, human intervention is required. We evaluate our method on realistic backend systems and find that it can formally verify over 50% of the test requirements, which suggests that half of a testing engineer's workload can be automated. Additionally, with an average cost of only 2.19 per API, LLM-based verification is significantly more cost-effective than manual testing and can be scaled easily through parallel execution. Our results indicate a promising direction for scalable, AI-powered software testing, with the potential to greatly improve engineering productivity as models continue to advance.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 18 of its 51 references that are in the map. First posted on arXiv 13 Apr 2025.
Builds on
18 of 51 references.
References · 18
- 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
- 2023ChatUniTest: A Framework for LLM-Based Test Generationcited by 96
- 2024Formal Mathematical Reasoning: A New Frontier in AIcited by 81
- 2024Towards AI-Assisted Synthesis of Verified Dafny Methodscited by 58
- 2024DafnyBench: A Benchmark for Formal Software Verificationcited by 57
- 2023Verus: Verifying Rust Programs using Linear Ghost Types (extended version)cited by 53
- 2023Lemur: Integrating Large Language Models in Automated Program Verificationcited by 49
- 2023A New Era in Software Security: Towards Self-Healing Software via Large Language Models and Formal Verificationcited by 42
- 2024PropertyGPT: LLM-driven Formal Verification of Smart Contracts through Retrieval-Augmented Property Generationcited by 37
- 2024FVEL: Interactive Formal Verification Environment with Large Language Models via Theorem Provingcited by 22
- 2025From Informal to Formal -- Incorporating and Evaluating LLMs on Natural Language Requirements to Verifiable Formal Proofscited by 18
- 2024All Artificial, Less Intelligence: GenAI through the Lens of Formal Verificationcited by 11
6 more
- 2024A System for Automated Unit Test Generation Using Large Language Models and Assessment of Generated Test Suitescited by 8
- 2025Vulnerability Detection: From Formal Verification to Large Language Models and Hybrid Approaches: A Comprehensive Overviewcited by 7
- 2016Do be do be docited by 4
- 2014Koka: Programming with Row Polymorphic Effect Typescited by 3
- 2023Soda: An Object-Oriented Functional Language for Specifying Human-Centered Problemscited by 3
- 2018Eff Directly in OCamlcited by 1
Built on by
Citing papers per year: 2025: 1.
1 paper.
- 2025Monadic Context Engineeringcited by 0
- 2025Monadic Context Engineering27 Dec 2025