Abstract

This article describes how automatically specializing a fairly naive pattern matcher by partial evaluation leads to the Knuth, Morris & Pratt algorithm. Interestingly enough, no theorem proving is needed to achieve the partial evaluation, as was previously argued, and it is sufficient to identify a static component in the computation to get the result—a deterministic finite automaton. This experiment illustrates how a small insight and partial evaluation can achieve a nontrivial result.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call