Abstract
Formally well-founded compilation techniques for Term Rewriting Systems (TRSs) are presented. TRSs are compiled into Minimal Term Rewriting Systems (MTRSs), a subclass of TRSs in which all rules have an extremely simple form. A notion of simulation of (rewrite) relations is presented, under which an MTRS can be said to simulate a TRS. The MTRS rules can be directly interpreted as instructions for an extremely simple Abstract Rewriting Machine (ARM). Favourable practical results have already been obtained with an earlier version of ARM.
We would like to thank Jan Bergstra, Jan Heering, Paul Klint, Bas Luttik and the anonymous referees for reading and commenting on drafts of this paper.
This is a preview of subscription content, log in via an institution.
Preview
Unable to display preview. Download preview PDF.
References
A.V.Aho, R. Sethi, and J.D. Ullman. Compilers. Principles, Techniques and Tools. Addison-Wesley, 1986.
J.C.M. Baeten, J.A. Bergstra, J.W. Klop, and W.P. Weijland. Term-rewriting systems with rule priorities. Theoretical Computer Science, 67(1):283–301, 1989.
G. Cousineau, P.-L. Curien, and M. Mauny. The categorical abstract machine. In J.-P. Jouannaud, editor, Functional Programming Languages and Computer Architecture, volume 201 of Lecture Notes in Computer Science, pages 50–64. Springer-Verlag, 1985.
N. Dershowitz, J.-P. Jouannaud, and J.W. Klop. Open problems in rewriting. In R.V. Book, editor, Proceedings of the 4th International Conference on Rewriting Techniques and Applications, number 488 in Lecture Notes in Computer Science, pages 445–456. Springer-Verlag, 1991.
Jon Fairbairn and Stuart Wray. Tim: A simple, lazy abstract machine to execute supercombinators. In Gilles Kahn, editor, Functional Programming Languages and Computer Architecture, volume 274 of Lecture Notes in Computer Science, pages 34–45. Springer-Verlag, 1987.
P. Fradet and D. Le Métayer. Compilation of functional languages by program transformation. ACM Transactions on Programming Languages and Systems, 13(1):21–51, january 1991.
Lutz H. Hamel and Joseph A. Goguen. Towards a provably correct compiler for OBJ3. In Proceedings of the International Conference on Programming Language Implementation and Logic Programming, PLILP '94, 1994.
Pieter H. Hartel, Marc Feeley, et al. Benchmarking implementations of functional languages with “pseudoknot”, a float-intensive benchmark. Journal of Functional Programming, 1996. Accepted for publication.
C.M. Hoffmann and M.J. O'Donnell. Pattern matching in trees. Journal of the ACM, 29(1):68–95, 1982.
Simon L Peyton Jones and Jon Salkild. The Spineless Tagless G-machine. In Functional Programming and Computer Architecture, pages 184–201. ACM, 1989.
J.F.Th. Kamperman and H.R. Walters. ARM — Abstract Rewriting Machine. In H.A. Wijshoff, editor, Computing Science in the Netherlands, pages 193–204, 1993.
J.F.Th. Kamperman and H.R. Walters. Lazy rewriting and eager machinery. In Jieh Hsiang, editor, Rewriting Techniques and Applications, number 914 in Lecture Notes in Computer Science, pages 147–162. Springer-Verlag, 1995.
J.F.Th. Kamperman and H.R. Walters. Simulating trss by minimal trss: a simple, efficient, and correct compilation technique. Technical Report CS-R9605, CWI, january 1996. Available as http://www.cwi.nl/epic/articles/CS-R9605.ps.Z.
J.W. Klop. Term rewriting systems. In S. Abramsky, D. Gabbay, and T. Maibaum, editors, Handbook of Logic in Computer Science, Volume 2., pages 1–116. Oxford University Press, 1992.
Nancy Lynch and Frits Vaandrager. Forward and backward simulations: I. untimed systems. Information and Computation, 121(2):214–233, September 1995.
Mikael Pettersson. A term pattern-match compiler inspired by finite automata theory. In U. Kastens and P. Pfahler, editors, Proceedings of the Fourth International Conference on Compiler Construction, number 641 in Lecture Notes in Computer Science, pages 258–270. Springer-Verlag, 1992.
Simon L. Peyton-Jones. The Implementation of Functional Programming Languages. Prentice-Hall, 1987.
M J. Plasmeijer and M C J D. van Eekelen. Functional Programming and Parallel Graph Rewriting. Addison Wesley, 1993.
D.A. Turner. A new implementation technique for applicative languages. Software Practice and Experience, 9:31–49, 1979.
H.R. Walters. On Equal Terms, Implementing Algebraic Specifications. PhD thesis, University of Amsterdam, 1991. Available by ftp from ftp.cwi.nl:/pub/gipe/reports as Wal91.ps.Z.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1996 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kamperman, J.F.T., Walters, H.R. (1996). Minimal term rewriting systems. In: Haveraaen, M., Owe, O., Dahl, OJ. (eds) Recent Trends in Data Type Specification. ADT COMPASS 1995 1995. Lecture Notes in Computer Science, vol 1130. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-61629-2_48
Download citation
DOI: https://doi.org/10.1007/3-540-61629-2_48
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-61629-0
Online ISBN: 978-3-540-70642-7
eBook Packages: Springer Book Archive