Skip to main content

A Safe Implementation of Dynamic Overloading in Java-Like Languages

  • Conference paper
Fundamentals of Software Engineering (FSEN 2009)

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

Included in the following conference series:

  • 490 Accesses

Abstract

We present a general technique for extending Java-like languages with dynamic overloading, where method selection depends on the dynamic type of the parameter, instead of just the receiver. To this aim we use a core Java-language enriched with encapsulated multi-methods and dynamic overloading. Then we define an algorithm which translates programs to standard Java code using only basic mechanisms of static overloading and dynamic binding. The translated programs are semantically equivalent to the original versions and preserve type safety.

This work has been partially supported by the MIUR project EOS DUE.

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

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  1. Ancona, D., Drossopoulou, S., Zucca, E.: Overloading and Inheritance. In: FOOL 8 (2001)

    Google Scholar 

  2. Bettini, L., Capecchi, S., Venneri, B.: Featherweight Java with Dynamic and Static Overloading. Science of Computer Programming 74(5-6), 261–278. Elsevier, Amsterdam (2009)

    Article  MATH  Google Scholar 

  3. Bettini, L., Capecchi, S., Venneri, B.: Double Dispatch in C++. Software: Practice and Experience 36(6), 581–613 (2006)

    Article  Google Scholar 

  4. Boyland, J., Castagna, G.: Parasitic Methods: Implementation of Multi-Methods for Java. In: Proc. of OOPSLA, pp. 66–76. ACM, New York (1997)

    Chapter  Google Scholar 

  5. Castagna, G.: Object-Oriented Programming: A Unified Foundation. Progress in Theoretical Computer Science. Birkhauser, Basel (1997)

    Google Scholar 

  6. Clifton, C., Millstein, T., Leavens, G.T., Chambers, C.: MultiJava: Design rationale, compiler implementation, and applications. ACM Trans. Prog. Lang. Syst. 28(3) (May 2006)

    Google Scholar 

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

    Article  Google Scholar 

  8. Ingalls, D.: A Simple Technique for Handling Multiple Polymorphism. In: Proc. OOPSLA, pp. 347–349. ACM Press, New York (1986)

    Google Scholar 

  9. Millstein, T., Reay, M., Chambers, C.: Relaxed multijava: balancing extensibility and modular typechecking. SIGPLAN Not. 38(11), 224–240 (2003)

    Article  Google Scholar 

  10. Pirkelbauer, P., Solodkyy, Y., Stroustrup, B.: Open multi-methods for C++. In: GPCE, pp. 123–134. ACM, New York (2007)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bettini, L., Capecchi, S., Venneri, B. (2010). A Safe Implementation of Dynamic Overloading in Java-Like Languages. In: Arbab, F., Sirjani, M. (eds) Fundamentals of Software Engineering. FSEN 2009. Lecture Notes in Computer Science, vol 5961. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-11623-0_29

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-11623-0_29

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-11622-3

  • Online ISBN: 978-3-642-11623-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics

  NODES
INTERN 1
Note 2
Project 1