Partial evaluation of pattern matching in strings
Information Processing Letters
Deriving a functional Knuth-Morris-Pratt algorithm by transformation
Journal of Information Processing
Partial evaluation of pattern matching in constraint logic programming languages
PEPM '91 Proceedings of the 1991 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Partial evaluation is fuller laziness
PEPM '91 Proceedings of the 1991 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
Automatic autoprojection of recursive equations with global variable and abstract data types
Science of Computer Programming
Correctness and efficiency of pattern matching algorithms
Information and Computation
Partial evaluation and automatic program generation
Partial evaluation and automatic program generation
Tutorial notes on partial evaluation
POPL '93 Proceedings of the 20th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
XSB as an efficient deductive database engine
SIGMOD '94 Proceedings of the 1994 ACM SIGMOD international conference on Management of data
Tabled evaluation with delaying for general logic programs
Journal of the ACM (JACM)
Specialization of lazy functional logic programs
PEPM '97 Proceedings of the 1997 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
A fast string searching algorithm
Communications of the ACM
Improving programs by the introduction of recursion
Communications of the ACM
Glossary for Partial Evaluation and Related Topics
Higher-Order and Symbolic Computation
A Discipline of Programming
Automatic generation of efficient string matching algorithms by generalized partial computation
ASIA-PEPM '02 Proceedings of the ASIAN symposium on Partial evaluation and semantics-based program manipulation
On obtaining Knuth, Morris, and Pratt's string matcher by partial evaluation
ASIA-PEPM '02 Proceedings of the ASIAN symposium on Partial evaluation and semantics-based program manipulation
The Design and Analysis of Computer Algorithms
The Design and Analysis of Computer Algorithms
Program transformation system based on generalized partial computation
New Generation Computing - Partial evaluation and program transformation
Revised Report on the Algorithmic Language Scheme
Higher-Order and Symbolic Computation
Occam's Razor in Metacompuation: the Notion of a Perfect Process Tree
WSA '93 Proceedings of the Third International Workshop on Static Analysis
Partial evaluation of pattern matching in strings, revisited
Nordic Journal of Computing
Development reuse and the logic program derivation of two string-matching algorithms
Proceedings of the 3rd ACM SIGPLAN international conference on Principles and practice of declarative programming
The abstraction and instantiation of string-matching programs
The essence of computation
Dynamic Programming
Disjunctive partial deduction of a right-to-left string-matching algorithm
Information Processing Letters
Handbook of Exact String Matching Algorithms
Handbook of Exact String Matching Algorithms
POPL '13 Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Hi-index | 0.00 |
We show how to obtain all of Knuth, Morris, and Pratt's linear-time string matcher by specializing a quadratic-time string matcher with respect to a pattern string. Although it has been known for fifteen years how to obtain this linear matcher by partial evaluation of a quadratic one, how to obtain it in linear time has remained an open problem.Obtaining a linear matcher by the partial evaluation of a quadratic one is achieved by performing its backtracking at specialization time and memoizing its results. We show (1) how to rewrite the source matcher such that its static intermediate computations can be shared at specialization time and (2) how to extend the memoization capabilities of a partial evaluator to static functions. Such an extended partial evaluator, if its memoization is implemented efficiently, specializes the rewritten source matcher in linear time. Finally, we show that the method also applies to a variant of Boyer and Moore's string matcher.