Skip to main content

Lazy rewriting and eager machinery

  • Regular Papers
  • Conference paper
  • First Online:
Book cover Rewriting Techniques and Applications (RTA 1995)

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

Included in the following conference series:

Abstract

We define Lazy Term Rewriting Systems and show that they can be realized by local adaptations of an eager implementation of conventional term rewriting systems. The overhead of lazy evaluation is only incurred when lazy evaluation is actually performed.

Our method is modelled by a transformation of term rewriting systems, which concisely expresses the intricate interaction between pattern matching and lazy evaluation. The method easily extends to term graph rewriting. We consider only left-linear, confluent term rewriting systems, but we do not require orthogonality.

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. Torben Amtoft. Minimal thunkification. In Third International Workshop on Static Analysis, Padova, Italy, volume 724 of Lecture Notes in Computer Science, pages 218–229. Springer-Verlag, 1993.

    Google Scholar 

  2. Henry G. Baker. Cons should not cons its arguments, part II: Cheney on the M.T.A. Draft Memorandum, January 1994.

    Google Scholar 

  3. P.N. Benton. Strictness properties of lazy algebraic datatypes. In Third International Workshop on Static Analysis, Padova, Italy, volume 724 of Lecture Notes in Computer Science, pages 206–217. Springer-Verlag, 1993.

    Google Scholar 

  4. Didier Bert, Rachid Echahed, and Bjarte M. Østvold. Abstract rewriting. In Third International Workshop on Static Analysis, Padova, Italy, volume 724 of Lecture Notes in Computer Science, pages 178–192. Springer-Verlag, 1993.

    Google Scholar 

  5. Geoffrey Burn and Daniel Le Métayer. Cps-translation and the correctness of optimising compilers. Technical Report DoC92/20, Imperial College, Department of Computing, 1992.

    Google Scholar 

  6. Geoffrey Burn. Lazy Functional Languages: Abstract Interpretation and Compilation. Pitman, 1991.

    Google Scholar 

  7. H.P. Barendregt, M.C.J.D. van Eekelen, J.R.W. Glauert, J.R. Kennaway, M.J. Plasmeijer, and M.R. Sleep. Term graph rewriting. In J.W. de Bakker, A.J. Nijman, and vol. II P.C. Treleaven, editors, Proceedings PARLE'87 Conference, volume 259 of Lecture Notes in Computer Science, pages 141–158. Springer Verlag, 1987.

    Google Scholar 

  8. Guy Cousineau and Gérard Huet. The CAML primer. Technical report, Inria, 1990. Version 2.6.1, available by ftp from ftp.inria.fr.

    Google Scholar 

  9. N. Dershowitz and J.-P Jouannaud. Rewrite systems. In J. van Leeuwen, editor, Handbook of Theoretical Computer Science, Vol B., pages 243–320. Elsevier Science Publishers, 1990.

    Google Scholar 

  10. J. Field. On Laziness and Optimality in Lambda Interpreters: Tools for Specification and Analysis. In Proc. ACM Conference on Principles of Programming Languages, San Francisco, 1990.

    Google Scholar 

  11. 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.

    Google Scholar 

  12. J.A. Goguen, T. Winkler, J. Meseguer, K. Futatsugi, and J.P. Jouannaud. Introducing OBJ. In J.A. Goguen, D. Coleman, and R. Gallimore, editors, Applications of Algebraic Specification Using OBJ. Cambridge University Press, 1992.

    Google Scholar 

  13. Thierry Heuillard. Compiling conditional rewriting systems. In S. Kaplan and J.P. Jouannaud, editors, Proceedins of the First International Workshop on Conditional Term Rewriting Systems, volume 308 of Lecture Notes in Computer Science, pages 111–128. Springer-Verlag, 1988.

    Google Scholar 

  14. G. Huet and J.-J. Lévy. Call-by-need computations in non-ambiguous linear term rewriting systems. Technical Report 359, INRIA, 1979. Also appeared as: Computations in Orthogonal Rewriting Systems part I and II, in: ‘Computational Logic; essays in honour of Alan Robinson’ (eds. J.-L. Lassez and G. Plotkin), MIT Press, Cambridge, MA, 1991, 395–443.

    Google Scholar 

  15. P.Z. Ingermann. Thunks — a way of compiling procedure statements with some comments on procedure declarations. Communications of the ACM, 4(1):55–58, 1961.

    Article  Google Scholar 

  16. Simon L Peyton Jones and David Lester. Implementing Functional Languages — A Tutorial. Prentice Hall, 1992.

    Google Scholar 

  17. Simon L Peyton Jones and Jon Salkild. The Spineless Tagless G-machine. In Functional Programming and Computer Architecture, pages 184–201. ACM, 1989.

    Google Scholar 

  18. J.R. Kennaway, J.W. Klop, M.R. Sleep, and F.J. de Vries. The adequacy of term graph rewriting for simulating term rewriting. In Ronan Sleep, Rinus Plasmeijer, and Marko van Eekelen, editors, Term Graph Rewriting: Theory and Practice. John Wiley & Sons Ltd, 1993.

    Google Scholar 

  19. 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.

    Google Scholar 

  20. 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.

    Google Scholar 

  21. Luc Maranget. La stratégie paresseuse. PhD thesis, L'Université Paris VII, July 1992.

    Google Scholar 

  22. A. Martelli, C. Moiso, and C.F. Rossi. An algorithm for unification in equational theories. In Proceedings of the Symposium on Logic Programming, pages 180–186. IEEE Computer Society, 1986.

    Google Scholar 

  23. Alan Mycroft. The theory and practice of transforming call-by-need into call-by-value. In B. Robinet, editor, International Symposium on Programming, volume 83 of Lecture Notes in Computer Science. Springer-Verlag, 1980.

    Google Scholar 

  24. M.J. O'Donnell. Computing in Systems Described by Equations, volume 58 of Lecture Notes in Computer Science. Springer-Verlag, 1977.

    Google Scholar 

  25. Chris Okasaki, Peter Lee, and David Tarditi. Call-by-need and continuation-passing style. Lisp and Symbolic Computation, 7:57–82, 1994.

    Article  Google Scholar 

  26. G. D. Plotkin. Call-by-name, call-by-value and the λ-calculus. Theoretical Computer Science, 1(1):125–159, 1975.

    Article  Google Scholar 

  27. M J. Plasmeijer and M C J D. van Eekelen. Functional Programming and Parallel Graph Rewriting. Addison Wesley, 1993.

    Google Scholar 

  28. Paul Steckler and Mitchell Wand. Selective thunkification. In First International Static Analysis Symposium, Namur, Belgium, 28–30 September 1994. also available by ftp as sas94.ps.Z from ftp.ccs.neu.edu:/pub/people/steck.

    Google Scholar 

  29. David Tarditi, Anurag Acharya, and Peter Lee. No assembly required: Compiling Standard ML to C. Technical Report CMU-CS-90-187, School of Computer Science, Carnegie Mellon University, november 1990.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jieh Hsiang

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kamperman, J.F.T., Walters, H.R. (1995). Lazy rewriting and eager machinery. In: Hsiang, J. (eds) Rewriting Techniques and Applications. RTA 1995. Lecture Notes in Computer Science, vol 914. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-59200-8_54

Download citation

  • DOI: https://doi.org/10.1007/3-540-59200-8_54

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

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

  • Online ISBN: 978-3-540-49223-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics