Ownership Domains in the Real World
Marwan Abi-Antoun, Jonathan Aldrich · 2007
The Ownership Domains type system has had publicly available tool support for a few years. However, the previous implementation used non-backwards compatible language extensions to Java and ran on a research infrastructure, which made it difficult to conduct substantial case studies on interesting systems. We first present a re-implementation of ownership domains using Java 1.5 annotations and the Eclipse infrastructure. We then use the improved tool to annotate two real 15,000-line Java programs while using refactoring tool support, generics and external libraries. Ownership domains, as most other ownership type systems, provide useful encapsulation properties. We illustrate using actual examples from the subject systems how ownership domains also express and enforce design intent regarding object encapsulation and communication and help identify tight coupling. Finally, we mention some expressiveness gaps that we encountered.