Tim: A simple, lazy abstract machine to execute supercombinators

  • Jon Fairbairn
  • Stuart Wray
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 274)


This paper is a description of the three instruction machine Tim, an abstract machine for the execution of supercombinators. Tim usually executes programmes faster than the G-machine style of abstract machine while being at least as easy to implement as an S-K combinator reducer. It has a lower overhead for passing unevaluated arguments than the G-machine, resulting in good performance even without strictness analysis, and is probably easier to implement in hardware.

The description begins with a presentation of the instruction set of the machine, followed by the operational semantics of the normal order version and the algorithm to convert combinators to instructions. It then develops the machine to allow lazy evaluation and the use of sharing and strictness analysis. The final sections of the paper give some performance figures and comment upon the suitability of the machine for hardware implementation.


Abstract Machine Perfect Code Garbage Collector Shared Application Lazy Evaluation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. [Cardelli 84]
    Luca Cardelli, The Functional Abstract Machine, Bell Laboratories Computing Science Technical Report No. 107.Google Scholar
  2. [Cousineau 87]
    G. Cousineau, P-L. Curien, M. Mauny, The Categorical Abstract Machine, Science of Computer Programming Vol 8, pp 173–202, 1987.Google Scholar
  3. [Fairbairn 83]
    Jon Fairbairn, Ponder and its Type System, University of Cambridge Computer Laboratory Technical Report No. 31, 1983.Google Scholar
  4. [Fairbairn 85]
    Jon Fairbairn, Design and Implementation of a Simple Typed Language Based on the Lambda-Calculus, University of Cambridge Computer Laboratory Technical Report No. 75, May 1985.Google Scholar
  5. [Fairbairn & Wray 86]
    Jon Fairbairn & Stuart Wray, Code generation techniques for functional languages, 1986 ACM Conference on Lisp and Functional Programming (proceedings) pp 95–104Google Scholar
  6. [Hughes 85b]
    John Hughes, Strictness Detection in Non-Flat Domains, in Proceedings of the Workshop on Programs as data objects, Copenhagen, eds H. Ganzinger and N. Jones, Springer Verlag Lecture Notes in Computer Science Vol 217, 1985Google Scholar
  7. [Hudak & Goldberg 85]
    Paul Hudak & Benjamin Goldberg, Serial Combinators: “Optimal” Grains of Parallelism, Yale University Department of Computer Science 1985Google Scholar
  8. [Hudak & Kranz 84]
    Paul Hudak & David Kranz, A combinator based compiler for a functional language, 11th ACM Symposium on Principles of Programming Languages ACM Jan 1984, pp 121–132Google Scholar
  9. [Johnsson 83]
    Thomas Johnsson, The G-Machine: An Abstract Machine for Graph Reduction, Proceedings of SERC Declarative Programming Workshop at UCL, April 1983Google Scholar
  10. [Kieburtz & Napierala 85]
    Richard B. Kieburtz & Maria Napierala, A studied laziness — strictness analysis with stuctured data types, Oregon Graduate Centre, Extended Abstract, July 1985.Google Scholar
  11. [Kieburtz 86]
    Richard B. Kieburtz, When chasing your tail saves time, Information Processing Letters, December 1986.Google Scholar
  12. [Landin 64]
    P. J. Landin, The Mechanical Evaluation of Expressions, Computer Journal Volume 6 Number 4 pp 308–320, 1964.Google Scholar
  13. [Tillotson 85]
    Mark Tillotson, Introduction to the Functional Programming Language “Ponder”, University of Cambridge Computer Laboratory Technical Report No. 65, May 1985.Google Scholar
  14. [Wadler 85]
    Phil Wadler, Strictness Analysis on Non-Flat Domains, Programming Research Group, Oxford University, November 1985.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1987

Authors and Affiliations

  • Jon Fairbairn
    • 1
  • Stuart Wray
    • 2
  1. 1.University of Cambridge Computer LaboratoryCambridgeUnited Kingdom
  2. 2.Olivetti ResearchCambridgeUnited Kingdom

Personalised recommendations