Higher Ranked Region Bound Inference For Region Based Memory Management In Helium
Summary
Region based memory management, a compile-time alternative to garbage collection, splits the heap into a stack of lexically scoped regions. Most of the work for region based memory management can be done at compile time by inferring the placement and bounds of regions. A region bound represents the size of a region. Regions with finite bounds, can be stack allocated, otherwise they must be heap allocated. In this thesis we design a higher ranked region bound analysis to infer the bounds of regions. The focus of this thesis lies on the implementation within the Helium Haskell compiler, opposed to proving meta theory. We show that the analysis infers a high percentage of finite bounds whilst having minimal impact on compilation time.