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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
A. Augustsson, A Compiler for lazy ML, Proc. Conference on Lisp and Functional Programming, ACM, pp. 218–227, 1984.
J. Christian, Flatterms, Discrimination nets and fast term rewriting, Journal of Automated Reasoning, vol. 10, pp. 95–113, 1993.
D. Cooper and N. Wogrin, Rule-based programming with OPS5, Morgan Kaufmann, San Francisco, 1988.
N. Dershowitz and J.P. Jouannaud, Rewrite systems, Handbook of Theoretical Computer Science, vol. 2, chap. 6, Elsevier Science, 1990.
A.J. Field and P.G. Harrison, Functional programming, International Computer Science Series, 1988.
J.A Goguen and T. Winkler, Introducing OBJ3, Technical report SRI-CSL-88-9, Computer Science Laboratory, SRI International, 1998.
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.
C.M. Hoffman and M.J. O’Donnell, Pattern matching in trees, Journal of ACM, vol. 29, no 1, pp. 68–95, 1982.
P. Hudak and al., Report on the programming language Haskell: a Non-Strict, Purely Functional Language, Sigplan Notices, Section S, May 1992.
A. Laville, Comparison of priority rules in pattern matching and term rewriting, Journal of Symbolic Computation, no 11, pp. 321–347, 1991.
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.
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.
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.
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.
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.
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.
M.J. O’Donnell, Equational logic as programming language, MIT Press, 1985.
R.C. Sekar, R. Ramesh and I.V. Ramakrishnan, Adaptive pattern matching, SIAM Journal, vol. 24, no 5, pp. 1207–1234, 1995.
D.A. Turner, Miranda: a Non strict functional language with polymorphic Types, Proc. Conference on Lisp and Functional Languages, ACM, pp. 1–16, 1985.
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.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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