Formalization of Ownership Transfer in Universe Types; ; Technical Report;

Ownership is a powerful concept to structure the object store and to control aliasing and modi¯cations of objects. This paper presents an ownership type system for a Java-like programming language. Like our earlier Universe type system, Universe Types with Transfer (UTT) enforce the owner-as-modi¯er discipline. This discipline does not restrict aliasing, but requires modi¯cations of an object to be initiated by its owner. This allows owner objects to control state changes of owned objects, for instance, to maintain invariants. UTT combines ownership type checking with a modular static analysis to control references to transferable objects. UTT is very °exible 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.