Skip to main content

Optimal Adaptive Pattern Matching

  • Conference paper
  • First Online:

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

Abstract

We propose a practical technique to compile pattern matching for prioritised overlapping patterns in equational languages into a minimal, deterministic, adaptive, matching automaton. Compared with left-to-right matching automata, adaptive ones have a smaller size and allow shorter matching time. They may improve termination properties as well. Here, space requirements are further reduced by using directed acyclic graphs (dags) automata that shares all the isomorphic subautomata. We design an efficient method to identify such subautomata and hence avoid duplicating their construction while generating the minimised dag automaton.

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, Proceedings ACM 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. N. Dershowitz and J. P. Jouannaud, Rewrite Systems, Handbook of Theoretical Computer Science, vol. 2, chap. 6, Elsevier Science Publishers, 1990.

    Google Scholar 

  4. A. J. Field and P. G. Harrison, Functional Programming, International Computer Science Series, 1988.

    Google Scholar 

  5. A. Gräf, Left-to-Right Tree Pattern matching, Proceedings Conference on Rewriting Techniques and Applications, Lecture Notes in Computer Science, vol. 488, pp. 323–334, 1991.

    Google Scholar 

  6. C. M. Hoffman and M. J. O’Donnell, Pattern matching in Trees, Journal of ACM, 29(l):68–95, 1982.

    Article  Google Scholar 

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

    Google Scholar 

  8. A. Laville, Comparison of Priority Rules in Pattern Matching and Term Rewriting, Journal of Symbolic Computation, 11:321–347, 1991.

    Article  MATH  MathSciNet  Google Scholar 

  9. N. Nedjah, Pattern matching Automata for Efficient Evaluation in Equational Programming, Ph.D. Thesis, University of Manchester-Institute of Science and Technology, Manchester, UK, (Abstract and Contents in the Bulletin of the European Association of Computer Science, vol. 60, November 1997.)

    Google Scholar 

  10. N. Nedjah, C. D. Walter and S. E. Eldridge, Optimal Left-to-Right Pattern matching Automata, Proceedings of the Sixth International Conference on Algebraic and Logic Programming, Southampton, UK, Lecture Notes in Computer Science, M. Hanus, J. Heering and K. Meinke Editors, Springer-Verlag, vol. 1298, pp. 273–285, 1997.

    Chapter  Google Scholar 

  11. N. Nedjah, C. D. Walter and S. E. Eldridge, Efficient Automata-Driven Pattern matching for Equational programs, Software-Practice and Experience, 29(9):793–813, John Wiley, 1999.

    Article  Google Scholar 

  12. 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, Springer-Verlag, vol. 2070, pp. 880–890, June 2001.

    Google Scholar 

  13. M. J. O’Donnell, Equational Logic as Programming Language, MIT Press, 1985.

    Google Scholar 

  14. R. C. Sekar, R. Ramesh and I. V. Ramakrishnan, Adaptive Pattern matching, SIAM Journal, 24(6): 1207–1234, 1995.

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Nedjah, N., de Macedo Mourelle, L. (2002). Optimal Adaptive Pattern Matching. In: Hendtlass, T., Ali, M. (eds) Developments in Applied Artificial Intelligence. IEA/AIE 2002. Lecture Notes in Computer Science(), vol 2358. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48035-8_74

Download citation

  • DOI: https://doi.org/10.1007/3-540-48035-8_74

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-43781-9

  • Online ISBN: 978-3-540-48035-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics