Ownership transfer in universe types

  • Authors:
  • Peter Müller;Arsenii Rudich

  • Affiliations:
  • Microsoft Research, Redmond, WA;ETH Zurich, Zurich, Switzerland

  • Venue:
  • Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

Ownership simplifies reasoning about object-oriented programs by controlling aliasing and modifications of objects. Several type systems have been proposed to express and check ownership statically. For ownership systems to be practical, they must allow objects to migrate from one owner to another. This ownership transfer is common and occurs, for instance, during the initialization of data structures and when data structures are merged. However, existing ownership type systems either do not support ownership transfer at all or they are too restrictive, give rather weak static guarantees, or require a high annotation overhead. In this paper, we present UTT, an extension of Universe Types that supports ownership transfer. UTT combines ownership type checking with a modular static analysis to control references to transferable objects. UTT is very flexible because it permits temporary aliases, even across certain method calls. Nevertheless, it guarantees statically that a cluster of objects is externally-unique when it is transferred and, thus, that ownership transfer is type safe. UTT provides the same encapsulation as Universe Types and requires only negligible annotation overhead.