Skip to main content

2002 | OriginalPaper | Buchkapitel

The Abstraction and Instantiation of String-Matching Programs

verfasst von : Torben Amtoft, Charles Consel, Olivier Danvy, Karoline Malmkjær

Erschienen in: The Essence of Computation

Verlag: Springer Berlin Heidelberg

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

We consider a naive, quadratic string matcher testing whether a pattern occurs in a text; we equip it with a cache mediating its access to the text; and we abstract the traversal policy of the pattern, the cache, and the text. We then specialize this abstracted program with respect to a pattern, using the off-the-shelf partial evaluator Similix.Instantiating the abstracted program with a left-to-right traversal policy yields the linear-time behavior of Knuth, Morris and Pratt’s string matcher. Instantiating it with a right-to-left policy yields the linear-time behavior of Boyer and Moore’s string matcher.

Metadaten
Titel
The Abstraction and Instantiation of String-Matching Programs
verfasst von
Torben Amtoft
Charles Consel
Olivier Danvy
Karoline Malmkjær
Copyright-Jahr
2002
Verlag
Springer Berlin Heidelberg
DOI
https://doi.org/10.1007/3-540-36377-7_15

Neuer Inhalt