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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
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.
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.
T. Johnsson. Efficient Compilation of Lazy Evaluation. ACM SIGPLAN Notices, 19(6):58–69, June 1984.
J. Launchbury. A Natural Semantics for Lazy Evaluation. In Proc. Conference on Principles of Programming Languages, POPL’93. ACM, 1993.
J. Mountjoy. The Spineless Tagless G-machine, Naturally. In Third International Conference on Functional Programming, ICFP’98, Baltimore. ACM Press, 1998.
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.
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.
S. L. Peyton Jones and J. Hughes, editors. Report on the Programming Language Haskell 98. URL http://www.haskell.org, February 1999.
S. L. Peyton Jones, S. Marlow, and A. Reid. The STG Runtime System (revised). http://www.haskell.org/ghc/docs, 1999.
P. Sestoft. Deriving a Lazy Abstract Machine. Journal of Functional Programming, 7(3):231–264, May 1997.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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