Anthropic's Claude now writes code and proves it safe automatically
decoder ·
Anthropic has partnered with Theorem to demonstrate that its AI model, Claude, can automatically generate mathematical proofs verifying the correctness of existing software code. In a recent project, Claude produced approximately 180 million lines of proof code for 123 open-source libraries from Google's OSS-Fuzz project within just a few weeks. This autonomous process involved translating crash tests into mathematical problems and analyzing compiled machine code, with an independent tool called Rocq checking the results. During this verification phase, Claude identified hundreds of bugs that conventional testing methods had missed over years, including critical security flaws in widely used PDF readers. However, these formal proofs are subject to strict limitations, applying only to specific processor architectures, single-threaded programs, and inputs under 64 MB. While the compute cost remains high, Anthropic notes that newer models are becoming more efficient, requiring fewer tokens to solve similar proofs. The company aims to make AI-driven formal verification as routine as standard software testing, potentially transforming how developers trust and review AI-generated code.
decoder