| S. P. Jones and A. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming 32(13) , pp3-47, September 1998. |
....analysis [Gil96] In this paper we will explicitly write out in each step what other transformations are used to enable fusion in order to show that there is no magic going on. Most of the transformations that we will use are completely standard and are implemented in the Glasgow Haskell Compiler [PJS98]. If this is not the case we will briefly explain them. 2.1 Good producers and consumers When talking about short cut fusion it is often handy to classify functions as good producers and or good consumers. This terminology was introduced in [Gil96] We will here define what they mean and get ....
S. Peyton Jones and A. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1--3):3--47, 1998.
....its distribution contains an interpreter, GHC is a true compiler designed primarily for creating standalone programs. The optimisations it performs include full laziness, deforestation, let oating, beta reduction, lambda lifting and strictness optimisations; it also supports unboxed values [17]. It is widely considered to be the fastest implementation of a lazy functional language [9] Because it is highly optimising, it is not a soft target. This is important, since optimising non optimised systems is always less of a challenge than optimising optimised systems. 2.2 The STG Machine ....
S. L. Peyton Jones and A. L. M. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1-3):3-47, Sept. 1998.
....In conventional program optimization, transformations are applied throughout a program. In optimizing imperative programs, complex transformations are applied to entire programs [12] In the style of compilation by transformation [3] as applied, for example, in the Glasgow Haskell Compiler [14] a large number of small, almost trivial program transformations are applied throughout a program to achieve large scale optimization by accumulating small program changes. The style of optimization that we develop in this paper is a combination of these ideas: Combine a number of small ....
....used to build optimizers for an intermediate format for ML like programs. In both cases, strategies are used as they are here in conjunction with small local transformations to achieve large scale optimization e ects. Small local transformations have been dubbed humble transformations in [14]. Such transformations are used extensively in optimizing compilers based on the compilation by transformation idiom [8,9,1,13] They are also used to some degree in most compilers, although not necessarily recognizable as rewrite rules in the implementation. The optimization of innermost ....
S. L. Peyton Jones and A. L. M. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1-3):3-47, September 1998.
....mul(r 0 , x 0 ) x 1 = sub(x 0 , 1) x 1 , r 1 ) r 0 (x, 1) in fac(10) Fig. 2. SSA and ANF representations of the factorial function unabridged version of this paper [5] Variants of ANF are used as the intermediate representation in many compilers for functional languages, including GHC [11,21] for Haskell and TIL [20] for ML. 2.3 From SSA to ANF The similarities between the SSA and ANF forms of the factorial function in Figure 2 are immediately obvious: SSA blocks are translated into ANF functions, with the list of arguments derived from the list of expressions in the block. In ....
Jones, S. P. and A. L. M. Santos, A transformation-based optimiser for Haskell, Science of Computer Programming 32 (1998), pp. 3-47.
....but may simply indicate that few of the benchmarks try to express scoping relationships more tightly, perhaps even because of a fear that the resulting code would not be as e#cient. We believe it is an important optimization, nevertheless, as one of many bullets in [the compiler s] gun [5] that are not generally applicable but are very useful in certain circumstances. Compile time increases are modest for our algorithm, with or without valid checks and assimilation. In many cases, the compile times are less, even though more e#ort is clearly expended in the new passes than is ....
Peyton Jones, S. L., and Santos, A. A transformation-based optimiser for Haskell. Science of Computer Programming 32, 1--3 (1998), 3--47.
....rules that are usually considered, such as a distributive rule for case statements, where function application distributes over the branches of a caseexpression. Naturally this general rule is not valid in a lazy language, but there we do still have a rule for distributing nested case expressions [10]. For simplicity of the type checking algorithm, we omit any further conversion rules in our algorithm for now. The lack of a 7 checkExp : Environment; Environment) Expr Value Bool eqVal : Value Value Bool whnf : Value Value Figure 3: Main functions of the algorithm ....
Simon L. Peyton Jones and Andr L. M. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(13):347, 1998.
.... ( and from ( the function hanoi can also be written as: hanoi t = ln c a in f t L R M) Using law (18) from Theorem 1, this is equivalent to: Int t = vanish in f t L R M) The standard compiler built in simplifying techniques inlining and beta reduction [21] are enough to automatically obtain the variant t = let f 1 p q r = lys (p,q) ys f (s 1) p q r = lys f s p r q ( p,q) f s r q p ys) in f t L R M) that closely corresponds by let floating [20] to the result of applying Wadler s introduction of accumulating ....
S. Peyton Jones and A. Santos. A transformation-based optimiser for Haskell. Sci. of Comput. Prog., 32:3--47, 1998.
....In conventional program optimization, transformations are applied throughout a program. In optimizing imperative programs, complex transformations are applied to entire programs [12] In the style of compilation by transformation [3] as applied, for example, in the Glasgow Haskell Compiler [14] a large number of small, almost trivial program transformations are applied throughout a program to achieve large scale optimization by accumulating small program changes. The style of optimization that we develop in this paper is a combination of these ideas: Combine a number of small ....
....to build optimizers for an intermediate format for ML like programs. In both cases, strategies are used as they are here in conjunction with small local transformations to achieve large scale optimization e#ects. Small local transformations have been dubbed humble transformations in [14]. Such transformations are used extensively in optimizing compilers based on the compilation by transformation idiom [8,9,1,13] They are also used to some degree in most compilers, although not necessarily recognizable as rewrite rules in the implementation. The optimization of innermost ....
S. L. Peyton Jones and A. L. M. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1--3):3--47, September 1998.
....some extensions) into well typed Core, which is then repeatedly rewritten by the GHC optimizer. Ultimately, GHC translates Core into STG machine code and then into C or native code. The rationale for the design of Core and its use are discussed in existing papers [Peyton Jones and Marlow, 1999, Peyton Jones and Santos, 1998] although the (two different) idealized versions of Core described therein di er in signi cant ways from the actual Core language in current GHC. Researchers interested in writing just part of a Haskell compiler, such as a new back end or a new optimizer pass, might like to make use of GHC to ....
Peyton Jones, S. and Santos, A. (1998). A transformationbased optimiser for Haskell. Science of Computer Programming, 32(1-3):3-47. 34
....implementation of the ISA. 5 Discussion 5. 1 Related work Hawk is built on top of the pure functional language Haskell, where algebraic techniques for transforming functional programs are routinely used for equivalence checking and veri cation [2, 3, 13] and for compilation and optimization [5, 12]. Much of our work can be seen as an extension of these ideas. Hawk itself is very similar in avor to Lustre [6] except that in Lustre signals are accompanied by additional clock information. The Hawk speci cation style follows from the work of Johnson[9] O Donnell[18] and Sheeran[25] We have ....
Jones, S. L. P., and Santos, A. L. M. A transformation-based optimiser for Haskell. Science of Computer Programming 32, 1-3 (Sept. 1998), 3-47.
....or termination of sets of rewrite rules; in particular, commutativity and associativity have received special study [3] However, for us matters are seriously complicated by the other automatic rewrites that the compiler performs (beta reduction, inlining, case switching, let floating, etc. [32]) so we are not able to take direct advantage of this work. For an optimising compiler, confluence seems too strong, since that would implausibly suggest a canonical optimised form for a program. Termination is certainly important, but has not proved to be a problem in practice. 2.2 ....
....The implementation of the rule rewriting mechanism within GHC is largely straightforward. The front end has been extended to handle rule parsing, type checking, and translation into the Core intermediate language. The GHC optimiser is structured as a number of separate passes over Core expressions [32,31]. The most fundamental pass iterated many times is the simplifier, which performs inlining, case simplification, and eta expansion in the course of a single top to bottom traversal of the program. To support rewriting, we just modified the simplifier to check each function application it ....
Peyton Jones, S. and A. Santos, A transformation-based optimiser for Haskell, Science of Computer Programming 32 (1998), pp. 3--47.
....[ a] a] which fairly interleaves a set of input lists, to produce a single non deterministic list. The presence of non determinism creates some problems in Eden: It affects the referential transparency [HO90,SS90,SS92] of programs and invalidates some optimizations done in the GHC [San95] PS98] Such problems were precisely described in [PS01,PPRS00] In [PS01] a solution was proposed to solve this problem: To develop a static analysis to determine when an Eden expression is sure to be deterministic and when it may be non deterministic. Two different abstract interpretation based ....
S. L. Peyton Jones and A. L. M. Santos. A Transformation-based Optimiser for Haskell. Science of Computer Programming 32(1-3):3-47, September 1998.
....types would not achieve significantly better space complexity. 2 1 Introduction 1. 1 The Compile Time Space Costs of Typed Intermediate Languages Recent research has demonstrated the benefits of compiling with an explicitly typed intermediate language (TIL) Mor95, PJ96, TMC 96, PJM97, JS98, BKR98, TO98, FKR 99, CJW00, MWCG99, WDMT0X] One benefit is that explicit types can be used in compiler passes to guide program transformations and select e#cient data representations. Another advantage of using a TIL is that the compiler can invoke its type checker after every ....
S. L. P. Jones and A. L. M. Santos. A transformation-based optimiser for Haskell. Sci. Comput. Programming, 32(1--3):3--47, Sept. 1998.
....movement of loop invariant code out of the loop. This makes the program faster since the loop invariant code is run only once, instead of for every iteration. For the same reason it can be used to move functioninvariant code out of functions and lambda expressions, which is also called let oating [12]. For example, in the following loop the variable y is independent of the loop variable x. for x : 1 to 10 do let y = f( in a[x] x y Therefore it can be rewritten with code motion to the following code. let y = f( in for x : 1 to 10 do a[x] x y If a function call has both ....
S. L. Peyton Jones and A. L. M. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1-3):3-47, 1998.
....use; others apply on the source code level: Algebraic transformations based on solid mathematical semantics of a programming language allow to transform expressions such as a b a to b, a 0 to 0 etc. Transformation steps are at the core of modern compilers for functional programming languages [20]. Tail recursion elimination, where recursion can be translated into iteration, is a common optimization of functional programming language compilers; it is also one of the transformations known from the CIP project (see [2] Transformations that preserve behavior or correctness are by no means ....
S.L. Peyton Jones and A. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1-3):3-47, September 1998.
....or termination of sets of rewrite rules; in particular, commutativity and associativity have received special study [3] However, for us matters are seriously complicated by the other automatic rewrites that the compiler performs (beta reduction, inlining, case switching, let floating, etc. [32]) so we are not able to take direct advantage of this work. For an optimising compiler, confluence seems too strong, since that would implausibly suggest a canonical optimised form for a program. Termination is certainly important, but has not proved to be a problem in practice. 2.2 ....
....implementation of the rule rewriting mechanism within GHC is largely straightforward. The front end has been extended to handle rule parsing, type checking, and translation into the Gore intermediate language. The GHC optimiser is structured as a number of separate passes over Gore ex pressions [32,31]. The most fundamental pass iterated many times is the simplifier, which performs inlining, case simplification, and eta expansion in the course of a single top to bottom traversal of the program. To support rewriting, we just modified the simplifier to check each function application it ....
Peyton Jones, S. and A. Santos, A transformation-based optimiser for Haskell, Science of Computer Programming 32 (1998), pp. 3-47.
No context found.
S. P. Jones and A. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming 32(13) , pp3-47, September 1998.
No context found.
S. L. Peyton Jones and A. L. M. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1--3):3--47, September 1998.
No context found.
S. L. Peyton Jones and A. L. M. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1--3):3--47, September 1998.
No context found.
S. L. Peyton Jones and A. L. M. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1--3):3--47, September 1998.
No context found.
S. L. P. Jones and A. L. M. Santos. A transformation-based optimiser for Haskell. Sci. Comput. Programming, 32(1-3):3-47, Sept. 1998.
No context found.
S. Peyton Jones and A. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1-3):3-47, 1998.
No context found.
S. L. Peyton Jones and A. L. M. Santos. A Transformation-based Optimiser for Haskell. Science of Computer Programming 32(1-3):3-47, September 1998.
No context found.
S. L. Peyton Jones and A. L. M. Santos. A Transformation-based Optimiser for Haskell. Science of Computer Programming 32(1-3):3-47, September 1998.
No context found.
Simon Peyton Jones and Andrd L. M. Santos. A transformation-based optimiser for Haskell. Science of Computer Programming, 32(1-3):3-47, September 1998.
First 50 documents Next 50
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC