AI System Verifies Massive Software Codebases in Weeks
Anthropic deployed Claude to generate mathematical proofs for open-source libraries, uncovering hidden bugs and reducing the time required for formal verification.
By Beatrice Gray ·

Formal verification, the rigorous process of mathematically proving software correctness, has historically been too costly for widespread adoption. Anthropic announced on Thursday that its Claude model has successfully completed this task for existing code, marking a significant shift in how developers might trust AI-generated systems.
The technique has long been reserved for high-stakes applications like aviation software because it demands immense specialist labor. For instance, verifying the seL4 operating system kernel required twenty person-years of expert work. This high cost kept the method confined to extreme cases where reliability was critical, leaving most commercial software without such rigorous mathematical guarantees.
To address this bottleneck, Anthropic’s Frontier Red Team collaborated with Theorem to automate the process. The team provided Claude with test programs from 123 open-source libraries within Google’s OSS-Fuzz security project. Instead of writing new software, the model analyzed compiled machine code and converted crash tests into mathematical problems. Over a period of weeks, Claude generated approximately 180 million lines of proof code. A separate verification tool named Rocq checked these proofs automatically, requiring minimal human review. The researchers described the generation process as fully autonomous, though they noted that humans built the underlying formal foundations and tools at Theorem.
The project yielded immediate practical benefits beyond just verifying code. Claude detected hundreds of bugs during the process and was authorized to fix them. Many of these errors would likely have slipped past conventional testing because they only appear under narrow conditions, such as unusually large input files or specific access sequences. In one notable instance, the team verified a widely used PDF reader and found as many security bugs in one week as are typically reported for that software in an entire year. In another case, the model identified a logical error that had remained unnoticed for more than a decade.
Despite these successes, the company emphasized that formal verification does not guarantee a program is error-free in all scenarios. The proofs are valid only under specific defined conditions, including a particular processor architecture, single-threaded execution, and inputs smaller than 64 MB. Real-world deployments often involve different hardware and configurations, meaning the results must be interpreted with these constraints in mind.
Cost remains a significant factor in the adoption of this technology. Individual proofs consume hundreds of millions of tokens, and Anthropic has not disclosed the total project expenses. However, the company argues that if AI can verify its own code, developers can reduce the time spent on manual reviews. Early tests suggest that efficiency is improving, with Opus 5.5 solving half the proofs using about 40 percent fewer tokens than its predecessor.
The initiative represents a strategic move to make AI verification as practical as standard testing. Theorem’s roadmap now targets critical infrastructure components, including glibc, OpenSSL, and cURL. This work shifts the focus from whether AI can write code to whether it can prove that code is safe for public use.






