|
ABSTRACT
Calculational developments of functional programs have been likened to conjuring tricks: enjoyable to watch but often a mystery as to how they are done. This pearl explains the trick. The aim is to give new calculations of two famous algorithms in string matching, the Knuth-Morris-Pratt algorithm and the Boyer-Moore algorithm. The string matching problem is formulated polymorphically, so the only available property of elements of the alphabet is an equality test.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
Ager, M S, Danvy, O, Rohde, H K. Fast partial evaluation of pattern matching in strings. BRICS Report Series, RS-03-11, University of Aarhus, Denmark, 2003.
|
 |
2
|
|
| |
3
|
Bird, R S. Introduction to Functional Programming using Haskell Prentic Hall Europe, 1988.
|
| |
4
|
|
| |
5
|
Crochemore, M, and Rytter, W. Jewels of Stringology. World Scientific, Hong Kong, 2002.
|
| |
6
|
Danvy, O and Rohde, H K. On obtaining the Boyer-Moore string-matching algorithm by partial evaluation. BRICS Research Report RS-05-14, University of Aarhus, Denmark, 2005.
|
 |
7
|
|
| |
8
|
|
| |
9
|
|
|