Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1007/978-3-642-03013-0_24guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

Type-Based Object Immutability with Flexible Initialization

Published: 30 July 2009 Publication History

Abstract

We present a type system for checking object immutability, read-only references, and class immutability in an open or closed world. To allow object initialization outside object constructors (which is often needed in practice), immutable objects are initialized in lexically scoped regions. The system is simple and direct; its only type qualifiers specify immutability properties. No auxiliary annotations, e.g., ownership types, are needed, yet good support for deep immutability is provided. To express object confinement, as required for class immutability in an open world, we use qualifier polymorphism. The system has two versions: one with explicit specification commands that delimit the object initialization phase, and one where such commands are implicit and inferred. In the latter version, all annotations are compatible with Java's extended annotation syntax, as proposed in JSR 308.

References

[1]
Barnett, M., DeLine, R., Fähndrich, M., Leino, K.R.M., Schulte, W.: Verification of object-oriented programs with invariants. Journal of Object Technology 3(6), 27-56 (2004).
[2]
Bierhoff, K., Aldrich, J.: Modular typestate verification of aliased objects. In: OOPSLA, pp. 301-320 (2007).
[3]
Bloch, J.: Effective Java. Addison-Wesley, Reading (2001).
[4]
Boyapati, C.: SafeJava: A Unified Type System for Safe Programming. Ph.D thesis, MIT (2004).
[5]
Boyland, J.: Checking interference with fractional permissions. In: Cousot, R. (ed.) SAS 2003. LNCS, vol. 2694, pp. 55-72. Springer, Heidelberg (2003).
[6]
Boyland, J., Noble, J., Retert, W.: Capabilities for sharing: A generalisation of uniqueness and read-only. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 2-27. Springer, Heidelberg (2001).
[7]
Boyland, J., Retert, W.: Connecting effects and uniqueness with adoption. In: POPL, pp. 283-295 (2005).
[8]
Clarke, D., Potter, J., Noble, J.: Ownership types for flexible alias protection. In: OOPSLA, pp. 48-64 (1998).
[9]
Clarke, D., Wrigstad, T.: External uniqueness is unique enough. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 176-200. Springer, Heidelberg (2003).
[10]
Crary, K., Walker, D., Morrisett, G.: Typed memory management in a calculus of capabilities. In: POPL, pp. 262-275 (1999).
[11]
DeLine, R., Fähndrich, M.: Enforcing high-level protocols in low-level software. In: PLDI, pp. 59-69 (2001).
[12]
Dietl, W., Drossopoulou, S., Müller, P.: Generic universe types. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 28-53. Springer, Heidelberg (2007).
[13]
Fähndrich, M., Leino, K.R.M.: Declaring and checking non-null types in an object-oriented language. In: OOPSLA, pp. 302-312. ACM Press, New York (2003).
[14]
Fähndrich, M., Xia, S.: Establishing object invariants with delayed types. In: OOPSLA, pp. 337-350. ACM, New York (2007).
[15]
Felleisen, M., Friedman, D.: A Little Java, A Few Patterns. MIT Press, Cambridge (1997).
[16]
Grossman, D., Morrisett, G., Jim, T., Hicks, M., Wang, Y., Cheney, J.: Region-based memory management in Cyclone. In: PLDI, pp. 282-293 (2002).
[17]
Haack, C., Poll, E.: Type-based object immutability with flexible initialization. Technical Report ICIS-R09001, Radboud University, Nijmegen (January 2009).
[18]
Haack, C., Poll, E., Schäfer, J., Schubert, A.: Immutable objects for a Java-like language. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 347-362. Springer, Heidelberg (2007).
[19]
JSR 308 Expert Group. Annotations on Java types. Java specification request, Java Community Process (December 2007).
[20]
Leino, K.R.M., Müller, P., Wallenburg, A.: Flexible immutability with frozen objects. In: Shankar, N., Woodcock, J. (eds.) VSTTE 2008. LNCS, vol. 5295, pp. 192-208. Springer, Heidelberg (2008).
[21]
Müller, P., Poetzsch-Heffter, A.: Universes: A type system for alias and dependency control. Technical Report 279, Fernuniversität Hagen (2001).
[22]
Östlund, J., Wrigstad, T., Clarke, D., Åkerblom, B.: Ownership, uniqueness, and immutability. In: TOOLS Europe, pp. 178-197 (2008).
[23]
Papi, M., Ali, M., Correa, T., Perkins, J., Ernst, M.: Practical pluggable types for Java. In: International Symposium on Software Testing and Analysis, pp. 201-212 (2008).
[24]
Pechtchanski, I., Sarkar, V.: Immutability specification and applications. Concurrency and Computation: Practice and Experience 17, 639-662 (2005).
[25]
Porat, S., Biberstein, M., Koved, L., Mendelson, B.: Automatic detection of immutable fields in Java. In: CASCON 2002. IBM Press (2000).
[26]
Potanin, A., Noble, J., Clarke, D., Biddle, R.: Featherweight generic confinement. J. Funct. Program. 16(6), 793-811 (2006).
[27]
Potanin, A., Noble, J., Clarke, D., Biddle, R.: Generic ownership for generic Java. In: OOPSLA, pp. 311-324 (2006).
[28]
Qi, X., Myers, A.: Masked types for sound object initialization. In: POPL. ACM, New York (2009).
[29]
Smith, F., Walker, D., Morrisett, G.: Alias types. In: Smolka, G. (ed.) ESOP 2000. LNCS, vol. 1782, pp. 366-381. Springer, Heidelberg (2000).
[30]
Tofte, M., Talpin, J.-P.: Region-based memory management. Information and Computation 132(2), 109-176 (1997).
[31]
Unkel, C., Lam, M.: Automatic inference of stationary fields: a generalization of Java's final fields. In: POPL, pp. 183-195. ACM, New York (2008).
[32]
Vitek, J., Bokowski, B.: Confined types in Java. Softw. Pract. Exper. 31(6), 507-532 (2001).
[33]
Wrigstad, T.: Ownership-Based Alias Management. Ph.D thesis, KTH Stockholm (2006).
[34]
Zibin, Y., Potanin, A., Ali, M., Artzi, S., Kiezun, A., Ernst, M.: Object and reference immutability using Java generics. In: ESEC/FSE 2007, pp. 75-84. ACM, New York (2007).

Cited By

View all
  • (2020)ιDOT: a DOT calculus with object initializationProceedings of the ACM on Programming Languages10.1145/34282764:OOPSLA(1-28)Online publication date: 13-Nov-2020
  • (2019)Type-Driven Cross-Programming for Android and LEGO Mindstorms InteroperabilityComputer Information Systems and Industrial Management10.1007/978-3-030-28957-7_17(191-209)Online publication date: 19-Sep-2019
  • (2018)Interdisciplinary programming language designProceedings of the 2018 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3276954.3276965(133-146)Online publication date: 24-Oct-2018
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image Guide Proceedings
Genoa: Proceedings of the 23rd European Conference on ECOOP 2009 --- Object-Oriented Programming
July 2009
629 pages
ISBN:9783642030123
  • Editor:
  • Sophia Drossopoulou

Publisher

Springer-Verlag

Berlin, Heidelberg

Publication History

Published: 30 July 2009

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 06 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2020)ιDOT: a DOT calculus with object initializationProceedings of the ACM on Programming Languages10.1145/34282764:OOPSLA(1-28)Online publication date: 13-Nov-2020
  • (2019)Type-Driven Cross-Programming for Android and LEGO Mindstorms InteroperabilityComputer Information Systems and Industrial Management10.1007/978-3-030-28957-7_17(191-209)Online publication date: 19-Sep-2019
  • (2018)Interdisciplinary programming language designProceedings of the 2018 ACM SIGPLAN International Symposium on New Ideas, New Paradigms, and Reflections on Programming and Software10.1145/3276954.3276965(133-146)Online publication date: 24-Oct-2018
  • (2016)Flexible initialization of immutable objectsCompanion Proceedings of the 2016 ACM SIGPLAN International Conference on Systems, Programming, Languages and Applications: Software for Humanity10.1145/2984043.2998541(53-54)Online publication date: 20-Oct-2016
  • (2016)Refinement types for TypeScriptACM SIGPLAN Notices10.1145/2980983.290811051:6(310-325)Online publication date: 2-Jun-2016
  • (2016)Inference and Checking of Object ImmutabilityProceedings of the 13th International Conference on Principles and Practices of Programming on the Java Platform: Virtual Machines, Languages, and Tools10.1145/2972206.2972208(1-12)Online publication date: 29-Aug-2016
  • (2016)Refinement types for TypeScriptProceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/2908080.2908110(310-325)Online publication date: 2-Jun-2016
  • (2016)Exploring language support for immutabilityProceedings of the 38th International Conference on Software Engineering10.1145/2884781.2884798(736-747)Online publication date: 14-May-2016
  • (2013)ImmutabilityAliasing in Object-Oriented Programming10.5555/2554511.2554525(233-269)Online publication date: 1-Jan-2013
  • (2013)The billion-dollar fixProceedings of the 27th European conference on Object-Oriented Programming10.1007/978-3-642-39038-8_9(205-229)Online publication date: 1-Jul-2013
  • Show More Cited By

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media