Abstract
This paper deals with the problem of compiling pattern-matching of associative-commutative function definitions in a functional-like language where the evaluation is performed by head-rewriting. We propose an effective algorithm (i.e which does not rely on some -unknown- procedure for computing complements of terms modulo AC-axioms) to compile the pattern-matching process. For this purpose, we introduce the concept of pattern trees. We also get for free a test of the completeness of such definitions (with respect to head-rewriting), provided some linearity condition is met. Our method will ensure an efficient pattern-matching process at evaluation time.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
L Augustsson. Compiling pattern matching. In Proceedings of the 2nd Conference on Functional Programming Languages and Computer Architecture, volume 201, Nancy (France), 1985. Springer Verlag, Lecture Notes in Computer Science.
D. Benanav, D. Kapur, and P. Narendran. Complexity of matching problems. Journal of Symbolic Computation, 3(1 & 2):203–216, April 1987.
B. Gramlich and J. Denzinger. Efficient ac-matching using constraint propagation. Technical Report SR-88-15, SEKI, Universite' de Kaiserslautern, RFA, 1988.
G. Huet and J.J. Levy. Call by need computations in non-ambiguous linear term rewriting systems. Research report 359, INRIA, August 1979.
J.P. Jouannaud and E. Kounalis. Proof by induction in equational theories without constructors. In Proceedings 1st Symp. on Logic In Computer Science, pages 358–366, Boston (USA), 1986.
D. Kapur, P. Narendran, D.J. Rosenkrantz, and H. Zhang. Sufficient-completeness, quasi-reducibility and their complexity. Technical report, State University of New York at Albany, 1987.
E. Kounalis. Testing for inductive-(co)-reducibility in rewrite system. In 15th Colloquium on Trees in Algebra and Programming, volume 431 of Lecture Notes in Computer Science, pages pp175–191. Springer-Verlag, 1990.
A. Laville. Lazy pattern matching in the ML language. In Proceedings 7th Conf. on Foundations of Software Technology and Theoretical Computer Science, volume 287 of Lecture Notes in Computer Science, pages 400–419. Springer-Verlag, Lecture Notes in Computer Science, December 1987.
A. Laville. Comparison of priority rules in pattern matching and term rewriting. Technical report, INRIA, 1988.
P. W. Purdom and C. A. Brown. Fast-many-to-one matching algorithm. In J. P. Jouannaud, editor, Proc. 1st Conf. Rewriting Techniques and Applications, pages 407–416. Springer-Verlag, Lecture Notes in Computer Science, 1985.
S. Peyton-Jones. The implementation of functional programming languages. Prentice Hall, 1987.
L. Puel and A. Suarez. Compiling pattern matching by term decomposition. In Proceedings ACM Conference on LISP and Functional Programming, 1990.
Ph. Schnoebelen. Refined compilation of pattern matching for functional languages. Science of Computer Programming, 11:133–159, 1988.
R.C. Sekar and I.V. Ramakrishnan. Programming in equational logic: Beyond strong sequentiality. In 5th Symp. Logic in Computer Science, pages 230–241. IEEE, 1990.
Ralf Treinen. A new method for undecidability proofs of first order theories. In K. V. Nori and C. E. Veni Madhavan, editors, Proceedings of the Tenth Conference on Foundations of Software Technology and Theoretical Computer Science, pages 48–62. Springer Lecture Notes in Computer Science, vol. 472, 1990.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kounalis, E., Lugiez, D. (1991). Compilation of pattern matching with associative-commutative functions. In: Abramsky, S., Maibaum, T.S.E. (eds) TAPSOFT '91. CAAP 1991. Lecture Notes in Computer Science, vol 493. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-53982-4_4
Download citation
DOI: https://doi.org/10.1007/3-540-53982-4_4
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-53982-7
Online ISBN: 978-3-540-46563-8
eBook Packages: Springer Book Archive