The Java language lacks the important notions of <i>ownership</i> (an object owns its representation to prevent unwanted aliasing) and <i>immutability</i> (the division into mutable, immutable, and readonly data and references). Programmers are prone to design errors, such as representation exposure or violation of immutability contracts. This paper… (More)
Cloning is an essential feature in many object-oriented programs. Unfortunately, existing techniques generally copy too little or too much. We present an object cloning technique that uses the object structure enforced by ownership types to produce the clones.
Ownership systems express hierarchical data structures well but can have difficulty expressing relationships between peers. Relationships systems, on the other hand, do not address ownership issues. This paper considers the recent work on relationship systems in the context of ownership, and presents ideas for adding ownership to relationship systems.
Object-oriented programmers often need to clone objects. Mainstream languages, such as C# and Java, typically default to shallow cloning, which copies just one object and aliases references from that object. Other languages, such as Eiffel, provide deep cloning. A deep clone is a copy of the entire object graph reachable from the cloned object, which could… (More)
The JAVA language has no support for the important notions of ownership (an object owns its representation to prevent unwanted aliasing or modifications) and immutability (the division into mutable, immutable, and readonly data and references). Programmers are prone to design errors such as representation exposure or violation of immutability contracts.… (More)