Skip to main content

Proving the Correctness of the STG Machine

  • Conference paper
  • First Online:
Implementation of Functional Languages (IFL 2001)

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

Included in the following conference series:

Abstract

J. Launchbury gave an operational semantics for lazy evaluation and showed that it is sound and complete w.r.t. a denotational semantics of the language. P. Sestoft then introduced several abstract machines for lazy evaluation and showed that they were sound and complete w.r.t. Launchbury’s operational semantics. We go a step forward and show that the Spineless Tagless G-machine is complete and (almost) sound w.r.t. one of Sestoft’s machines. In the way to this goal we also prove some interesting properties about the operational semantics and about Sestoft’s machines which clarify some minor points on garbage collection and on closures’ local environments. Unboxed values and primitive operators are excluded from the study.

Work partially supported by the Spanish-British Acción Integrada HB 1999-0102 and Spanish project TIC 2000-0738.

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. A. de la Encina and R. Pena. A Proof of Correctness for the STG Machine. Technical Report 120-01, Dept. SIP, Universidad Complutense de Madrid, Spain, http://dalila.sip.ucm.es/~albertoe/publications.html, 2001.

    Google Scholar 

  2. J. Fairbairn and S. C. Wray. TIM: A Simple, Lazy Abstract Machine to Execute Supercombinators. In Proc. of the 1987 Conference on Functional Programming Languages and Computer Architecture, Portland, Oregon, September 1987.

    Google Scholar 

  3. T. Johnsson. Efficient Compilation of Lazy Evaluation. ACM SIGPLAN Notices, 19(6):58–69, June 1984.

    Article  Google Scholar 

  4. J. Launchbury. A Natural Semantics for Lazy Evaluation. In Proc. Conference on Principles of Programming Languages, POPL’93. ACM, 1993.

    Google Scholar 

  5. J. Mountjoy. The Spineless Tagless G-machine, Naturally. In Third International Conference on Functional Programming, ICFP’98, Baltimore. ACM Press, 1998.

    Google Scholar 

  6. S. L. Peyton Jones. Implementing Lazy Functional Languages on Stock Hardware: the Spineless Tagless G-machine, Version 2.5. Journal of Functional Programming, 2(2):127–202, April 1992.

    Article  MATH  Google Scholar 

  7. S. L. Peyton Jones, C. V. Hall, K. Hammond, W. D. Partain, and P. L. Wadler. The Glasgow Haskell Compiler: A Technical Overview. In Joint Framework for Inf. Technology, Keele, pages 249–257, 1993.

    Google Scholar 

  8. S. L. Peyton Jones and J. Hughes, editors. Report on the Programming Language Haskell 98. URL http://www.haskell.org, February 1999.

  9. S. L. Peyton Jones, S. Marlow, and A. Reid. The STG Runtime System (revised). http://www.haskell.org/ghc/docs, 1999.

  10. P. Sestoft. Deriving a Lazy Abstract Machine. Journal of Functional Programming, 7(3):231–264, May 1997.

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2002 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

de la Encina, A., Pena, R. (2002). Proving the Correctness of the STG Machine. In: Arts, T., Mohnen, M. (eds) Implementation of Functional Languages. IFL 2001. Lecture Notes in Computer Science, vol 2312. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-46028-4_6

Download citation

  • DOI: https://doi.org/10.1007/3-540-46028-4_6

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-43537-2

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

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics