Results 1 -
2 of
2
The GRIN Project: A Highly Optimising Back End for Lazy Functional Languages
- In Proc IFL ’96, volume 1268 of LNCS
, 1996
"... Low level optimisations from conventional compiler technology often give very poor results when applied to code from lazy functional languages, mainly because of the completely dioeerent structure of the code, unknown control flow, etc. A novel approach to compiling laziness is needed. We describe a ..."
Abstract
-
Cited by 11 (0 self)
- Add to MetaCart
Low level optimisations from conventional compiler technology often give very poor results when applied to code from lazy functional languages, mainly because of the completely dioeerent structure of the code, unknown control flow, etc. A novel approach to compiling laziness is needed. We describe a complete back end for lazy functional languages, which uses various interprocedural optimisations to produce highly optimised code. The main features of our new back end are the following. It uses a monadic intermediate code, called GRIN (Graph Reduction Intermediate Notation). This code has a very "functional flavour", making it well suited for analysis and program transformations, but at the same time provides the "low level" machinery needed to express many concrete implementation concerns. Using a heap points-to analysis, we are able to eliminate most unknown control flow due to evals (i.e., forcing of closures) and applications of higher order functions, in the program. A transformat...
by
"... Recent trends in programming language implementation are moving more and more towards “managed ” runtime environments. These offer many benefits, including static and dynamic type checking, security, profiling, bounds checking and garbage collection. The Common Language Infrastructure (CLI) is Micro ..."
Abstract
- Add to MetaCart
Recent trends in programming language implementation are moving more and more towards “managed ” runtime environments. These offer many benefits, including static and dynamic type checking, security, profiling, bounds checking and garbage collection. The Common Language Infrastructure (CLI) is Microsoft’s attempt to define a managed runtime environment. However, since it was designed with more mainstream languages in mind, including C ♯ and C++, CLI proves restrictive when compiling functional languages. More specifically, for compilers such as GHC, which compiles Haskell, the CLI provides little support for lazy evaluation, currying (partial applications) and static type checking. The CLI does not provide any way of representing a computation in an evaluated and non-evaluated form. It does not allow functions to directly manipulate the runtime stack, and it restricts static typing in various forms; including subsumption over function types. In this thesis, we describe a new compilation method that removes the need for runtime argument checks. Runtime argument checking is required to

