Efficient concise deterministic pattern-matching automata for ambiguous patterns

  • Authors:
  • Nadia Nedjah;Luiza de Macedo Mourelle

  • Affiliations:
  • State University of Rio de Janeiro, Rua São Francisco Xavier 524/ 5° andar, Maracanã, CEP 20550-900, Rio de Janeiro, RJ, Brazil;State University of Rio de Janeiro, Rua São Francisco Xavier 524/ 5° andar, Maracanã, CEP 20550-900, Rio de Janeiro, RJ, Brazil

  • Venue:
  • ACM SIGPLAN Notices
  • Year:
  • 2002

Quantified Score

Hi-index 0.00

Visualization

Abstract

Pattern-matching is a fundamental feature in many applications such as functional programming, logic programming, theorem proving, term rewriting and rule-based expert systems. Usually, patterns are pre-processed into a deterministic finite automaton. Using such an automaton allows one to determine the matched pattern(s) by a single scan of the input term. The matching automaton is typically based on left-to-right traversal of patterns. With ambiguous patterns a subject term may be an instance of more than one pattern. To select the pattern to use, a priority rule is usually engaged. The pre-processing of the patterns adds new patterns which are instances of the original ones. When the original patterns are ambiguous, some of the instances supplied may be irrelevant for the matching process. They may cause an unnecessary increase in the space requirements of the automaton and may also reduce the time efficiency of the matching process. Here, we devise a new pre-processing operation that recognises and avoids such irrelevant instances and hence improves space and time requirements for the matching automaton.