The G-machine: A fast, graph-reduction evaluator
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.
KeywordsMemory Manager Application Graph Graph Reduction Host Processor Control Memory
Unable to display preview. Download preview PDF.
- [Aug84]Augustsson, L., A compiler for Lazy ML, Proc. of 1984 ACM Conf. on Lisp and Funct. Prog., August, 1984, pp. 218–227.Google Scholar
- [Ber75]Berkling, K., Reduction languages for reduction machines, Proc. IEEE Int. Sympos. on Computer Arch., pp. 133–140, Jan. 1975.Google Scholar
- [Cla80]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
- [Deb84]Deb, A., An efficient garbage collector for graph machines, Oregon Graduate Center, Tech. Rept. No. CS/E-84-003, August, 1984.Google Scholar
- [Hug82]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
- [Joh84]Johnsson, T., Efficient compilation of lazy evaluation, Proc. of 1984 ACM SIGPLAN Conf. on Compiler Constr., June, 1984Google Scholar
- [LMO84]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
- [Lan63]Landin, P.J., The mechanical evaluation of expressions, Comp. J. 6, (1963–4) p. 308.Google Scholar
- [Mag79]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
- [PaS82]Patterson, D.A. and Sequin, C., A VLSI RISC, Computer 15, No. 9 (Sept. 1982), pp. 8–21.Google Scholar
- [Sar84]Sarangi, A.G., Simulation and performance evaluation of a graph reduction machine architecture, M.S. thesis, Oregon Graduate Center, July, 1984.Google Scholar
- [Sch85]Scheevel, M., NORMA, a normal-order combinator reduction machine, colloquium presented at Oregon Graduate Center, January, 1985.Google Scholar
- [SCN84]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
- [Tur79]Turner, D.A., New implementation techniques for applicative languages, Software — Prac. & Exper. 9, No. 1 (Jan. 1979), pp. 31–49.Google Scholar
- [Wil83]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