# Specification of reduction strategies in term rewriting systems

## Abstract

There is a growing interest in Term Rewriting Systems (TRS's), which are used as a conceptual basis for new programming languages such as functional languages and algebraic specification languages. TRS's serve as a computational model for (parallel) implementations of these languages. They also form the foundation for a calculus for Graph Rewriting Systems (GRS's). In Rewriting Systems reduction strategies play an important role because they control the actual rewriting process. Strategies determine the order of the rewriting and the rules to apply. Hence they have a great influence on the efficiency and the amount of parallelism in the computation. In ambiguous or non-deterministic TRS's, they even influence the outcome of the computation. Some of the reduction strategies used in TRS's are extremely complex algorithms. Unfortunately, there is no common formal specification method for reduction strategies yet.

In this paper three formal methods for specifying reduction strategies in TRS's are presented. In the first method the reduction strategy is encoded in the TRS itself. The original TRS is transformed to a so called annotation TRS in which the strategy is encoded using functions. This annotation TRS itself may use any normalizing reduction strategy. Unfortunately, compared with the number of rules of the original TRS, the annotation TRS may contain an exponential number of additional rules. In the second method this drawback is prevented, simply by using a priority TRS as annotation TRS. The desire to specify a strategy uniformly for all TRS's leads to the third method. A new TRS system is introduced that uses two basic primitives for matching and rewriting and that is build out of three separate TRS's. The use of this abstract-interpretation TRS is shown to be the most promising method.

## Keywords

Normal Form Reduction Strategy Functional Language Rewrite System Functional Programming Language## Preview

Unable to display preview. Download preview PDF.

## References

- [BAE86]Baeten, J.C.M., Bergstra J.A., Klop J.W., "Term Rewriting Systems with Priorities", University of Amsterdam, Report FVI 86-03, 1986.Google Scholar
- [BAR86a]Barendregt, H.P., Eekelen, M.C.J.D. van, Glauert, J.R.W., Kennaway, J.R., Plasmeijer, M.J., Sleep, M.R., "Towards an Intermediate Language based on Graph Rewriting", University of East-Anglia and University of Nijmegen, Nijmegen internal report 88.Google Scholar
- [BAR86b]Barendregt, H.P., Eekelen, M.C.J.D. van, Glauert, J.R.W., Kennaway, J.R., Plasmeijer, M.J., Sleep, M.R., "Term Graph Rewriting", University of East-Anglia and University of Nijmegen, Nijmegen internal report 87.Google Scholar
- [BRO86]Broek, P.M. van den, Hoeven, G.F. van der, "Combinatorgraph Reduction and the Church-Rosser Property", internal report INF 86-15, Technical University of Twente, june 1986.Google Scholar
- [BUR85]Burn, G.L., Hankin, C.L., Abramsky, S., "The Theory and Practice of Strictness Analysis for Higher Order Functions", Research Report DoC 85/6, Imperial College, London 1985.Google Scholar
- [EHR78]Ehrig, H., "Introduction to the Algebraic Theory of Graph Grammars", Lecture Notes in Computer Science 73, Springer-Verlag Berlin, Aug. 1978.Google Scholar
- [FUT84]Futatsugi, K., Goguen, J.A., Jouannaud, J.P., Messaguer, J., "Principles of OBJ2", Twelfth Annual ACM Symposium on Principles of Programming Languages, Jan 1984, pp. 52–66.Google Scholar
- [GLA85]Glauert, J.R.W., Holt, N.P., Kennaway, J.R., Reeve, M.J., Sleep, M.R., Watson, I., "DACTLO: A Computational Model and an associated Compiler Target Language", University of East-Anglia 1985, internal report.Google Scholar
- [KLO85]Klop, J.W., "Term rewriting systems", Notes for the Seminar on Reduction Machines, Ustica 1985, to appear.Google Scholar
- [MAG80]Magó, G.A., "A Cellular Computer for Functional Programming", digest of Papers, IEEE Comp. Soc. COMPCON, Spring 1980, pp. 179–187.Google Scholar
- [O'DO85]O'Donnell, M.J., "Equational Logic as a Programming Language", Foundations of Computing Series, MIT Press, 1985.Google Scholar
- [RAO84]Raoult, J.C., "On Graph Rewritings", Theor. Comp. Sc. 32, North-Holland, 1984, pp. 1–24.CrossRefGoogle Scholar
- [TUR85]Turner, D.A., "Miranda: A non-strict functional language with polymorphic types", Proceedings, Conference On Functional Programming Languages and Computer Architecture, Nancy 1985, Jouannaud, J.P., Ed., Lecture Notes in Computer Science 201, Springer-Verlag, Berlin Heidelberg New York Tokyo, pp. 1–16.Google Scholar