Adaptive Pattern Matching

R. C. Sekar, R. Ramesh, I. V. Ramakrishnan. Adaptive Pattern Matching. In Werner Kuich, editor, Automata, Languages and Programming, 19th International Colloquium, ICALP92, Vienna, Austria, July 13-17, 1992, Proceedings. Volume 623 of Lecture Notes in Computer Science, pages 247-260, Springer, 1992.

Abstract

Pattern matching is an important operation used in many applications such as functional programming, rewriting and rule-based expert systems. By preprocessing the patterns into a DFA-like automaton, we can rapidly select the matching pattern(s) in a single scan of the relevant portions of the input term. This automaton is typically based on left-to-right traversal (of the patterns) or its variants. By adapting the traversal order to suit the set of input patterns, it is possible to considerably reduce the space and matching time requirements of the automaton. The design of such adaptive automata is the focus of this paper. In this context we study several important problems that have remained open even for automata based on left-to-right traversais. Such problems include upper and lower bounds on space complexity, construction of optimal dag automata and impact of typing in pattern matching. An interesting consequence of our results is that lazy pattern matching in typed systems (such as ML) is computationally hard whereas it can be done efficiently in untyped systems.

Successor

The following is a more recent and up-to-date version of this publication: