Term graph rewriting
Graph rewriting (also called reduction) as defined in Wadsworth  was introduced in order to be able to give a more efficient implementation of functional programming languages in the form of lambda calculus or term rewrite systems: identical subterms are shared using pointers.
Several other authors, e.g. Ehrig , Staples [1980a,b,c], Raoult  and van den Broek et al.  have given mathematical descriptions of graph rewriting, usually employing concepts from category theory. These papers prove among other things the correctness of graph rewriting in the form of the Church-Rosser property for “well-behaved” (i.e. regular) rewrite systems. However, only Staples has formally studied the soundness and completeness of graph rewriting with respect to term rewriting.
In this paper we give a direct operational description of graph rewriting that avoids the category theoretic notions. We show that if a term t is interpreted as a graph g(t) and is reduced in the graph world, then the result represents an actual reduct of the original term t(soundness). For weakly regular term rewrite systems, there is also a completeness result: every normal form of a term t can be obtained from the graphical implementation. We also show completeness for all term rewrite systems which possess a so called hypernormalising strategy, and in that case the strategy also gives a normalising strategy for the graphical implementation.
Besides having nice theoretical properties, weakly regular systems offer opportunities for parallelism, since redexes at different places can be executed independently or in parallel, without affecting the final result.
KeywordsNormal Form Function Symbol Garbage Collection Label Graph Complete Development
Unable to display preview. Download preview PDF.
- Barendregt, H.P.  The Lambda Calculus: its Syntax and Semantics (revised edition), North-Holland, Amsterdam.Google Scholar
- Barendregt, H.P., M.C.J.D. van Eekelen, J.R.W. Glauert, J.R. Kennaway, M.J. Plasmeijer and M.R. Sleep  Term graph rewriting, Report 87, Department of Computer Science, University of Nijmegen, and also as Report SYS-C87-01, School of Information Systems, University of East Anglia.Google Scholar
-  Towards an intermediate language based on graph rewriting, these proceedings.Google Scholar
- van den Broek, P.M. and G.F. van der Hoeven  Combinatorgraph reduction and the Church-Rosser theorem, preprint INF-86-15, Department of Informatics, Twente University of Technology.Google Scholar
- Ehrig, H.  Introduction to the algebraic theory of graph grammars, in: Graph grammars and their Applications in Computer Science and Biology, ed. V. Claus, H. Ehrig, and G. Rozenberg. Lecture notes in Computer Science 73, Springer, Berlin, 1–69.Google Scholar
- Glauert, J.R.W., J.R. Kennaway and M.R. Sleep  Category theoretic concepts of graph rewriting and garbage collection, in preparation, School of Information Systems, University of East Anglia.Google Scholar
- Huet, G. and Lévy, J.J.  Call-by-need computations in non-ambiguous term rewriting systems, Report 359, IRIA-Laboria, B.P. 105, 78150 Le Chesney, France.Google Scholar
- Kennaway, J.R.  An outline of some results of Staples on optimal reduction orders in replacement systems, Report CSA/19/1984, School of Information Systems, University of East Anglia, Norwich, England.Google Scholar
- Klop, J.W.  Combinatory Reduction Systems, Mathematical Centre Tracts n.127, Mathematical Centre, Kruislaan 413, 1098 SJ Amsterdam.Google Scholar
- Peyton Jones, S.L.  The Implementation of Functional Languages, Prentice-Hall, London, to appear.Google Scholar
- Turner, D.A. [1979a] A new implementation technique for applicative languages, in: Software: Practice and Experience 9, 31–49.Google Scholar
- [1979b] SASL Language Manual, “combinators” version, University of St. Andrews, U.K.Google Scholar
-  Miranda System Manual, Research Software Ltd., 1986.Google Scholar
- Wadsworth, C.P.  Semantics and Pragmatics of the Lambda Calculus, D.Phil. thesis, Programming Research Group, Oxford University.Google Scholar