Skip to main content

A New Sharing Mechanism for the TIM

  • Conference paper
Functional Programming, Glasgow 1991

Part of the book series: Workshops in Computing ((WORKSHOPS COMP.))

  • 65 Accesses

Abstract

In this paper we introduce a new method of implementing lazy evaluation efficiently in the TIM. A major advantage of the TIM [4] over other abstract machines is that it can take advantage of the results of sharing analysis. In this paper, we demonstrate that despite this advantage the sharing mechanism of the original TIM suffers from two serious flaws: expensive shared partial applications (in both space and time); and redundant updates. We devise a more general notation for expressing sharing than that introduced in [4]. This allows us to demonstrate that the sole reason for the defects in the TIM sharing mechanism is its treatment of sharing as a local property of arguments. Consequently we propose a new scheme where sharing is treated as a global property of expressions. This eliminates the problem of redundant updates and opens the way for several improvements including: cheap shared partial applications (in both space and time); and better synergy between the caller and the callee.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Bibliography

  1. Augustsson, L. 1987. Compiling Lazy Functional Languages, Part II. PhD thesis, Chalmers University of Technology.

    Google Scholar 

  2. Burn, G., Peyton Jones, S.L. and Robson, J.D. 1988. The Spineless G-machine. ACM Symposium on Lisp and Functional Programming.Salt Lake City.

    Google Scholar 

  3. Fairbairn, J. and Wray, S.C. 1986. Code generation techniques for functional languages. Proceedings of the ACM Symposium on Lisp and Functional Programming. Cambridge.

    Google Scholar 

  4. Fairbairn, J. and Wray, S.C. 1987. TIM: a simple abstract machine for executing super-combinators. Proceedings of the Conference on Functional Languages and Computer Architecture. Portland.

    Google Scholar 

  5. Johnsson, T. 1987. Compiling Lazy Functional Languages. PhD thesis. Chalmers University of Technology.

    Google Scholar 

  6. Kieburtz, R.B. and Agapiev, B. 1989. Optimizing the evaluation of suspensions. Unpublished draft.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1992 British Computer Society

About this paper

Cite this paper

Argo, G. (1992). A New Sharing Mechanism for the TIM. In: Heldal, R., Holst, C.K., Wadler, P. (eds) Functional Programming, Glasgow 1991. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3196-0_2

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3196-0_2

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-19760-7

  • Online ISBN: 978-1-4471-3196-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics