Minimal deterministic left-to-right pattern-matching automata

  • Authors:
  • Nadia Nedjah

  • Affiliations:
  • UMIST, Manchester, UK

  • Venue:
  • ACM SIGPLAN Notices
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

We propose a practical technique to compile pattern-matching of prioritised overlapping patterns in equational languages to an minimal deterministic left-to-right matching automaton. First, we present a method to construct a tree matching automaton for such patterns. The automaton obtained allows pattern-matching to be performed without any backtracking. Although this automaton is efficient since it avoids symbol re-examination, it can only achieve this at the cost of increased space requirements. Such space requirements could be minimised by using a dag automaton that shares all the isomorphic subautomata which are duplicated in a tree automaton. We design an efficient method to identify such subautomata and avoid their construction while generating the dag automaton. This is achieved without constructing the tree automaton first.