Skip to main content

Object Initialization in X10

  • Conference paper
ECOOP 2012 – Object-Oriented Programming (ECOOP 2012)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7313))

Included in the following conference series:

Abstract

X10 is an object oriented programming language with a sophisticated type system (constraints, class invariants, non-erased generics, closures) and concurrency constructs (asynchronous activities, multiple places). Object initialization is a cross-cutting concern that interacts with all of these features in delicate ways that may cause type, runtime, and security errors. This paper discusses possible designs for object initialization, and the “hardhat” design chosen and implemented in X10 version 2.2. Our implementation includes a fixed-point inter-procedural (intra-class) data-flow analysis that infers, for each method called during initialization, the set of fields that are read, and those that are asynchronously and synchronously assigned. Our codebase of more than 200K lines of code only had 104 annotations. Finally, we formalize the essence of initialization checking with an effect system intended to complement a standard FJ style formalization of the type system for X10. This system is substantially simpler than the masked types of [10], and it is more practical (for X10) than the free-committed types of [12]. This is the first formalization of a type and (flow-sensitive) effect system for safe initialization in the presence of concurrency constructs.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Bocchino Jr., R.L., Adve, V.S., Dig, D., Adve, S.V., Heumann, S., Komuravelli, R., Overbey, J., Simmons, P., Sung, H., Vakilian, M.: A type and effect system for deterministic parallel java. In: OOPSLA 2009, pp. 97–116. ACM, New York (2009)

    Chapter  Google Scholar 

  2. Dean, D., Felten, E., Wallach, D.S.: Java security: From hotjava to netscape and beyond. In: IEEE Symposium on Security and Privacy, pp. 190–200 (1996)

    Google Scholar 

  3. Fähndrich, M., Leino, K.R.M.: Declaring and checking non-null types in an object-oriented language. In: OOPSLA 2003, pp. 302–312 (2003)

    Google Scholar 

  4. Fähndrich, M., Xia, S.: Establishing object invariants with delayed types. In: OOPSLA 2007, pp. 337–350 (2007)

    Google Scholar 

  5. Gil, J., Itai, A.: The Complexity of Type Analysis of Object Oriented Programs. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 601–634. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  6. Gil, J.Y., Shragai, T.: Are We Ready for a Safer Construction Environment? In: Drossopoulou, S. (ed.) ECOOP 2009. LNCS, vol. 5653, pp. 495–519. Springer, Heidelberg (2009)

    Chapter  Google Scholar 

  7. Hubert, L., Jensen, T., Monfort, V., Pichardie, D.: Enforcing Secure Object Initialization in Java. In: Gritzalis, D., Preneel, B., Theoharidou, M. (eds.) ESORICS 2010. LNCS, vol. 6345, pp. 101–115. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  8. Matsakis, N.D., Gross, T.R.: A time-aware type system for data-race protection and guaranteed initialization. In: OOPSLA 2010, pp. 634–651 (2010)

    Google Scholar 

  9. Pugh, W.: JSR 133: Java memory model and thread specification revision (2004), http://jcp.org/en/jsr/detail?id=133

  10. Qi, X., Myers, A.C.: Masked types for sound object initialization. In: POPL 2009, pp. 53–65 (2009)

    Google Scholar 

  11. Seo, S., Kim, Y., Kang, H.-G., Han, T.: A static bug detector for uninitialized field references in java programs. IEICE - Trans. Inf. Syst. E90-D, 1663–1671 (2007)

    Article  Google Scholar 

  12. Summers, A.J., Müller, P.: Freedom before commitment - a lightweight type system for object initialisation. In: OOPSLA 2011 (2011)

    Google Scholar 

  13. Yang, X., Blackburn, S.M., Frampton, D., Sartor, J.B., McKinley, K.S.: Why nothing matters: the impact of zeroing. In: OOPSLA 2011, pp. 307–324. ACM, New York (2011)

    Google Scholar 

  14. Zibin, Y., Potanin, A., Li, P., Ali, M., Ernst, M.D.: Ownership and immutability in generic java. In: OOPSLA 2010, pp. 598–617 (2010)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Zibin, Y., Cunningham, D., Peshansky, I., Saraswat, V. (2012). Object Initialization in X10. In: Noble, J. (eds) ECOOP 2012 – Object-Oriented Programming. ECOOP 2012. Lecture Notes in Computer Science, vol 7313. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-31057-7_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-31057-7_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-31056-0

  • Online ISBN: 978-3-642-31057-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics