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.

A safe implementation of dynamic overloading in Java-like languages

BETTINI, LORENZO;CAPECCHI, SARA;
2010-01-01

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.
2010
Inglese
contributo
1 - Conferenza
FSEN
Kish Island, Persian Gulf, Iran
15 - 17 April, 2009
Internazionale
Arbab, Farhad and Sirjani, Marjan
Fundamentals of Software Engineering, FSEN'09 Proceedings of the Third IPM international conference on Fundamentals of Software Engineering
Esperti anonimi
Springer
Berlin
GERMANIA
5961
455
462
8
9783642116223
ITALIA
3
info:eu-repo/semantics/conferenceObject
04-CONTRIBUTO IN ATTI DI CONVEGNO::04A-Conference paper in volume
Lorenzo Bettini; Sara Capecchi; Betti Venneri
273
none
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2318/124536
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? 0
social impact