Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine
- 1 January 1992
- journal article
- research article
- Published by Cambridge University Press (CUP) in Journal of Functional Programming
- Vol. 2 (2) , 127-202
- https://doi.org/10.1017/s0956796800000319
Abstract
The Spineless Tagless G-machine is an abstract machine designed to support non-strict higher-order functional languages. This presentation of the machine falls into three parts. Firstly, we give a general discussion of the design issues involved in implementing non-strict functional languages. Next, we present the STG language, an austere but recognizably-functional language, which as well as a denotational meaning has a well-defined operational semantics. The STG language is the ‘abstract machine code’ for the Spineless Tagless G-machine. Lastly, we discuss the mapping of the STG language onto stock hardware. The success of an abstract machine model depends largely on how efficient this mapping can be made, though this topic is often relegated to a short section. Instead, we give a detailed discussion of the design issues and the choices we have made. Our principal target is the C language, treating the C compiler as a portable assembler.Keywords
This publication has 17 references indexed in Scilit:
- Report on the programming language HaskellACM SIGPLAN Notices, 1992
- Compilation of functional languages by program transformationACM Transactions on Programming Languages and Systems, 1991
- The HDG-machine: a highly distributed graph-reducer for a transputer networkThe Computer Journal, 1991
- Simple generational garbage collection and fast allocationSoftware: Practice and Experience, 1989
- Why Functional Programming MattersThe Computer Journal, 1989
- Code optimizations for lazy evaluationHigher-Order and Symbolic Computation, 1988
- Garbage collection can be faster than stack allocationInformation Processing Letters, 1987
- List processing in real time on a serial computerCommunications of the ACM, 1978
- A correspondence between ALGOL 60 and Church's Lambda-notationsCommunications of the ACM, 1965
- ThunksCommunications of the ACM, 1961