CPython formalization project uses AI agents to model code in Lean, files 418 bug reports
Formalizing CPython
The CPython formalization project used Opus 5.5 to rewrite CPython 3.15.2 functions line by line in Lean. So far 4,071 functions have passed tests, formal verification and independent agent review, 15.7% of the functions to be checked.
Why it matters: The project pairs line-by-line modeling with differential testing and independent review, using real runs to check whether formal conclusions miss exception and memory behavior.