Advertisement

Deforestation for Higher-Order Functions

  • Simon Marlow
  • Philip Wadler
Part of the Workshops in Computing book series (WORKSHOPS COMP.)

Abstract

Deforestation is an automatic transformation scheme for functional programs which attempts to remove unnecessary intermediate data structures. The algorithm presented here is a variant of the original, adapted for a higher order language. A detailed description of how this may be implemented in an optimising compiler is also given.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. [1]
    L.Augustsson, Compiling pattern matching, Proc. Conf on Functional Programming languages and Computer Architecture, Nancy, France, Lecture Notes in Computer Science 201 ( Springer, Berlin, 1985 )Google Scholar
  2. [2]
    R.M.Burstall and J.Darlington, A Transformation System for Developing Recusrive Programs, Journal of the ACM 24 (1) (1977) 44–67CrossRefMathSciNetzbMATHGoogle Scholar
  3. [3]
    W.N.Chin, Automatic Methods for Program Transformation, PhD Thesis, University of London, March 1990.Google Scholar
  4. [4]
    L.Damas and R.Milner, Principle type schemes for functional programs, Proceedings of the ACM Symposium on Principles of Programming Languages 1982.Google Scholar
  5. [5]
    N.G.DeBruijn, Lambda Calculus Notation with Nameless Dummies, Inagationes Mathematicae, vol. 34, pp 381–392.Google Scholar
  6. [6]
    A.B.Ferguson and P.L.Wadler, When will deforestation stop? Procedings of the Glasgow Workshop on Functional Programming, Rothesay, Isle of Bute, August 1988, Research Report 89/R4, Department of Computing Science, University of Glasgow, 1989.Google Scholar
  7. [7]
    J.-Y Girard, Linear Logic, Theoretical Computer Science 50 (1), 1–102, 1987.CrossRefMathSciNetzbMATHGoogle Scholar
  8. [8]
    G.W.Hamilton and S.B.Jones, Extending deforestation for First Order Functional Programs, Functional Programming, Glasgow 1991 R.Heldal, C.Kehler Holst, P.Wadler (Eds), Springer-Verlag, Workshops in Computing Science, 1991.Google Scholar
  9. [9]
    R.Hindley, The principal type scheme of an object in combinatory logic, Transactions of the American Mathematics Society 146 29–60.Google Scholar
  10. [10]
    P.Hudak, S.L.Peyton Jones, P.Wadler (Eds) Report on the Programming Language Haskell, Version 1.2, ACM SIGPLAN Notices, 27(5), May 1992.Google Scholar
  11. [11]
    R.Milner, A theory of type polymorphism in programming, in Journal of Computing System Science 17 1978 348–375.CrossRefMathSciNetzbMATHGoogle Scholar
  12. [12]
    Simon L Peyton Jones The Implementation of Funtional Programming Languages Prentice Hall, Englewood Cliffs, NJ, 1987.Google Scholar
  13. [13]
    Philip Wadler, Deforestation: Transforming Programs To Eliminate Trees, European Symposium on Programming, Nancy, France, Lecture Notes in Computer Science 300 Springer, Berlin, 1988.Google Scholar
  14. [14]
    Philip Wadler, Deforestation: Transforming Programs To Eliminate Trees Theoretical Computer Science 73 1990 231–248.CrossRefMathSciNetzbMATHGoogle Scholar

Copyright information

© British Computer Society 1993

Authors and Affiliations

  • Simon Marlow
    • 1
  • Philip Wadler
    • 1
  1. 1.Department of Computer ScienceUniversity of GlasgowGlasgowUK

Personalised recommendations