Generic ownership for generic Java

Ownership types enforce encapsulation in object-oriented programs by ensuring that objects cannot be leaked beyond object(s) that own them. Existing ownership programming languages either do not support parametric polymorphism (type genericity) or attempt to add it on top of ownership restrictions. Generic Ownership provides per-object ownership on top of a sound generic imperative language. The resulting system not only provides ownership guarantees comparable to established systems, but also requires few additional language mechanisms due to full reuse of parametric polymorphism. We formalise the core of Generic Ownership, highlighting that only restriction of this calls and owner subtype preservation are required to achieve deep ownership. Finally we describe how Ownership Generic Java (OGJ) was implemented as a minimal extension to Generic Java in the hope of bringing ownership types into mainstream programming.

[1]  Riccardo Pucella,et al.  Phantom types and subtyping , 2002, Journal of Functional Programming.

[2]  Martin Rinard,et al.  Safejava: a unified type system for safe programming , 2004 .

[3]  Martin Odersky,et al.  Making the future safe for the past: adding genericity to the Java programming language , 1998, OOPSLA '98.

[4]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 2001, TOPL.

[5]  Martin C. Rinard,et al.  ACM Conference on Object-Oriented Programming, Systems, Languages and Applications (OOPSLA), November 2002 Ownership Types for Safe Programming: Preventing Data Races and Deadlocks , 2022 .

[6]  Vivek Sarkar,et al.  X10: an object-oriented approach to non-uniform cluster computing , 2005, OOPSLA '05.

[7]  Henry G. Baker,et al.  Unify and conquer , 1990, LISP and Functional Programming.

[8]  Brian Postow Book review: A Theory of Objects by Martin Abadi and Luca Cardelli (Springer-Verlag, 1996): Series--Monographs in Computer Science , 1999, SIGA.

[9]  Craig Chambers,et al.  Alias annotations for program understanding , 2002, OOPSLA '02.

[10]  Pierre Jouvelot,et al.  Polymorphic type, region and effect inference , 1992, Journal of Functional Programming.

[11]  Philip Wadler,et al.  A Recipe for Raw Types , 2001 .

[12]  W. Gropp,et al.  Accepted for publication , 2001 .

[13]  Mads Tofte,et al.  Region-based Memory Management , 1997, Inf. Comput..

[14]  Richard C. Holt,et al.  The Geneva convention on the treatment of object aliasing , 1992, OOPS.

[15]  Yi Lu,et al.  On Ownership and Accessibility , 2006, ECOOP.

[16]  John Hogg,et al.  Islands: aliasing protection in object-oriented languages , 1991, OOPSLA '91.

[17]  Chandrasekhar Boyapati,et al.  A type system for preventing data races and deadlocks in the java virtual machine language: 1 , 2007, LCTES.

[18]  James Noble,et al.  Saving the world from bad beans: deployment-time confinement checking , 2003, OOPSLA '03.

[19]  Jens Palsberg,et al.  Encapsulating objects with confined types , 2001, OOPSLA 2001.

[20]  Peter M Uller,et al.  Universes: a type system for controlling representation exposure , 1999 .

[21]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[22]  Jan Vitek,et al.  Confined types in Java , 2001, Softw. Pract. Exp..

[23]  James Cheney,et al.  Region-based memory management in cyclone , 2002, PLDI '02.

[24]  Jonathan Aldrich,et al.  Permission-based ownership: encapsulating state in higher-order typed languages , 2005, PLDI '05.

[25]  K. Rustan M. Leino,et al.  Verification of Object-Oriented Programs with Invariants , 2003, J. Object Technol..

[26]  Liuba Shrira,et al.  Ownership types for object encapsulation , 2003, POPL '03.

[27]  Craig Chambers,et al.  Ownership Domains: Separating Aliasing Policy from Mechanism , 2004, ECOOP.

[28]  Martin C. Rinard,et al.  A parameterized type system for race-free Java programs , 2001, OOPSLA '01.

[29]  Harald Haller Design of Large .NET Applications: Best Practices , 2004, J. Object Technol..

[30]  John Tang Boyland,et al.  Checking Interference with Fractional Permissions , 2003, SAS.

[31]  James Noble,et al.  Featherweight generic confinement , 2006, Journal of Functional Programming.

[32]  Gilad Bracha,et al.  Adding wildcards to the Java programming language , 2004, SAC '04.

[33]  John Tang Boyland,et al.  Connecting effects and uniqueness with adoption , 2005, POPL '05.

[34]  Leslie Lamport,et al.  Constraints: a uniform approach to aliasing and typing , 1985, POPL.

[35]  Jens Palsberg,et al.  Type-based confinement , 2006, J. Funct. Program..

[36]  Nick Mitchell,et al.  The Runtime Structure of Object Ownership , 2006, ECOOP.

[37]  Sophia Drossopoulou,et al.  Ownership, encapsulation and the disjointness of type and effect , 2002, OOPSLA '02.

[38]  James Noble,et al.  Featherweight Generic Ownership , 2004 .

[39]  Martín Abadi,et al.  A Theory of Objects , 1996, Monographs in Computer Science.

[40]  Shane Markstrum,et al.  A framework for implementing pluggable type systems , 2006, OOPSLA '06.

[41]  Andrew Kennedy,et al.  Generalized algebraic data types and object-oriented programming , 2005, OOPSLA '05.

[42]  Yi Lu,et al.  Protecting representation with effect encapsulation , 2006, POPL '06.

[43]  Andrew Kennedy,et al.  Design and implementation of generics for the .NET Common language runtime , 2001, PLDI '01.

[44]  David Gerard Clarke,et al.  Object ownership and containment , 2003 .

[45]  Jan Vitek,et al.  Flexible Alias Protection , 1998, ECOOP.

[46]  K. Rustan M. Leino,et al.  Object Invariants in Dynamic Contexts , 2004, ECOOP.

[47]  Yi Lu,et al.  A Type System for Reachability and Acyclicity , 2005, ECOOP.

[48]  Gilad Bracha,et al.  Adding Wildcards to the Java Programming Language , 2004, J. Object Technol..

[49]  Dave Clarke,et al.  External Uniqueness Is Unique Enough , 2003, ECOOP.

[50]  Robert O'Callahan,et al.  Lackwit: A Program Understanding Tool Based on Type Inference , 1997, Proceedings of the (19th) International Conference on Software Engineering.

[51]  Amer Diwan,et al.  Type-based alias analysis , 1998, PLDI.

[52]  James Noble,et al.  Ownership types for flexible alias protection , 1998, OOPSLA '98.

[53]  Martin Rinard,et al.  Safe Runtime Downcasts With Ownership Types , 2002 .

[54]  Benjamin C. Pierce,et al.  Types and programming languages: the next generation , 2003, 18th Annual IEEE Symposium of Logic in Computer Science, 2003. Proceedings..