Skip to main content

Efficient Pattern Matching for Non-strongly Sequential Term Rewriting Systems

  • Conference paper
  • First Online:
  • 3670 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 2718))

Abstract

Pattern matching is a fundamental feature in many applications such as rule-based expert systems. Usually, patterns are pre-processed into a deterministic finite automaton. With ambiguous patterns a subject term may be an instance of more than one pattern and so a priority rule is usually engaged to select the matched pattern. 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. Their introduction causes unnecessary increase of space requirements. Furthermore, they slow down the matching process. Here, we devise a new pre-processing operation that identifies and avoids including such irrelevant instances and hence improves space and time requirements for the matching automaton and process.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Augustsson, A Compiler for lazy ML, Proc. Conference on Lisp and Functional Programming, ACM, pp. 218–227, 1984.

    Google Scholar 

  2. J. Christian, Flatterms, Discrimination nets and fast term rewriting, Journal of Automated Reasoning, vol. 10, pp. 95–113, 1993.

    Article  MathSciNet  Google Scholar 

  3. D. Cooper and N. Wogrin, Rule-based programming with OPS5, Morgan Kaufmann, San Francisco, 1988.

    Google Scholar 

  4. N. Dershowitz and J.P. Jouannaud, Rewrite systems, Handbook of Theoretical Computer Science, vol. 2, chap. 6, Elsevier Science, 1990.

    Google Scholar 

  5. A.J. Field and P.G. Harrison, Functional programming, International Computer Science Series, 1988.

    Google Scholar 

  6. J.A Goguen and T. Winkler, Introducing OBJ3, Technical report SRI-CSL-88-9, Computer Science Laboratory, SRI International, 1998.

    Google Scholar 

  7. A. Gräf, Left-to-right tree pattern matching, Proc. Conference on Rewriting Techniques and Applications, Lecture Notes in Computer Science, vol. 488, pp. 323–334, 1991.

    Google Scholar 

  8. C.M. Hoffman and M.J. O’Donnell, Pattern matching in trees, Journal of ACM, vol. 29, no 1, pp. 68–95, 1982.

    Article  Google Scholar 

  9. P. Hudak and al., Report on the programming language Haskell: a Non-Strict, Purely Functional Language, Sigplan Notices, Section S, May 1992.

    Google Scholar 

  10. A. Laville, Comparison of priority rules in pattern matching and term rewriting, Journal of Symbolic Computation, no 11, pp. 321–347, 1991.

    Article  MATH  MathSciNet  Google Scholar 

  11. N. Nedjah, C.D. Walter and S.E. Eldridge, Optimal left-to-right pattern matching automata, Proc. Conference on Algebraic and Logic Programming, Southampton, UK, Lecture Notes in Computer Science, M. Hanus, J. Heering and K. Meinke Eds., Springer-Verlag, vol. 1298, pp. 273–285, 1997.

    Chapter  Google Scholar 

  12. N. Nedjah, Postponing redex contractions in equational programs, Proc. Symposium on Functional and Logic Programming, Kyoto, Japan, M. Sato and Y. Toyama Eds., World Scientific, pp. 40–60, 1998.

    Google Scholar 

  13. N. Nedjah, C.D. Walter and S.E. Eldridge, Efficient automata-driven pattern matching for equational programs, Software-Practice and Experience, vol. 29, no 9, pp. 793–813, John Wiley, 1999.

    Article  Google Scholar 

  14. N. Nedjah and L.M. Mourelle, Dynamic deterministic pattern matching, Proc. Computing: the Australasian Theory Symposium, Canberra, Australia, D.A. Wolfram Ed., Electronic Notes in Theretical Computer Science, Elsevier Science, vol. 31, 2000.

    Google Scholar 

  15. N. Nedjah and L.M. Mourelle, Improving time, space and termination in term rewriting-based programming, Proc. International Conference on Industrial & Engineering Applications of Artificial Intelligence & Expert Systems, Budapest, Hungary, Lecture Notes in Computer Science, L. Monostori, J. Váncsa and A. M. Ali Eds., Springer-Verlag, vol. 2070, pp. 880–890, June 2001.

    Google Scholar 

  16. N. Nedjah and L.M. Mourelle, Optimal Adaptive Pattern-Matching, Proc. International Conference on Industrial & Engineering Applications of Artificial Intelligence & Expert Systems, Cairn, Australia, Lecture Notes in Computer Science, T. Hendtlass and A. M. Ali Eds., Springer-Verlag, vol. 2358, pp. 768–779, June 2002.

    Google Scholar 

  17. M.J. O’Donnell, Equational logic as programming language, MIT Press, 1985.

    Google Scholar 

  18. R.C. Sekar, R. Ramesh and I.V. Ramakrishnan, Adaptive pattern matching, SIAM Journal, vol. 24, no 5, pp. 1207–1234, 1995.

    Article  MATH  MathSciNet  Google Scholar 

  19. D.A. Turner, Miranda: a Non strict functional language with polymorphic Types, Proc. Conference on Lisp and Functional Languages, ACM, pp. 1–16, 1985.

    Google Scholar 

  20. P. Wadler, Efficient compilation of pattern matching, In “The Implementation of Functional Programming Languages”, S. L. Peyton-Jones, Prentice-Hall International, pp. 78–103, 1987.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Nedjah, N., Mourelle, L.d.M. (2003). Efficient Pattern Matching for Non-strongly Sequential Term Rewriting Systems. In: Chung, P.W.H., Hinde, C., Ali, M. (eds) Developments in Applied Artificial Intelligence. IEA/AIE 2003. Lecture Notes in Computer Science(), vol 2718. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45034-3_42

Download citation

  • DOI: https://doi.org/10.1007/3-540-45034-3_42

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-40455-2

  • Online ISBN: 978-3-540-45034-4

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics