Skip to main content

The G-machine: A fast, graph-reduction evaluator

  • Conference paper
  • First Online:
Functional Programming Languages and Computer Architecture (FPCA 1985)

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

Abstract

The G-machine is an abstract architecture for evaluating functional-language programs by programmed graph reduction. Unlike combinator reduction, in which control is derived dynamically from the expression graph itself, control in programmed graph reduction is specified by a sequence of instructions derived by compiling an applicative expression.

The G-machine architecture was defined by Thomas Johnsson and Lennart Augustsson (Gothenburg) as the evaluation model for a compiler for a dialect of ML with lazy evaluation rules. This paper describes a sequential evaluator based upon that abstract architecture. It discusses performance issues affecting reduction architectures, then describes the organization of a hardware design to address these issues. The interplay between compilation strategies and the computational engine is exploited in this design.

Principal features of the design are (i) hardware support for graph traversal, (ii) a vertically microcoded, pipelined internal architecture, (iii) an instruction fetch and translation unit with very low latency, and (iv) a new memory architecture, one specifically suited to graph reduction and which can be extended to very large memories.

The research reported in this paper has been partially supported by the National Science Foundation under grant No. DCR-8405247.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Augustsson, L., A compiler for Lazy ML, Proc. of 1984 ACM Conf. on Lisp and Funct. Prog., August, 1984, pp. 218–227.

    Google Scholar 

  2. Berkling, K., Reduction languages for reduction machines, Proc. IEEE Int. Sympos. on Computer Arch., pp. 133–140, Jan. 1975.

    Google Scholar 

  3. Clarke, T.J.W., Gladstone, P.J.S., MacLean, C.D. and Norman, A.C., SKIM — the S, K, I reduction machine, Proc. of 1980 ACM Lisp Conf., pp. 128–135, August, 1980.

    Google Scholar 

  4. Deb, A., An efficient garbage collector for graph machines, Oregon Graduate Center, Tech. Rept. No. CS/E-84-003, August, 1984.

    Google Scholar 

  5. Hughes, J., Supercombinators: a new implementation method for applicative languages, Proc. of 1982 ACM Conf. on Lisp and Funct. Prog., August, 1982, pp. 1–10.

    Google Scholar 

  6. Johnsson, T., Efficient compilation of lazy evaluation, Proc. of 1984 ACM SIGPLAN Conf. on Compiler Constr., June, 1984

    Google Scholar 

  7. Lampson, B.W., McDaniel, G. and Ornstein, S.M., An instruction fetch unit for a high-performance personal computer, IEEE Trans. on Computers C-33, No. 8 (Aug. 1984), pp. 712–730.

    Google Scholar 

  8. Landin, P.J., The mechanical evaluation of expressions, Comp. J. 6, (1963–4) p. 308.

    Google Scholar 

  9. Mago, G.A., A network of microprocessors to execute reduction languages — Parts I and II, Int. J. of Comp. & Inf. Sci. 8, No. 5 (Oct. 1979), pp. 349–385, No. 6 (Dec. 1979), pp. 435–471.

    Google Scholar 

  10. Patterson, D.A. and Sequin, C., A VLSI RISC, Computer 15, No. 9 (Sept. 1982), pp. 8–21.

    Google Scholar 

  11. Sarangi, A.G., Simulation and performance evaluation of a graph reduction machine architecture, M.S. thesis, Oregon Graduate Center, July, 1984.

    Google Scholar 

  12. Scheevel, M., NORMA, a normal-order combinator reduction machine, colloquium presented at Oregon Graduate Center, January, 1985.

    Google Scholar 

  13. Stoye, W.R., Clarke, T.J.W. and Norman, A.C., Some practical methods for rapid combinator reduction, Proc. of 1984 ACM Conf. on Lisp and Functional Prog., pp. 159–166, August, 1984.

    Google Scholar 

  14. Turner, D.A., New implementation techniques for applicative languages, Software — Prac. & Exper. 9, No. 1 (Jan. 1979), pp. 31–49.

    Google Scholar 

  15. Wilkes, M.V., Keeping jump instructions out of the pipeline of a RISC-like computer, Computer Arch. News 11, No. 5 (Dec. 1983), pp. 5–7.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jean-Pierre Jouannaud

Rights and permissions

Reprints and permissions

Copyright information

© 1985 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kieburtz, R.B. (1985). The G-machine: A fast, graph-reduction evaluator. In: Jouannaud, JP. (eds) Functional Programming Languages and Computer Architecture. FPCA 1985. Lecture Notes in Computer Science, vol 201. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-15975-4_50

Download citation

  • DOI: https://doi.org/10.1007/3-540-15975-4_50

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-15975-9

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

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics