Skip to main content

Advertisement

SpringerLink
Log in
Menu
Find a journal Publish with us Track your research
Search
Cart
Book cover

European Symposium on Programming

ESOP 2007: Programming Languages and Systems pp 347–362Cite as

  1. Home
  2. Programming Languages and Systems
  3. Conference paper
Immutable Objects for a Java-Like Language

Immutable Objects for a Java-Like Language

  • C. Haack1,
  • E. Poll1,
  • J. Schäfer2 &
  • …
  • A. Schubert1,3 
  • Conference paper
  • 1105 Accesses

  • 12 Citations

  • 3 Altmetric

Part of the Lecture Notes in Computer Science book series (LNTCS,volume 4421)

Abstract

We extend a Java-like language with immutability specifications and a static type system for verifying immutability. A class modifier immutable specifies that all class instances are immutable objects. Ownership types specify the depth of object states and enforce encapsulation of representation objects. The type system guarantees that the state of immutable objects does not visibly mutate during a program run. Provided immutability-annotated classes and methods are final, this is true even if immutable classes are composed with untrusted classes that follow Java’s type system, but not our immutability type system.

Keywords

  • Type System
  • Object State
  • Representation Object
  • Operational Semantic
  • Ownership Type

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Chapter PDF

Download to read the full chapter text

References

  1. Birka, A., Ernst, M.D.: A practical type system and language for reference immutability. In: OOPSLA’04, October 26–28, 2004, pp. 35–49 (2004)

    Google Scholar 

  2. Bloch, J.: Effective Java. Addison-Wesley, Reading (2001)

    Google Scholar 

  3. Boyapati, C., Liskov, B., Shrira, L.: Ownership types for object encapsulation. In: POPL’03, pp. 213–223 (2003)

    Google Scholar 

  4. Clarke, D., Drossopoulou, S.: Ownership, encapsulation and the disjointness of type and effect. In: OOPSLA’02, pp. 292–310 (2002)

    Google Scholar 

  5. Clarke, D., Potter, J., Noble, J.: Ownership types for flexible alias protection. In: OOPSLA’98, pp. 48–64 (1998)

    Google Scholar 

  6. Dietl, W., Müller, P.: Universes: Lightweight ownership for JML. Journal of Object Technology (JOT) 4(8), 5–32 (2005)

    Google Scholar 

  7. Goetz, B.: Java theory and practice: Safe construction techniques–don’t let the ”this” reference escape during construction. IBM DevelopersWork (2002), http://www-106.ibm.com/developerworks/java/library/j-jtp0618.html

  8. Haack, C., et al.: Immutable objects for a Java-like language. Technical report, Radboud University Nijmegen, Forthcoming (2007)

    Google Scholar 

  9. Igarashi, A., Pierce, B., Wadler, P.: Featherweight Java: a minimal core calculus for Java and GJ. ACM TOPLAS 23(3), 396–450 (2001), doi:10.1145/503502.503505

    CrossRef  Google Scholar 

  10. Lu, Y., Potter, J.: On ownership and accessibility. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 99–123. Springer, Heidelberg (2006)

    CrossRef  Google Scholar 

  11. Lu, Y., Potter, J.: Protecting representation with effect encapsulation. In: POPL’06, pp. 359–371. ACM Press, New York (2006)

    Google Scholar 

  12. Müller, P., Poetzsch-Heffter, A.: Universes: A type system for alias and dependency control. Technical Report 279, Fernuniversität Hagen (2001)

    Google Scholar 

  13. Porat, S., et al.: Automatic detection of immutable fields in Java. In: CASCON’02, IBM Press, Indianapolis (2000)

    Google Scholar 

  14. Pechtchanski, I., Sarkar, V.: Immutability specification and applications. Concurrency and Computation: Practice and Experience 17, 639–662 (2005)

    CrossRef  Google Scholar 

  15. Schäfer, J.: Encapsulation and specification of object-oriented runtime components. Master’s thesis, Technische Universität Kaiserslautern (2004)

    Google Scholar 

  16. Salcianu, A., Rinard, M.C.: Purity and side effect analysis for Java programs. In: Cousot, R. (ed.) VMCAI 2005. LNCS, vol. 3385, pp. 199–215. Springer, Heidelberg (2005)

    Google Scholar 

  17. Tschantz, M.S., Ernst, M.D.: Javari: Adding reference immutability to Java. In: OOPSLA’05, October 18–20, 2005, pp. 211–230 (2005)

    Google Scholar 

  18. Vitek, J., Bokowski, B.: Confined types in Java. Softw. Pract. Exper. 31(6), 507–532 (2001)

    CrossRef  MATH  Google Scholar 

  19. Wright, A.K., Felleisen, M.: A syntactic approach to type soundness. Information and Computation 115(1), 38–94 (1994)

    CrossRef  MATH  MathSciNet  Google Scholar 

  20. Zhao, T., Palsberg, J., Vitek, J.: Type-based confinement. Journal of Functional Programming 16(1), 83–128 (2006)

    CrossRef  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

  1. Radboud Universiteit Nijmegen, The Netherlands

    C. Haack, E. Poll & A. Schubert

  2. Technische Universität Kaiserlautern, Germany

    J. Schäfer

  3. Warsaw University, Poland

    A. Schubert

Authors
  1. C. Haack
    View author publications

    You can also search for this author in PubMed Google Scholar

  2. E. Poll
    View author publications

    You can also search for this author in PubMed Google Scholar

  3. J. Schäfer
    View author publications

    You can also search for this author in PubMed Google Scholar

  4. A. Schubert
    View author publications

    You can also search for this author in PubMed Google Scholar

Editor information

Rocco De Nicola

Rights and permissions

Reprints and Permissions

Copyright information

© 2007 Springer Berlin Heidelberg

About this paper

Cite this paper

Haack, C., Poll, E., Schäfer, J., Schubert, A. (2007). Immutable Objects for a Java-Like Language. In: De Nicola, R. (eds) Programming Languages and Systems. ESOP 2007. Lecture Notes in Computer Science, vol 4421. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-71316-6_24

Download citation

  • .RIS
  • .ENW
  • .BIB
  • DOI: https://doi.org/10.1007/978-3-540-71316-6_24

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-71314-2

  • Online ISBN: 978-3-540-71316-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Share this paper

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

Publish with us

Policies and ethics

search

Navigation

  • Find a journal
  • Publish with us
  • Track your research

Discover content

  • Journals A-Z
  • Books A-Z

Publish with us

  • Publish your research
  • Open access publishing

Products and services

  • Our products
  • Librarians
  • Societies
  • Partners and advertisers

Our imprints

  • Springer
  • Nature Portfolio
  • BMC
  • Palgrave Macmillan
  • Apress
  • Your US state privacy rights
  • Accessibility statement
  • Terms and conditions
  • Privacy policy
  • Help and support
  • Cancel contracts here

167.114.118.210

Not affiliated

Springer Nature

© 2023 Springer Nature