ABSTRACT
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.
- Abadi, M., and Cardelli, L. A Theory of Objects. Springer-Verlag, Berlin, Heidelberg, Germany, 1996. Google Scholar
Digital Library
- Aldrich, J., and Chambers, C. Ownership Domains: Separating Aliasing Policy from Mechanism. In Proceedings of European Conference on Object-Oriented Programming (ECOOP) (Oslo, Norway, June 2004), vol. 3086, Springer-Verlag, Berlin, Heidelberg, Germany, pp. 1--25.Google Scholar
Cross Ref
- Aldrich, J., Kostadinov, V., and Chambers, C. Alias Annotations for Program Understanding. In Proceedings of ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) (Seattle, WA, USA, Nov. 2002), ACM Press, New York, NY, USA, pp. 311--330. Google Scholar
Digital Library
- Andreae, C., Noble, J., Markstrum, S., and Millstein, T. A framework for implementing pluggable type systems. In Proceedings of ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) (Portland, Oregon, USA, Oct. 2006), ACM Press, New York, NY, USA. Google Scholar
Digital Library
- Baker, H. G. Unify and Conquer (Garbage, Updating, Aliasing) in Functional Languages. In Proc. 1990 ACM Conf. on Lisp and Functional Programming (Nice, France, June 1990), pp. 218--226. Google Scholar
Digital Library
- Barnett, M., DeLine, R., Fahndrich, M., Leino, K. R. M., and Schulte, W. Verification of object-oriented programs with invariants. In Proceedings of the Workshop on Formal Techniques for Java-like Programs in European Conference on Object-Oriented Programming (FTfJP) (Darmstadt, Germany, July 2003), Springer-Verlag, Berlin, Heidelberg, Germany.Google Scholar
- Boyapati, C. SafeJava: A Unified Type System for Safe Programming. PhD thesis, EECS, MIT, February 2004. Google Scholar
Digital Library
- Boyapati, C., Lee, R., and Rinard, M. Ownership types for safe programming: Preventing data races and deadlocks. In Proceedings of ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) (November 2002). Google Scholar
Digital Library
- Boyapati, C., Lee, R., and Rinard, M. Safe runtime downcasts with ownership types. In Proceedings of International Workshop on Aliasing, Confinement, and Ownership (IWACO), D. Clarke, Ed. Utrecht University, July 2003, pp. 1--14.Google Scholar
- Boyapati, C., Liskov, B., and Shrira, L. Ownership Types for Object Encapsulation. In Proceedings of ACM Symposium on Principles of Programming Languages (POPL) (New Orleans, LA, USA, Jan. 2003), ACM Press, New York, NY, USA, pp. 213--223. Invited talk by Barbara Liskov. Google Scholar
Digital Library
- Boyapati, C., and Rinard, M. A Parameterized Type System for Race-Free Java Programs. In Proceedings of ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) (Tampa Bay, FL, USA, 2001), ACM Press, New York, NY, USA, pp. 56--69. Google Scholar
Digital Library
- Boyland, J. Checking interference with fractional permissions. In Static Analysis: 10th International Symposium (2003), no. 2694 in Lecture Notes in Computer Science (LNCS), Srringer-Verlag, Berlin, Heidelberg, Germany, pp. 55--72. Google Scholar
Digital Library
- Boyland, J. T., and Reter, W. Connecting effects and uniqueness with adoption. In Proceedings of ACM Symposium on Principles of Programming Languages (POPL) (2005). Google Scholar
Digital Library
- Bracha, G., Odersky, M., Stoutamire, D., and Wadler, P. Making the future safe for the past: Adding Genericity to the Java programming language. In Proceedings of ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) (Oct. 1998). Google Scholar
Digital Library
- Charles, P., Donawa, C., Ebcioglu, K., Grothoff, C., Kielstra, A., Sarkar, V., and Praun, C. V. X10: An object-oriented approach to non-uniform cluster computing. In Proceedings of ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) (2005). Google Scholar
Digital Library
- Clarke, D. Object Ownership and Containment. PhD thesis, School of CSE, UNSW, Australia, 2002. Google Scholar
Digital Library
- Clarke, D., and Drossopoulou, S. Ownership, Encapsulation, and the Disjointness of Type and Effect. In Proceedings of ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) (Seattle, WA, USA, Nov. 2002), ACM Press, New York, NY, USA, pp. 292--310. Google Scholar
Digital Library
- Clarke, D., Potter, J., and Noble, J. Ownership Types for Flexible Alias Protection. In Proceedings of ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) (Vancouver, Canada, Oct. 1998), ACM Press, New York, NY, USA, pp. 48--64. Google Scholar
Digital Library
- Clarke, D., Richmond, M., and Noble, J. Saving the World from Bad Beans: Deployment-Time Confinement Checking. In Proceedings of ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) (Anaheim, CA, 2003), ACM Press, New York, NY, USA, pp. 374--387. Google Scholar
Digital Library
- Clarke, D., and Wrigstad, T. External Uniqueness is Unique Enough. In Proceedings of European Conference on Object-Oriented Programming (ECOOP) (Darmstadt, Germany, July 2003), vol. 2473 of Lecture Notes in Computer Science (LNCS), Springer-Verlag, Berlin, Heidelberg, Germany, pp. 176--200.Google Scholar
Cross Ref
- Diwan, A., McKinley, K. S., and Moss, J. E. B. Type-based alias analysis. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) (June 1998). Google Scholar
Digital Library
- Fluet, M., and Pucella, R. Phantom Types and Subtyping. In International Conference on Theoretical Computer Science (TCS) (Aug. 2002), pp. 448--460. Google Scholar
Digital Library
- Grossman, D., Morrisett, J. G., Jim, T., Hicks, M. W., Wang, Y., and Cheney, J. Region-based memory management in cyclone. In PLDI (2002), pp. 282--293. Google Scholar
Digital Library
- Grothoff, C., Palsberg, J., and Vitek, J. Encapsulating Objects with Confined Types. In Proceedings of ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) (Tampa Bay, FL, USA, 2001), ACM Press, New York, NY, USA, pp. 241--255. Google Scholar
Digital Library
- Hogg, J. Islands: Aliasing Protection in Object-Oriented Languages. In Proceedings of ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) (Phoenix, AZ, USA, Nov. 1991), vol. 26, ACM Press, New York, NY, USA, pp. 271--285. Google Scholar
Digital Library
- Hogg, J., Lea, D., Wills, A., de Champeaux, D., and Holt, R. The Geneva convention of the treatment of object aliasing. OOPS Messenger 3, 2 (April 1992), 11--16. Google Scholar
Digital Library
- Igarashi, A., Pierce, B. C., and Wadler, P. Featherweight Java: a minimal core calculus for Java and GJ. ACM Transactions on Programming Languages and Systems (TOPLAS) 23, 3 (May 2001), 396--450. Google Scholar
Digital Library
- Igarashi, A., Pierce, B. C., and Wadler, P. A recipe for raw types. In Proceedings of Workshop on Foundations of Object-Oriented Languages (FOOL) (2001).Google Scholar
- Kennedy, A., and Russo, C. Generalized algebraic data types and object-oriented programming. In Proceedings of ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA) (2005). Google Scholar
Digital Library
- Kennedy, A., and Syme, D. The design and implementation of Generics for the .NET Common Language Runtime. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) (2001). Google Scholar
Digital Library
- Krishnaswami, N., and Aldrich, J. Permission-based ownership: Encapsulating state in higher-order typed languages. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) (Chicago, UL, USA, 2005), ACM Press, New York, NY, USA, pp. 96--106. Google Scholar
Digital Library
- Lamport, L., and Schneider, F. B. Constraints: A uniform approach to aliasing and typing. In Proceedings of ACM Symposium on Principles of Programming Languages (POPL) (New Orleans, Louisiana, 1985), pp. 205--216. Google Scholar
Digital Library
- Leino, K. R. M., and Muller, P. Object invariants in dynamic contexts. In Proceedings of European Conference on Object-Oriented Programming (ECOOP) (2004), Springer-Verlag, Berlin, Heidelberg, Germany.Google Scholar
Cross Ref
- Lu, Y., and Potter, J. A type system for reachability and acyclicity. In Proceedings of European Conference on Object-Oriented Programming (ECOOP) (2005), vol. 3586 of Lecture Notes in Computer Science, Springer, pp. 479--503. Google Scholar
Digital Library
- Lu, Y., and Potter, J. Flexible ownership types with owner variance. In Proceedings of European Conference on Object-Oriented Programming (ECOOP) (2006).Google Scholar
- Lu, Y., and Potter, J. Protecting representation with effect encapsulation. In Proceedings of ACM Symposium on Principles of Programming Languages (POPL) (2006). Google Scholar
Digital Library
- Milner, R. Theory of type polymorphism in programming. Journal of Computer and System Sciences 17(3) (1978), 348--375.Google Scholar
Cross Ref
- Mitchell, N. The runtime structure of object ownership. In Proceedings of European Conference on Object-Oriented Programming (ECOOP) (Nantes, France, July 2006), D. Thomas, Ed., vol. 4067 of Lecture Notes in Computer Science (LNCS), Springer-Verlag, Berlin, Heidelberg, Germany, pp. 74--98. Google Scholar
Digital Library
- Müller, P., and Poetzsch-Heffter, A. Programming Languages and Fundamentals of Programming. Fernuniversität Hagen, 1999, ch. Universes: a Type System for Controlling Representation Exposure. Poetzsch-Heffter, A. and Meyer, J. (editors).Google Scholar
- Noble, J., Vitek, J., and Potter, J. Flexible Alias Protection. In Proceedings of European Conference on Object-Oriented Programming (ECOOP) (July 1998), E. Jul, Ed., vol. 1445 of Lecture Notes in Computer Science (LNCS), Springer-Verlag, Berlin, Heidelberg, Germany, pp. 158--185. Google Scholar
Digital Library
- O'Callahan, R., and Jackson, D. Lackwit: a program understanding tool based on type inference. In Proceedings of the International Conference on Software Engineering (ICSE) (Boston, USA, May 1997). Google Scholar
Digital Library
- Permandla, P., and Boyapati, C. A type system for preventing data races and deadlocks in the java virtual machine language. Tech. rep., University of Michigan, 2005.Google Scholar
- Pierce, B. C. Types and Programming Languages. MIT Press, 2002. Google Scholar
Digital Library
- Potanin, A. Ownership Generic Java Download. http://www.mcs.vuw.ac.nz/~ alex/ogj/, 2005.Google Scholar
- Potanin, A., Noble, J., Clarke, D., and Biddle, R. Defaulting Generic Java to Ownership. In Proceedings of the Workshop on Formal Techniques for Java-like Programs in European Conference on Object-Oriented Programming (FTfJP) (Oslo, Norway, June 2004), Springer-Verlag, Berlin, Heidelberg, Germany.Google Scholar
- Potanin, A., Noble, J., Clarke, D., and Biddle, R. Featherweight Generic Ownership. In Proceedings of the Workshop on Formal Techniques for Java-like Programs in European Conference on Object-Oriented Programming (FTfJP) (Glasgow, Scotland, July 2005), Springer-Verlag, Berlin, Heidelberg, Germany.Google Scholar
- Potanin, A., Noble, J., Clarke, D., and Biddle, R. Featherweight Generic Confinement. Journal of Functional Programming (2006). Accepted for publication. Google Scholar
Digital Library
- Potanin, A., Noble, J., Clarke, D., and Biddle, R. Featherweight generic ownership. Tech. rep., Victoria University of Wellington, 2006. http://www.mcs.vuw.ac.nz/~alex/FGOTR.pdf.Google Scholar
- Pugh, B. Find Bugs - A Bug Pattern Detector for Java. www.cs.umd.edu/~pugh/jva/bugs/, 2003.Google Scholar
- Sun Microsystems. Java Development Kit. Available at: http://java.sun.com/j2se/, 2005.Google Scholar
- Talpin, J.-P., and Jouvelot, P. Polymorphic type, region, and effect inference. Journal of Functional Programming 2, 3 (July 1992), 245--271.Google Scholar
Cross Ref
- Tofte, M., and Talpin, J.-P. Region-Based Memory Management. Information and Computation 132, 2 (1997), 109--176. Google Scholar
Digital Library
- Torgerson, M., Ernst, E., Hansen, C. P., von der Ahé, P., Bracha, G., and Gafter, N. Adding wildcards to the Java programming language. Journal of Object Technology 3, 11 (Dec. 2004), 97--116. Special Issue: OOPS track at SAC 2004.Google Scholar
Cross Ref
- Vitek, J., and Bokowski, B. Confined Types in Java. Software Practice & Experience 31, 6 (May 2001), 507--532. Google Scholar
Digital Library
- Zhao, T., Palsberg, J., and Vitek, J. Type-Based Confinement. Journal of Functional Programming 16, 1 (2006), 83--128. Google Scholar
Digital Library
Index Terms
Generic ownership for generic Java
Recommendations
Generic ownership for generic Java
Proceedings of the 2006 OOPSLA ConferenceOwnership 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 ...
Ownership and immutability in generic Java
OOPSLA '10The Java language lacks the important notions of ownership (an object owns its representation to prevent unwanted aliasing) and immutability (the division into mutable, immutable, and readonly data and references). Programmers are prone to design errors,...
Safe instantiation in generic Java
Special issue: Principles and practices of programming in Java (PPPJ 2004)This paper introduces the "Safe Instantiation Principle", a new design criterion for evaluating extensions of Java that support generic types. The paper initially focuses on the GJ and NextGen formulations of Generic Java and the implications of safe ...







Comments