Formal Verification of Python Standard-Library Code

UCL, 2025: verifying CPython standard-library functions by symbolic execution, and testing where the method breaks.

Stack: CrossHair, Z3.

  • Verified CPython standard-library functions by symbolic execution: 32 of 33 contracts verified.
  • Seeded a deliberate counterexample to test where the method fails, rather than reporting only the cases where it succeeds.