Hs Opt

Stratego -- Strategies for Program Transformation
HsOpt is an optimizer for the Helium compiler implemented in the transformation language Stratego. Helium is a subset of Haskell developed at Utrecht University. The optimizer works on the code produced by the Helium front-end, which is code for Daan Leijen's Lazy Virtual Machine (LVM). The goal of this project is to validate the paradigm of transformation strategies for the implementation of an optimizing compiler.

Alan van Dam has written the first version of the optimizer consisting of a basic simplifier in the style of the GHC. The main target of this simplifier has been the optimization of pattern matching code. The naive translation of pattern matching by the Helium front-end keeps it simple, but produces rather ugly code. Using a small set of transformation rules and an appropriate strategy the code can be reduced to more sane code, often similar to code that would be written by hand. This first simplification step produces an optimization of about 10%.

Plans for the near future are to include an inliner (currently only local let bindings are inlined, not global function definitions), and to incorporate the earlier work on deforestation.

-- EelcoVisser - 05 May 2003

Alan's master thesis is now available: Simplifying the Simplifier

-- EelcoVisser - 09 Jul 2003