Deforestation for Higher Order Functional Programs
(1996)

Tools

"... Many compilers do some of their work by means of correctness-preserving, and hopefully performance-improving, program transformations. The Glasgow Haskell Compiler (GHC) takes this idea of "compilation by transformation" as its war-cry, trying to express as much as possible of the compilat ..."

Many compilers do some of their work by means of correctness-preserving, and hopefully performance-improving, program transformations. The Glasgow Haskell Compiler (GHC) takes this idea of &quot;compilation by transformation&quot; as its war-cry, trying to express as much as possible of the compilation process in the form of program transformations. This paper reports on our practical experience of the transformational approach to compilation, in the context of a substantial compiler.

by
Simon L. Peyton Jones
- In Proc. European Symp. on Programming, 1996

"... Many compilers do some of their work by means of correctness-preserving, and hopefully performance-improving, program transformations. The Glasgow Haskell Compiler (GHC) takes this idea of "compilation by transformation" as its war-cry, trying to express as much as possible of the compilat ..."

Many compilers do some of their work by means of correctness-preserving, and hopefully performance-improving, program transformations. The Glasgow Haskell Compiler (GHC) takes this idea of &quot;compilation by transformation&quot; as its war-cry, trying to express as much as possible of the compilation process in the form of program transformations. This paper reports on our practical experience of the transformational approach to compilation, in the context of a substantial compiler. The paper appears in the Proceedings of the European Symposium on Programming, Linkoping, April 1996. 1 Introduction Using correctness-preserving transformations as a compiler optimisation is a well-established technique (Aho, Sethi &amp; Ullman [1986]; Bacon, Graham &amp; Sharp [1994]). In the functional programming area especially, the idea of compilation by transformation has received quite a bit of attention (Appel [1992]; Fradet &amp; Metayer [1991]; Kelsey [1989]; Kelsey &amp; Hudak [1989]; Kranz [1988]; Steele [1978]). A ...

...guages such as Haskell. A number of optimization techniques have been proposed, including tail-call optimization, CPS transformation, garbage collection, strictness analysis, deforestation, and so on =-=[6,1,29,30,28,21]-=-. Many of these techniques are now standard fare in modern day compilers such as the Glasgow Haskell Compiler (GHC). Not all optimization techniques are effective at all times, however, and in certain...