What is formal verification?

Definition

Formal verification represents intended behavior as a mathematical specification and proves that an implementation satisfies it. Unlike testing, which examines selected examples, a proof can cover every input described by the model and specification.

The guarantee is only as meaningful as the specification and the assumptions around the verified code. People still need to review what was specified, connect the formal model to the production system and account for hardware, dependencies and behavior outside the proof boundary.

ELI5

Formal verification uses mathematics and machine-checked proofs to show that a system follows a precise specification. Tests try selected examples, while a proof can cover every case represented by the formal model.

For example, verification can prove that a transfer function preserves a stated balance rule for all allowed inputs. The guarantee still depends on the specification and assumptions matching the real program, hardware and surrounding services.

How is formal verification different from software testing?

Testing checks chosen executions, while formal verification uses logic to establish a property for every case covered by the specification and proof assumptions.

Can formal verification prove that software has no bugs?

It can prove specified properties within a defined model, but it cannot cover requirements that were omitted, incorrect assumptions or unverified parts of the real system.

  1. Varun Pant beside the words Prove the Code
  2. Pierce Freeman, Richard Diehl Martinez and Steven Kivelson appear beside the blue and white headline Proofs Need Fidelity on black.
  3. Jason Gross, Rajashree Agrawal and Sophia Dew beneath the blue and white headline Prove AI Code Safe on a black background.
  4. A flat proof checklist with a blue checkmark on black beneath the blue and white headline “AI Proof Limits”.
  5. Pierce Freeman, Richard Diehl Martinez beside the blue-and-white headline PROOF NEEDS REVIEW on a black background.
  6. A flat document outline and blue check mark beside the blue and white headline AI Math Proof or Hype? on black.
  7. Wes Roth against a black background beside the blue-and-white headline “AI MATH VERIFIED?”.
  8. A flat blue and off-white microscope against pure black beside the white and blue headline AI SCIENCE CLAIMS.
Definition card for formal verification: What is formal verification?

Formal verification uses mathematical logic and machine-checked proofs to establish that a system satisfies a precisely stated specification.