Skip to main content

Term rewriting with sharing and memoïzation

  • Conference paper
  • First Online:
Algebraic and Logic Programming (ALP 1992)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 632))

Included in the following conference series:

Abstract

Jungle evaluation is an approach to define term rewriting with sharing based on graph grammars. This approach preserves important properties of term rewriting like termination, and confluence for terminating systems (under mild restrictions).

In this paper, term rewriting with sharing is further accelerated, by memoïzation known from functional programming languages: The result of evaluating a function with some arguments is tabulated so that it can be looked up later on when the function is re-applied to the same arguments.

We show that term rewriting with sharing and memoïzation is correct and complete w.r.t. jungle evaluation if the rules are non-overlapping and non-looping. Redundant re-evaluation of functions is avoided, independent of a particular strategy for applying evaluation rules.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. N. Dershowitz. Termination of Rewriting. Journal of Symbolic Computation, 3(1,2):69–115, Corrigendum: 4(3), 409–410, 1987.

    Google Scholar 

  2. N. Dershowitz and J.-P. Jouannaud. Rewrite Systems. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science (Vol. B), chapter 6, pages 243–320. North Holland, 1990.

    Google Scholar 

  3. N. Dershowitz and S. Kaplan. Rewrite, Rewrite, Rewrite, Rewrite, Rewrite, ... In Proc. 16th Symposium on Principles of Programming Languages, pages 250–259. ACM Press, 1989.

    Google Scholar 

  4. H. Ehrig. Introduction to the Algebraic Theory of Graph Grammars. In 1st Workshop on Graph Grammars and their Application to Computer Science and Biology, pages 1-69. Springer, LNCS 73, 1979.

    Google Scholar 

  5. A. Habel, H.-J. Kreowski, and D. Plump. Jungle Evaluation. In Fifth Workshop on Specification of Abstract Data Types, pages 92–112. Springer, LNCS 332, 1988. (See also in Fundamenta Informaticae 15(1), 31–60, 1991).

    Google Scholar 

  6. B. Hoffmann. Jungle Evaluation with Memoïzation. Technical Report 2-92, Fachbereich Mathematik / Informatik, Universität Bremen, 1992. to appear.

    Google Scholar 

  7. B. Hoffmann and D. Plump. Jungle Evaluation for Efficient Term Rewriting. In Algebraic and Logic Programming, pages 191–203. Springer, LNCS 343, 1988. Also in: Akademie-Verlag Berlin. Long version in technical report 4/88, Fachbereich 3 — Informatik, Universität Bremen.

    Google Scholar 

  8. B. Hoffmann and D. Plump. Implementing Term Rewriting by Jungle Evaluation. RAIRO Theoretical Informatics and Applications, 25(5):445–472, 1991.

    Google Scholar 

  9. R.J.M. Hughes. Lazy Memo Functions. In Jouannaud, editor, Conf. on Fund. Lang, and Comp. Arch., pages 129–146. IFIP, Springer, LNCS 201, September 1985.

    Google Scholar 

  10. S. Kahrs. Unlimp: Uniqueness as a Leitmotiv for Implementation. In Proc. PLILP'92 (4th Workshop on Programming Language Implementation and Logic Programming). To appear in LNCS, 1992.

    Google Scholar 

  11. J.R. Kennaway, J.W. Klop, M.R. Sleep, and F.J. de Vries. Transfinite Reductions in Orthogonal Term Rewriting Systems. Technical Report CS-R9041, Centrum for Wiskunde en Informatica, Amsterdam, 1990. Extended abstract in: Rewriting Techniques and Applications 1991 (RTA'91), R.V. Book, ed., LNCS 488, Springer, 1–12.

    Google Scholar 

  12. J.W. Klop. Term Rewriting Systems. Technical Report CS-R9073, Centre for Mathematics and Computer Science, Amsterdam, 1990. to appear in: S. Abramsky, D. Gabbay, and T. Maibaum (eds.): Handbook on Logics in Computer Science, Oxford University Press.

    Google Scholar 

  13. J.W. Klop. Term Rewriting Systems. In S. Abramsky, D. Gabbay, and T. Maibaum, editors, Handbook on Logics in Computer Science, volume II, page ??? Oxford University Press, 1991. Early version available as CWI Report CS-R9073, 132 pages, Amsterdam, 1990.

    Google Scholar 

  14. H.-J. Kreowski. Manipulation von Graphmanipulationen. PhD thesis, TU Berlin, 1977.

    Google Scholar 

  15. D.A. Plaisted. The Undecidability of self-embedding for term rewriting systems. Information Processing Letters, 20:61–64, 1985.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Berthold Hoffmann .

Editor information

Hélène Kirchner Giorgio Levi

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hoffmann, B. (1992). Term rewriting with sharing and memoïzation. In: Kirchner, H., Levi, G. (eds) Algebraic and Logic Programming. ALP 1992. Lecture Notes in Computer Science, vol 632. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0013824

Download citation

  • DOI: https://doi.org/10.1007/BFb0013824

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-55873-6

  • Online ISBN: 978-3-540-47302-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics