| A. Santos. Compilation by Transformation in NonStrict Functional Languages. PhD thesis, University of Glasgow, 1995. |
....debugging since the dynamic state of a program must be considered. It can also reduce the possibility for optimisation by the compiler, since the side effecting behaviour has to be preserved. Thus, more optimisations are possible for functional languages and may be implemented more easily [Santos, 1995]. With no side effects, computations are also inherently parallel, easing transfer of a program to modern parallel machines [Trinder et al. 1996] ffl Inherent Non Strictness: this means that a function s arguments do not have to be fully evaluated before a result can be returned. Thus, ....
....of the Haskell to C interfaces, plus some work in adapting to the different library organisations. The basic ghc compiled LOLITA was almost twice as fast as a basic hbc compiled LOLITA. Optimised ghc was about twice as fast again, but since it traded memory for speed in several optimisations [Santos, 1995], it ran out of memory during parsing more often, too much to be reliable in MUC 6 work. This memory drain was across the whole program, so compiling the parser section without optimisation did not alleviate the problem. The ghc profiler did not immediately work. The author discovered and then ....
[Article contains additional citation context not shown here]
A. Santos, Compilation by Transformation in Non-Strict Functional Languages, PhD thesis, Department of Computing Science, University of Glasgow, 1995.
....: Process [ 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 ....
A. L. M. Santos. Compilation by Transformation in Non-Strict Functional Languages. PhD thesis, Department of Computing Science. University of Glasgow, 1995.
....been adapted to recognize the new expressions. In the back end, the GUM [THJP96] system has been reused to build Eden s runtime system [BKL98] GHC s modus operandi is compiling by transformation. It translates Haskell into a minimal functional language called Core where a lot of optimizations [San95,JS98] are performed. After that, imperative code is generated. In Eden s compiler, process abstractions and instantiations are hidden in Core inside predened functions, and Core to Core optimizations are disallowed because some of them can spoil Eden s semantics. This situation is clearly ....
A. L. M. Santos. Compilation by Transformation in Non-Strict Functional Languages. PhD thesis, Department of Computing Science. University of Glasgow, 1995.
....very useful in some deterministic parallel algorithms [KPR00] Eden is aimed at both types of applications. Eden has been implemented by modifying the Glasgow Haskell Compiler (GHC) JHH 93] GHC translates Haskell into a minimal functional language called Core where a lot of optimizations [San95, PS98] are performed. Some of them are incorrect in a non deterministic environment. So, a non determinism analysis is carried out at Core level and, as a result, variables are annotated as deterministic or (possibly) non deterministic. After that, the dangerous transformations are disallowed if ....
....copied to a different processor. ffl At present, some transformations carried out by the compiler in the optimization phases are semantically incorrect for non deterministic expressions. In this case, they will be deactivated. They are full laziness [JPS96] the static argument transformation [San95] and the specialization. The general reason for all of them is the increasing of closure sharing: Before the transformation, several evaluation of a nondeterministic expression can produce several different values; after the transformation, a shared nondeterministic expression is once evaluated, ....
A. L. M. Santos. Compilation by Transformation in Non-Strict Functional Languages. PhD thesis, Department of Computing Science. University of Glasgow, 1995.
....types be handled differently, which is undesirable. And yet more would be needed in an untyped or impure setting. A quite separate, complementary, approach to inlining recursive functions is variously described by [App94] loop headers ) Ser97] labels inline ) DS97] lambdadropping ) and [San95] ( the static argument transformation ) The common idea is to turn a recursive function definition into a non recursive function containing a local, recursive definition. Thus we can, for example, transform the standard recursive definition of map: map = f xs case xs of [ x:xs) f ....
....style. Functional languages encourage the use of abstractions, so the benefits of inlining are likely to be greater. Indeed, Appel reports benefits in the range 15 25 for the Standard ML of New Jersey compiler [App92] while Santos reports average benefits of around 40 for Haskell programs [San95]. Chambers reports truly dramatic factors of 4 to 55 for his SELF compiler [Cha92] SELF takes abstraction very seriously indeed The most detailed and immediately relevant work we have found is for two Scheme compilers. Waddell and Dybvig reports performance improvements of 10 100 in the Chez ....
[Article contains additional citation context not shown here]
A Santos. Compilation by transformation in non-strict functional languages. Ph.D. thesis, Department of Computing Science, Glasgow University, September 1995.
....system. Our work is not restricted to Eden, a similar approach might be taken for other orthogonal extensions of sequential languages by a coordination language. 2 The Eden Compiler The key idea of the GHC which forms the basis for the Eden compiler is compilation by program transformation [15]. Haskell programs are first transformed into Core Haskell, a minimal functional language in which all other Haskell constructs can be expressed. Core Haskell is mapped to a still functional abstract machine language STGL which has a simple denotational and operational semantics. The operational ....
A. Santos. Compilation by Transformation in Non-Strict Functional Languages. PhD thesis, Glasgow University, Department of Computing Science, 1995.
....use these kinds of transformations. Since all expressions in such languages have local semantics (nothing depends on a state) all transformations can be local to, which makes them very easy to reason about. For example the well known functional language Haskell [Hask96] uses this very same method [Sant95]. One of the main designing backgrounds of the lazy functional language Mondrian [Meij96] is to let its compiler be elegant. Hence, the design choice for its compilation process is, naturally, to let it consist mainly of such program transformations. In this paper we will discuss how they can be ....
Santos, Andr' e Lu' is de Medeiros, Compilation by Transformation in Non-strict Functional Languages, PhD. thesis, University of Glasgow, 1995.
....is being prevented by the profiler, a very unfortunate Heisenberg effect. Controlling residency is notoriously difficult, and we leave this as further work [Rojemo 1995] 5. 1 Local Transformations The Glasgow Haskell compiler makes use of many simple local transformations to optimize the code [Santos 1995]. Some examples are given in Figure 6. In Section 4.3 we proved that an expression is always evaluated in the context of its statically enclosing cost center (Theorem 4.3.5) Thus, any local transformation whose effect is entirely within the scope of a cost center can proceed unhindered, since the ....
....uses a default case binding which is not part of the language given in Figure 3. It is quite straightforward to extend the language, semantics, and results with this construct. 7 A more general case of case transformation is used when there are multiple alternatives in each case (see Santos [1995]) ACM Transactions on Programming Languages and Systems, Vol. 19, No. 1, January 1997. 22 Delta Patrick M. Sansom et al. when the inlining is evaluated in the context of the same cost center and heap. cc; Gamma[f SUB 7 y:e] y:e fg Delta : y:e; cc The only effect of performing ....
Santos, A. 1995. Compilation by transformation in non-strict functional languages. Ph.D. thesis, Res. Rep. FP-1995-17, Dept. of Computing Science, Univ. of Glasgow, Scotland.
.... functional programmers treat functions the way C programmers treat macros so good inlining is crucial. Compilers for conventional languages get 10 15 performance improvement from inlining (Davidson Holler [1988] while functional language compilers gain 20 40 2 (Appel [1992] Santos [1995]) Inlining removes some function call overhead, of course, but an equally important factor is that inlining brings together code that was previously separated, and thereby often exposes a cascade of new transformation opportunities. We therefore implement inlining in the simplifier. We have found ....
....this form of case elimination in Section 6.1. 5.4 Summary We have described a few of the most important transformations involving case expressions, but there are quite a few more, including case merging, dead alternative elimination, and default elimination. They are described in more detail by Santos [1995] who also provides measurements of their frequency. Like many good ideas, the case of case transformation limited to booleans, but including the idea of using let bound variables as join points was incorporated in Steele s Rabbit compiler for Scheme (Steele [1978] We re invented it, and ....
[Article contains additional citation context not shown here]
A Santos [Sept 1995], "Compilation by transformation in non-strict functional languages," PhD thesis, Department of Computing Science, Glasgow University.
....and post processing parts. He can then eliminate most of the boxing on the basis of a control ow analysis. While there was no concern about complexity in the unboxing optimization area, there have been several studies on how to formalize complexity in functional programming languages. Santos [18] enriches natural semantics with a notion of cost in a way very similar to ours, and studies time complexity properties of several transformations in a lazy functional programming language. However, the transformations he studied are local and change only the constant amount of costs. Thus he did ....
A. L. Santos. Compilation by Transformation in Nonstrict Functional Languages. PhD thesis, Department of Computing Science, University of Glasgow, 1995.
.... functional programmers treat functions the way C programmers treat macros so good inlining is crucial. Compilers for conventional languages get 10 15 performance improvement from inlining (Davidson Holler [1988] while functional language compilers gain 20 40 3 (Appel [1992] Santos [1995]) Inlining removes some function call overhead, of course, but an equally important factor is that inlining brings together code that was previously separated, and thereby often exposes a cascade of new transformation opportunities. We therefore implement inlining in the simplifier. We have found ....
....this form of case elimination in Section 6.1. 5.4 Summary We have described a few of the most important transformations involving case expressions, but there are quite a few more, including case merging, dead alternative elimination, and default elimination. They are described in more detail by Santos [1995] who also provides measurements of their frequency. Like many good ideas, the case of case transformation limited to booleans, but including the idea of using let bound variables as join points was incorporated in Steele s Rabbit compiler for Scheme (Steele [1978] We re invented it, and ....
[Article contains additional citation context not shown here]
A Santos [1995], "Compilation by transformation in non-strict functional languages," PhD thesis, Department of Computing Science, Glasgow University, Sept 1995.
....and call reverse xs. Again, the operational model determines the syntax. These informal operational notions help identify transformations that might be beneficial, but they do not constitue a formal model of efficiency . We have started to develop such a model, but technical difficulties remain (Santos [1995, Chaper 9] 2.2 The costs of a let(rec) binding Consider the expression 1 This syntax is becoming quite widely used (Ariola et al. 1995] Flanagan et al. 1993] Launchbury [1993] Peyton Jones [1992] let x = f y in . x. x. What, precisely, are the costs of the let binding for x The ....
....Haskell Compiler. The full laziness and float inwards transformations are implemented as separate passes. In contrast, the local let floating transformations are combined with a large collection of other local transformations in a pass that we call the Simplifier (Peyton Jones Santos [1994] Santos [1995]) Among the transformations performed by the Simplifier is dependency analysis, which splits each letrec binding into its minimal stronglyconnected components. Doing this is sometimes valuable because it lets the resulting groups be floated independently. We perform the transformations in the ....
[Article contains additional citation context not shown here]
A Santos [Sept 1995], "Compilation by transformation in non-strict functional languages," PhD thesis, Department of Computing Science, Glasgow University.
No context found.
A. Santos. Compilation by Transformation in NonStrict Functional Languages. PhD thesis, University of Glasgow, 1995.
No context found.
Santos, A. L., "Compilation by Transformation in Non-strict Functional Languages," Ph.D. thesis, Department of Computing Science, University of Glasgow (1995).
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