skip to main content
10.1145/62678.62717acmconferencesArticle/Chapter ViewAbstractPublication PageslfpConference Proceedingsconference-collections
Article
Free Access

The spineless G-machine

Authors Info & Claims
Published:01 January 1988Publication History

ABSTRACT

Recent developments in functional language implementations have resulted in the G-machine, a programmed graph-reduction machine. Taking this as a basis, we introduce an optimised method of performing graph reduction, which does not need to build the spine of the expression being reduced. This Spineless G-machine only updates shared expressions, and then only when they have been reduced to weak head normal form. It is thus more efficient than the standard method of performing graph reduction.

We begin by outlining the philosophy and key features of the Spineless G-machine, and comparing it with the standard G-machine. Simulation results for the two machines are then presented and discussed. The Spineless G-machine is also compared with Tim, giving a series of transformations by which they can be interconverted. These open up a wide design space for abstract graph reduction machines, which was previously unknown. A full specification of the spineless machine is given in the appendix, together with compilation rules for a simple functional language.

References

  1. 1.Augustsson, L., Compiling Lazy Functional Languages, Part II PhD Thesis, Department of Computer Sciences, Chalmers University of Technology, 1!}87.Google ScholarGoogle Scholar
  2. 2.Bum, G.L., Hankin, C.L., and Abramsky, S., Strictness Analysis for Higher-Order Functions, Science of Computer Programming, 7, November 1986, pp.249-278.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.Fairbaim, J., and Wray, S.C., Code Generation Techniques for Functional Languages, Proceedings 1986 ACM Conference on Lisp and Functional Programming, 4-6 August, 1987, Cambridge, Massachusetts, USA, pp. 94-104. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.Fairbaim, J., and Wray, S., TIM: A Simple, Lazy Abstract Machine To Execute Supercombinators, in: Kahn, G., (ed.), Proceedings of the Third International Conference on Functional Languages and Computer Architecture, Portland, Oregon, USA, 14-16 September, 1987, Springer-Verlag LNCS 274, pp. 34-45. Google ScholarGoogle Scholar
  5. 5.Goldberg, B., Detecting Sharing of Partial Applications in Functional Languages, in Kahn, G., (ed.) Proceedings of the Third International Conference on Functional Programming Languages and Computer Architecture, Portland, Oregon, USA, 14-16 Sept., 1987, Springer Verlag LNCS vol. 274, pp. 408-425. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.Hankin, C.L., Bum, G.L., and Peyton Jones, S.L., A Safe Approach to Parallel Combinator Reduction (Extended Abstract), Proceedings ESOP 86 (European Symposium on Programming), Saarbmcken, Federal Republic of Germany, March 1986, Robinet, B., and Wilhelm, R. (eds.), Springer-Verlag LNCS 213, pp. 99-110. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.Hudak, P., and Young, J., A Set-Theoretic Characterisation of Function Strictness in the Lambda Calculus, Research Report YALEU/DCS/RR-391, Department of Computer Science, Yale University, 1985, Also presented at the Workshop on Abstract Interpretation, University of Kent at Canterbury, August, 1985.Google ScholarGoogle Scholar
  8. 8.Hughes, J., The Design and Implementation of Programming Languages, PhD Thesis, Oxford University, 1983. (Published as Oxford University Computing Laboratory, Progranuning Research Group, Technical Monograph PRG-40, September, 1984.)Google ScholarGoogle Scholar
  9. 9.Johnsson, T., Lambda Lifting: Transforming Programs to Reeursive Equations, in :Proceedings of IFIP International Conference on Ft~nctional Prograrruning Languages and Computer Architect~e, Nancy, France, 16-19 September, 1985, Jouannaud, J.-P. (ed.), Springer-Verlag LNCS 201, pp. 190-203. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.lohnsson, T., Compiling Lazy Functional Languages, PhD Thesis, Department of Computer Sciences, Chalmers University of Technology, 1987.Google ScholarGoogle Scholar
  11. 11.Mycroft, A., Abstract Interpretation and Optimising Transformations for Applicative Programs, PhD. Thesis, University of Edinburgh, 1981.Google ScholarGoogle Scholar
  12. 12.Peyton Jones, S.L., The Implementation of Functional Programming Languages, Prentiee-HaU International Series in Computer Science, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.Peyton Jones, S.L., The tag is dead - long live the packet, Distributed on the fp mailboard, 22nd October, 1987.Google ScholarGoogle Scholar
  14. 14.Turner, D.A., A New Implementation Technique for Applicative Languages, Software Practice and Experience 9, 1979, pp. 31-49.Google ScholarGoogle ScholarCross RefCross Ref
  15. 15.Wadler, P., Strictness Analysis on Non-Flat Domains (by Abstract Interpretation over Finite Domains), in Abramsky, S., and Ha.nkirh C., (eds), Abstract .Interpretation of Declarative Languages, Ellis Horwood, 1987. (Originally distributed on the FP mailboard November, 1985.)Google ScholarGoogle Scholar

Index Terms

  1. The spineless G-machine

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        LFP '88: Proceedings of the 1988 ACM conference on LISP and functional programming
        January 1988
        351 pages
        ISBN:089791273X
        DOI:10.1145/62678

        Copyright © 1988 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 1 January 1988

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        Overall Acceptance Rate30of109submissions,28%

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader