Abstract
We study the problem of pattern matching in languages whose type system is hierarchical and whose evaluation strategy is lazy. We propose an extension of the Puel-Suárez compilation scheme to function definitions via order-sorted patterns. Pattern matching trees (PMT's) are defined to have edges labelled not only with structure, but also with subsort constraints. Due to this latter kind of edges, terms are reduced only as far as required to make either a structure or a subsort verification decidable. We show that the PMT is optimal if a decidable property of sequentiality holds for the sets generated during the compilation process. Our method turns out to be applicable for strict languages as well.
This work was partly done while the author was a research intern at the Paris Research Laboratory of Digital Equipment Corporation.
Preview
Unable to display preview. Download preview PDF.
References
Gérard Berry. Séquentialité de l'évaluation formelle des lambdas-expressions. Proc. 3rd International Colloquium on Programming, Paris, France, 1978.
Joseph Goguen and José Meseguer. Order-Sorted Algebra I: Equational Deduction for Multiple Inheritance, Overloading, Exceptions and Partial Operations. Technical report, SRI International-CSL, 1989.
Joseph Goguen and Timothy Winkler. Introducing OBJ3. Technical Report SRI-CSL-88-9, SRI International, Computer Science Lab, 1988.
Gérard Huet and Jean-Jacques Lévy. Call by need computations in non ambiguous linear term rewriting systems. Rapport IRIA Laboria 359, INRIA, Le Chesnay, France, 1979.
Robert Harper, David MacQueen, and Robin Milner. Standard ML. Technical Report ECS-LFCS-86-2, Department of Computer Science, University of Edinburgh, 1986.
Jean-Pierre Jouannaud and Claude Kirchner. Solving Equations in Abstract Algebras: A Rule-Based Survey of Unification. Technical Report 561, Laboratoire de Recherche en Informatique. Université Paris-Sud, Centre d'Orsay, 1990.
Delia Kesner. Pattern Matching in Order-Sorted Languages. Technical report, Laboratoire de Recherche en Informatique. Université Paris-Sud, Centre d'Orsay, 1991.
Alain Laville. Evaluation des Filtrages avec Priorité. Application au Language ML. Thèse de Doctorat. Université Paris VII, 1988.
Laurence Puel and Ascánder Suárez. Compiling Pattern Matching by Term Decomposition. In 1990 ACM Conference on Lisp and Functional Programming. ACM Press. Also in PRL Research Report Number 4, Digital Equipment Corporation, Paris Research Laboratory, 1990.
Gert Smolka and Hassan Aït-Kaci. Inheritance Hierarchies: Semantics and Unification. Volume 7. In Journal of Symbolic Computation. Academic Press, 1989.
Gert Smolka. Logic Programming over Polymorphically Order-Sorted Types. PhD thesis. Universität Kaiserslautern, Germany, 1988.
Gert Smolka, Werner Nutt, Joseph Goguen, and José Meseguer. Order Sorted Equational Computation. In Hassan Aït-Kaci and Maurice Nivat, editors, Resolution of Equations in Algebraic Structures. Volume 2: Rewriting Techniques, pages 297–367. Academic Press, 1989.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kesner, D. (1991). Pattern matching in order-sorted languages. In: Tarlecki, A. (eds) Mathematical Foundations of Computer Science 1991. MFCS 1991. Lecture Notes in Computer Science, vol 520. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-54345-7_70
Download citation
DOI: https://doi.org/10.1007/3-540-54345-7_70
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-54345-9
Online ISBN: 978-3-540-47579-8
eBook Packages: Springer Book Archive