Strictness analysis in Helium
Summary
Strictness analysis is an important optimization in compilers for lazy languages.
Expressions which are guaranteed to be used should preferably be evaluated in a strict manner to improve performance.
This thesis implements strictness analysis in the Helium compiler for Haskell.
The analysis is based on relevance and applicativeness typing.
A monovariant and polyvariant analysis are proposed, with an optimal precision-speed balance required.
The monovariant analysis with monotypes provides the best trade-off, while the polyvariant analysis provides better precision but at an increased analysis cost.
An alternative system without applicativeness annotations was proposed which could have improved the balance even further, but this turned out to be unsound.