skip to main content
10.1145/1167473.1167500acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Generic ownership for generic Java

Published: 16 October 2006 Publication History

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.

References

[1]
Abadi, M., and Cardelli, L. A Theory of Objects. Springer-Verlag, Berlin, Heidelberg, Germany, 1996.
[2]
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.
[3]
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.
[4]
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.
[5]
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.
[6]
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.
[7]
Boyapati, C. SafeJava: A Unified Type System for Safe Programming. PhD thesis, EECS, MIT, February 2004.
[8]
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).
[9]
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.
[10]
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.
[11]
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.
[12]
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.
[13]
Boyland, J. T., and Reter, W. Connecting effects and uniqueness with adoption. In Proceedings of ACM Symposium on Principles of Programming Languages (POPL) (2005).
[14]
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).
[15]
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).
[16]
Clarke, D. Object Ownership and Containment. PhD thesis, School of CSE, UNSW, Australia, 2002.
[17]
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.
[18]
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.
[19]
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.
[20]
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.
[21]
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).
[22]
Fluet, M., and Pucella, R. Phantom Types and Subtyping. In International Conference on Theoretical Computer Science (TCS) (Aug. 2002), pp. 448--460.
[23]
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.
[24]
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.
[25]
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.
[26]
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.
[27]
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.
[28]
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).
[29]
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).
[30]
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).
[31]
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.
[32]
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.
[33]
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.
[34]
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.
[35]
Lu, Y., and Potter, J. Flexible ownership types with owner variance. In Proceedings of European Conference on Object-Oriented Programming (ECOOP) (2006).
[36]
Lu, Y., and Potter, J. Protecting representation with effect encapsulation. In Proceedings of ACM Symposium on Principles of Programming Languages (POPL) (2006).
[37]
Milner, R. Theory of type polymorphism in programming. Journal of Computer and System Sciences 17(3) (1978), 348--375.
[38]
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.
[39]
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).
[40]
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.
[41]
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).
[42]
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.
[43]
Pierce, B. C. Types and Programming Languages. MIT Press, 2002.
[44]
Potanin, A. Ownership Generic Java Download. http://www.mcs.vuw.ac.nz/~ alex/ogj/, 2005.
[45]
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.
[46]
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.
[47]
Potanin, A., Noble, J., Clarke, D., and Biddle, R. Featherweight Generic Confinement. Journal of Functional Programming (2006). Accepted for publication.
[48]
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.
[49]
Pugh, B. Find Bugs - A Bug Pattern Detector for Java. www.cs.umd.edu/~pugh/jva/bugs/, 2003.
[50]
Sun Microsystems. Java Development Kit. Available at: http://java.sun.com/j2se/, 2005.
[51]
Talpin, J.-P., and Jouvelot, P. Polymorphic type, region, and effect inference. Journal of Functional Programming 2, 3 (July 1992), 245--271.
[52]
Tofte, M., and Talpin, J.-P. Region-Based Memory Management. Information and Computation 132, 2 (1997), 109--176.
[53]
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.
[54]
Vitek, J., and Bokowski, B. Confined Types in Java. Software Practice & Experience 31, 6 (May 2001), 507--532.
[55]
Zhao, T., Palsberg, J., and Vitek, J. Type-Based Confinement. Journal of Functional Programming 16, 1 (2006), 83--128.

Cited By

View all
  • (2024)Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic ProgramsProceedings of the ACM on Programming Languages10.1145/36328568:POPL(393-424)Online publication date: 5-Jan-2024
  • (2019)CallƐ: an effect system for method callsProceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3359591.3359731(32-45)Online publication date: 23-Oct-2019
  • (2019)A security feature framework for programming languages to minimize application layer vulnerabilitiesSECURITY AND PRIVACY10.1002/spy2.953:1Online publication date: 7-Nov-2019
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

OOPSLA '06: Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
October 2006
514 pages
ISBN:1595933484
DOI:10.1145/1167473
  • ACM SIGPLAN Notices  Volume 41, Issue 10
    Proceedings of the 2006 OOPSLA Conference
    October 2006
    480 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1167515
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 16 October 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Java
  2. generics
  3. ownership
  4. type systems

Qualifiers

  • Article

Conference

OOPSLA06
Sponsor:

Acceptance Rates

Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)20
  • Downloads (Last 6 weeks)3
Reflects downloads up to 25 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Polymorphic Reachability Types: Tracking Freshness, Aliasing, and Separation in Higher-Order Generic ProgramsProceedings of the ACM on Programming Languages10.1145/36328568:POPL(393-424)Online publication date: 5-Jan-2024
  • (2019)CallƐ: an effect system for method callsProceedings of the 2019 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3359591.3359731(32-45)Online publication date: 23-Oct-2019
  • (2019)A security feature framework for programming languages to minimize application layer vulnerabilitiesSECURITY AND PRIVACY10.1002/spy2.953:1Online publication date: 7-Nov-2019
  • (2013)Location types for safe programming with near and far referencesAliasing in Object-Oriented Programming10.5555/2554511.2554534(471-500)Online publication date: 1-Jan-2013
  • (2013)ImmutabilityAliasing in Object-Oriented Programming10.5555/2554511.2554525(233-269)Online publication date: 1-Jan-2013
  • (2013)Object graphs with ownership domainsAliasing in Object-Oriented Programming10.5555/2554511.2554519(109-155)Online publication date: 1-Jan-2013
  • (2013)Understanding ownership types with dependent typesAliasing in Object-Oriented Programming10.5555/2554511.2554518(84-108)Online publication date: 1-Jan-2013
  • (2013)Ownership typesAliasing in Object-Oriented Programming10.5555/2554511.2554516(15-58)Online publication date: 1-Jan-2013
  • (2013)Confinement framework for encapsulating objectsFrontiers of Computer Science: Selected Publications from Chinese Universities10.1007/s11704-013-1259-77:2(236-256)Online publication date: 1-Apr-2013
  • (2013)ImmutabilityAliasing in Object-Oriented Programming. Types, Analysis and Verification10.1007/978-3-642-36946-9_9(233-269)Online publication date: 2013
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy