| | |
Summary: A Theory of Linear Objects
Matthew Kehrt
University of Washington
mkehrt@cs.washington.edu
Jonathan Aldrich
Carnegie Mellon University
aldrich@cs.cmu.edu
Abstract
Recently, linearity has been proposed as a mechanism for mem-
ory management, alias control, and typestate tracking. While linear
type systems have been extensively studied in functional program-
ming, their use in object-oriented systems has been limited to useful
but ad-hoc annotation systems that track unique pointers.
In this paper, we study object-oriented linearity at level of foun-
dational object calculi. Our system tracks not only linear objects (to
which there may be only one pointer), but linear methods as well
(which may be called at most once). Tracking linear objects allows
us to ensure type safety for imperative, type-changing update to
methods and imperative, type-changing dynamic inheritance. Be-
cause some aliasing is important in practical systems, our system
|