A gallery of certified programs
This page collects several programs verified using Why.
External proofs
Examples
contained in Why distribution
Note :
Most Coq proofs require Coq 7.4.
- Dijkstra's
Dutch national flag
- Levenshtein
distance (code by Claude Marché)
- Bresenham line drawing algorithm (proof of
optimality)
- Binary search
- Integer
square root (code and proof by Claude Marché)
- Mac Carthy's 91 function
-
Knuth-Morris-Pratt string searching algorithm
- Find, from this
article:
C. A. R. Hoare. Proof of a program: FIND. Communications of
the ACM, 14(1):39-45, Jan 1971.
Sorting algorithms
- Maximum
sort (code and proof by Sylvain Boulmé)
- Selection sort
- Quicksort
- Quicksort :
a variant with a simpler partitioning, from
Bentley's Programming Pearls
- Heapsort (in place)