More Efficient Left-to-Right Pattern Matching in Non-sequential Equational Programs

  • Nadia Nedjah
  • Luiza de Macedo Mourelle
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2676)

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. In this paper, we propose a method to build such an automaton. Then, we propose an incremental method to build a deterministic concise automaton for non-necessarily sequential rewriting systems. 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. Hence improves space and time requirements for the matching automaton.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Nadia Nedjah
    • 1
  • Luiza de Macedo Mourelle
    • 1
  1. 1.Department of Systems Engineering and Computation, Faculty of EngineeringState University of Rio de JaneiroMaracanã, Rio de Janeiro, RJBrazil

Personalised recommendations