Monadic and Substructural Type Systems for Region-Based Memory Management (2007)
| Venue: | Cornell University |
| Citations: | 2 - 0 self |
BibTeX
@TECHREPORT{Fluet07monadicand,
author = {Matthew Thomas Fluet},
title = {Monadic and Substructural Type Systems for Region-Based Memory Management},
institution = {Cornell University},
year = {2007}
}
OpenURL
Abstract
Region-based memory management is a scheme for managing dynamically allocated data. A defining characteristic of region-based memory management is the bulk deallocation of data, which avoids both the tedium of malloc/free and the overheads of a garbage collector. Type systems for region-based memory manag-ment enhance the utility of this scheme by statically determining when a program is guaranteed to not perform any erroneous region operations. We describe three type systems for region-based memory management: • a type-and-effect system (à la the Tofte-Talpin region calculus); • a novel monadic type system; • a novel substructural type system. We demonstrate how to successively encode the type-and-effect system into the monadic type system and the monadic type system into the substructural type system. These type systems and encodings support the argument that the type-and-effect systems that have traditionally been used to ensure the safety of region-based memory management are neither the simplest nor the most expressive type







