Abstract
This paper formally describes and studies an algorithm for compiling functions defined through pattern-matching. This algorithm improves on previous proposals by accepting an additional parameter: the domain over which the compiled function will be applied. This additional parameter simplifies the definition of the algorithm and suggests new applications.
The practical interest of this algorithm for the implementation of functional languages is demonstrated by several applications and/or extensions: conditional rewriting, equations between constructors, ...
This work has been supported, in part, by ESPRIT Project 415 and by CNRS Project C 3.
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
L. Augustsson. A compiler for Lazy ML. In Proc. ACM Conf. Lisp and Functional Programming, Austin, Texas, August 1984.
L. Augustsson. Compiling pattern matching. In Functional Programming Languages and Computer Architecture, Nancy, LNCS 201, Springer-Verlag, September 1985.
L. Cardelli. Compiling a functional language. In Proc. ACM Conf. Lisp and Functional Programming, Austin, Texas, August 1984.
H. Comon. An effective method for handling initial algebras. In Proc. 1st Workshop on Algebraic and Logic Programming, Gaussig, 1988.
H. Comon. Unification et Disunification: Théorie et Applications. Thèse de Doctorat, I.N.P. de Grenoble, France, 1988.
Futatsugi, Goguen, Jouannaud, and Meseguer. Principles of OBJ2. In Proc. ACM Symp. Principles of Programming Languages, 1985.
G. Huet and D. Oppen. Equations and rewrite rules: a survey. In R. Book, editor, Formal Language Theory: Perspectives and Open Problems, pages 349–405, Academic Press, 1980.
H. Hsiang and M. Rusinowitch. On word problems in equational theories. In Proc. 14th ICALP, LNCS 267, Springer-Verlag, 1987.
Ph. Jorrand. Term rewriting as a basis for the design of a functional and parallel programming language. A case study: the language FP2. In Fundamentals of Artificial Intelligence, LNCS 232, Springer-Verlag, 1986.
A. Laville. Lazy pattern matching in the ML language. In Proc. 7th Conf. Found. of Software Technology and Theoretical Computer Science, Pune, INDIA, LNCS 287, December 1987.
R. Milner. A proposal for Standard ML. In Proc. ACM Conf. Lisp and Functional Programming, Austin, Texas, August 1984.
S. Peyton-Jones. The Implementation of Functional Programming Languages. Prentice Hall Int., 1987.
Ph. Schnoebelen. Refined Compilation of Pattern-Matching for Functional Languages. Research Report Lifia 71 Imag 715, Univ. Grenoble, April 1988.
S. Thompson. Laws in Miranda. In Proc. ACM Conf. Lisp and Functional Programming, Cambridge, Mass., August 1986.
D. A. Turner. Miranda: a non-strict functional language with polymorphic types. In Functional Programming Languages and Computer Architecture, Nancy, LNCS 201, Springer-Verlag, September 1985.
P. Wadler. A critique of Abelson and Sussman or Why calculating is better than scheming. SIGPLAN Notices, 22(3), March 1987.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1988 Akademie-Verlag Berlin
About this paper
Cite this paper
Schnoebelen, P. (1988). Refined compilation of pattern-matching for functional languages. In: Grabowski, J., Lescanne, P., Wechler, W. (eds) Algebraic and Logic Programming. ALP 1988. Lecture Notes in Computer Science, vol 343. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-50667-5_75
Download citation
DOI: https://doi.org/10.1007/3-540-50667-5_75
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-50667-6
Online ISBN: 978-3-540-46063-3
eBook Packages: Springer Book Archive