Typed Regions
Abstract
Standard type systems are not sufficiently expressive when applied to low-level memory-management code. Such code often uses some form of strong update (i.e. assignments that change the type of the affected location) and needs to reason about the relative position of objects in memory. We present a novel type system which, like alias types 20, provides a form of strong update, but with the advantage that it does not require the aliasing pattern to be statically described. It also provides operations over sequential memory locations and allows covariant reference casts. We then show how this new type system can be used to implement a type-safe stop garbage collector that can properly collect cyclic datastructures. More specifically, we show how to write a two-generations collector for a language with mutable ref cells.
Document Details
- Document Type
- Technical Report
- Publication Date
- Jan 01, 2005
- Accession Number
- ADA436492
Entities
People
- Stefan Monnier
- Zhong Shao
Organizations
- Yale University