Advertisement

Compilation by Transformation in the Glasgow Haskell Compiler

  • Simon Peyton Jones
  • André Santos
Part of the Workshops in Computing book series (WORKSHOPS COMP.)

Abstract

In this paper we describe the full set of local program transformations implemented in the Glasgow Haskell Compiler. The transformations are presented as source to source transformations in a simple functional language. The idea is that by composing these simple and small high level transformations one can achieve most of the benefits of more complicated and specialised transformations, many of which are often implemented as code generation optimisations.

Keywords

Program Transformation Case Expression Call Site Dead Code Core Language 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    A. Appel. Compiling with Continuations. Cambridge University Press, 1992.Google Scholar
  2. [2]
    A. Appel and T. Jim. Continuation-passing, closure-passing style. In ACM Conference on Principles of Programming Languages, pages 293302, January 1989.Google Scholar
  3. [3]
    W. N. Chin. Automatic Methods for Program Transformation. PhD thesis, Imperial College, London, March 1990.Google Scholar
  4. [4]
    A. Gill, J. Launchbury, and S. Peyton Jones. A short cut to deforestation. In Functional Programming Languages and Computer Architecture,pages 223–232, Copenhagen, June 1993. ACM Press.Google Scholar
  5. [5]
    R. J. M. Hughes. The Design and Implementation of Programming Languages. PhD thesis, Programming Research Group, Oxford University, July 1983.Google Scholar
  6. [6]
    T. Johnsson. Lambda lifting: Transforming programs to recursive equations. In Functional Programming Languages and Computer Architecture,number 201 in LNCS, pages 190–203, Nancy, September 1985. Springer-Verlag.Google Scholar
  7. [7]
    R. Kelsey and P. Hudak. Realistic compilation by program transformation. In ACM Conference on Principles of Programming Languages, pages 281292, January 1989.Google Scholar
  8. [8]
    R. A. Kelsey. Compilation by Program Transformation. PhD thesis, Yale University, Department of Computer Science, May 1989. YALEU/DCS/RR-702.Google Scholar
  9. [9]
    D. A. Kranz. ORBIT - an optimising compiler for Scheme. PhD thesis, Yale University, Department of Computer Science, May 1988.Google Scholar
  10. [10]
    J. Launchbury and P. M. Sansom, editors. Functional Programming, Glasgow 1992, Ayr, Scotland, 1992. Springer Verlag, Workshops in Computing.Google Scholar
  11. [11]
    S. Marlow and P. Wadler. Deforestation for higher-order functions. In Launchbury and Sansom [10], pages 154–165.Google Scholar
  12. [12]
    B. Matthews. MERILL: An equational reasoning system in Standard ML. In 5th International Conference on Rewriting Techniques and Applications, number 690 in LNCS, pages 414–445. Springer-Verlag, 1993.Google Scholar
  13. [13]
    B. Matthews. Analysing a set of transformation rules using completion. 1994.Google Scholar
  14. [14]
    W. Partain. The nofib benchmarking suite. In Launchbury and Sansom [10].Google Scholar
  15. [15]
    S. Peyton Jones, C. Hall, K. Hammond, W. Partain, and P. Wadler. The Glasgow Haskell compiler: a technical overview. In UK Joint Framework for Information Technology (JFIT) Technical Conference, Keele, March 1993.Google Scholar
  16. [16]
    S. Peyton Jones and J. Launchbury. Unboxed values as first class citizens. In Functional Programming Languages and Computer Architecture, pages 636–666, September 1991.Google Scholar
  17. [17]
    S. Peyton Jones and D. Lester. A modular fully-lazy lambda lifter in Haskell. Software–Practice and Experience, 21 (5): 479–506, May 1991.CrossRefGoogle Scholar
  18. [18]
    S. Peyton Jones and W. Partain. On the effectiveness of a simple strictness analyser. In Functional Programming, Glasgow 1993,Ayr, Scotland, 1993. Springer Verlag, Workshops in Computing.Google Scholar
  19. [19]
    P. Wadler. Deforestation: Transforming programs to eliminate trees. Theoretical Computer Science, 73: 231–248, 1990.MathSciNetMATHCrossRefGoogle Scholar

Copyright information

© Springer-Verlag London 1995

Authors and Affiliations

  • Simon Peyton Jones
    • 1
  • André Santos
    • 1
  1. 1.Department of Computing ScienceUniversity of GlasgowGlasgowScotland

Personalised recommendations