Skip to main content

FJMIP: A Calculus for a Modular Object Initialization

  • Conference paper
Fundamentals of Computation Theory (FCT 2007)

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

Included in the following conference series:

Abstract

In most mainstream object-oriented languages, the object initialization protocol is based on constructors, where different constructors of the same class are, in fact, overloaded variants of the same method. This approach has some disadvantages: it forces an exponential growth of the code with respect to the number of properties, it may cause duplication of code, and it may create unnecessary code dependencies.

To the best of our knowledge, the literature lacks formal proposals that model non-trivial object initialization protocols.

In this paper we present a calculus (called FJMIP), which is an extension of the Igarashi-Pierce-Wadler Featherweight Java and models a novel object initialization protocol. Our calculus is reasonably simple, but it offers two benefits: (i) it formalizes a modular way of initializing objects that does not suffer from the previous mentioned flaws, while still being an expressive object initialization protocol; (ii) as a by-product, it allowed us to introduce a novel technique to prove that our object initialization process actually initializes all the fields of an object.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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. Abadi, M., Cardelli, L.: A Theory of Objects. Springer, Heidelberg (1996)

    MATH  Google Scholar 

  2. Bono, V., Kuśmierek, J.: Featherweight JavaMIP: a calculus for a modular object initialization protocol. Manuscript (2007), available at http://www.di.unito.it/~bono/papers/FWJavaMIP.pdf

  3. Bono, V., Kuśmierek, J.: Modularizing constructors. In: Proc. TOOLS 2007 (to appear, 2007)

    Google Scholar 

  4. Bruce, K.B.: Foundations of Object-Oriented Languages: Types and Semantics. MIT Press, Cambridge (2002)

    Google Scholar 

  5. Fisher, K., Honsell, F., Mitchell, J.C.: A lambda-calculus of objects and method specialization. Nordic J. of Computing, 1(1), 3–37 (1994). Preliminary version appeared In: Proc. LICS 1993, pp. 26–38 (1993)

    Google Scholar 

  6. Fisher, K., Mitchell, J.C.: A delegation-based object calculus with subtyping. In: Proc. FCT 1995, vol. 965, pp. 42–61. Springer, Heidelberg (1995)

    Google Scholar 

  7. Flatt, M., Krishnamurthi, S., Felleisen, M.: Classes and Mixins. In: Proc. POPL 1998, pp. 171–183. ACM Press, New York (1998)

    Chapter  Google Scholar 

  8. Igarashi, A., Pierce, B., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. ACM SIGPLAN Transactions on Programming Languages and Systems (TOPLAS), 23(3) (May 2001)

    Google Scholar 

  9. Kuśmierek, J., Bono, V.: A modular object initialization protocol. Manuscript (2006), available at http://www.di.unito.it/~bono/papers/JavaMIP02.pdf

  10. Monteferrante, G.: javamip2java: A preprocessor for the JavaMIP language(2006), Available at http://www.di.unito.it/~bono/papers/javamip/

Download references

Author information

Authors and Affiliations

Authors

Editor information

Erzsébet Csuhaj-Varjú Zoltán Ésik

Rights and permissions

Reprints and permissions

Copyright information

© 2007 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bono, V., Kuśmierek, J.D.M. (2007). FJMIP: A Calculus for a Modular Object Initialization. In: Csuhaj-Varjú, E., Ésik, Z. (eds) Fundamentals of Computation Theory. FCT 2007. Lecture Notes in Computer Science, vol 4639. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-74240-1_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-74240-1_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-74239-5

  • Online ISBN: 978-3-540-74240-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics