The String Search Algorithm by Knuth, Morris and Pratt

Fabian Hellauer and Peter Lammich

18 December 2017

Abstract

The Knuth-Morris-Pratt algorithm is often used to show that the problem of finding a string s in a text t can be solved deterministically in O(|s| + |t|) time. We use the Isabelle Refinement Framework to formulate and verify the algorithm. Via refinement, we apply some optimisations and finally use the Sepref tool to obtain executable code in Imperative/HOL.
BSD License

Depends On

Topics

Related Entries

Theories