Skip to main content

GRIT: Guy’s RISC Implementation of the Three Instruction Machine

  • Conference paper
Functional Programming, Glasgow 1992

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

  • 89 Accesses

Abstract

Fairbaim and Wray’s Three Instruction Machine [1, 2] has been one of the most influential lazy abstract machine designs in recent years. However, despite its influence, some of the finer details of the implementation technique remain unclear. We hope this paper will help clarify these details. Taking Fairbaim and Wray’s Normal Order version of the TIM as a starting point the author has produced two improved TIMs: the G-TIM [3], a simple single stack version; and the A-TIM [4], a more ambitious two stack design. In order to simplify the comparison between the two new TIMs and the original, they are compiled down to µTIM, a RISC microcode for TIMs, which is ultimately translated to native code. The resulting implementation, called GRIT (Guy’s RISC Implementation of the Three Instruction Machine), incorporates several novel techniques which simplify the design of the compiler but still produce good quality code. In this paper we describe these techniques and demonstrate that, despite being simpler, they result in performance at least as good as that of the Chalmers’ implementation of the G-machine [5, 6, 7].

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.

References

  1. Fairbairn, J. and Wray, S.C. The TIM: a simple abstract machine to execute supercombinators. In: Proceedings of the 1987 Functional Programming and Computer Architecture conference, Portland, Oregon. 1987.

    Google Scholar 

  2. Wray, S. C. and Fairbairn, J. Non-strict languages - programming and implementation. Computer Journal. vol. 32 no. 2 April 1989.

    Google Scholar 

  3. Argo, G.M. Improving the Three Instruction Machine. In: Proceedings of the 1989 Functional Programming and Computer Architecture conference, London. 1989.

    Google Scholar 

  4. Argo, G.M. Efficient laziness. PhD thesis, Glasgow University. to appear 1993.

    Google Scholar 

  5. Augustsson, L. and Johnsson, T. The Chalmers Lazy-ML compiler. Computer Journal. vol. 32 no. 2 April 1989.

    Google Scholar 

  6. Peyton Jones, S. L. The implementation of functional programming languages. Prentice Hall.. 1987.

    MATH  Google Scholar 

  7. Peyton Jones, S. L. and Lester D. Implementing functional languages: a tutorial. Prentice Hall.

    Google Scholar 

  8. Partain, W. The nofib benchmark suite of Haskell programs. In: Functional Programming, Glasgow 1992, J. Launchbury and P.M. Sansom Eds., Springer-Verlag, Workshops in Computing Science, Ayr, Scotland, 1992.

    Google Scholar 

  9. Hall, C. Hammond, K. Partain, W. Peyton Jones, S.L. and Wadler, P. The Glasgow Haskell compiler: a retrospective. In: Functional Programming, Glasgow 1992, J. Launchbury and P.M. Sansom Eds., Springer-Verlag, Workshops in Computing Science, Ayr, Scotland, 1992.

    Google Scholar 

  10. Kehler Holst, C. Improving full laziness. In: Functional Programming, Glasgow 1992, S.L. Peyton Jones, G. Hutton and C. Kehler Holst Eds., Springer-Verlag, Workshops in Computing Science, Ullapool, Scotland, 1990.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1993 British Computer Society

About this paper

Cite this paper

Argo, G. (1993). GRIT: Guy’s RISC Implementation of the Three Instruction Machine. In: Launchbury, J., Sansom, P. (eds) Functional Programming, Glasgow 1992. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3215-8_2

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3215-8_2

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-19820-8

  • Online ISBN: 978-1-4471-3215-8

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics