Costrutti ed Applicazioni di Programmazione Generica in Linguaggi Object-Oriented

Generic programming is likely to become a new challenge for a critical mass of developers. Therefore, it is crucial to refine the support for generic programming in mainstream Object-Oriented languages — both at the design and at the implementation level — as well as to suggest novel ways to exploit...

Full description

Bibliographic Details
Main Author: Cimadamore, Maurizio <1979>
Other Authors: Natali, Antonio
Format: Doctoral Thesis
Language:en
Published: Alma Mater Studiorum - Università di Bologna 2010
Subjects:
Online Access:http://amsdottorato.unibo.it/2476/
id ndltd-unibo.it-oai-amsdottorato.cib.unibo.it-2476
record_format oai_dc
spelling ndltd-unibo.it-oai-amsdottorato.cib.unibo.it-24762014-03-24T16:28:27Z Costrutti ed Applicazioni di Programmazione Generica in Linguaggi Object-Oriented Cimadamore, Maurizio <1979> ING-INF/05 Sistemi di elaborazione delle informazioni Generic programming is likely to become a new challenge for a critical mass of developers. Therefore, it is crucial to refine the support for generic programming in mainstream Object-Oriented languages — both at the design and at the implementation level — as well as to suggest novel ways to exploit the additional degree of expressiveness made available by genericity. This study is meant to provide a contribution towards bringing Java genericity to a more mature stage with respect to mainstream programming practice, by increasing the effectiveness of its implementation, and by revealing its full expressive power in real world scenario. With respect to the current research setting, the main contribution of the thesis is twofold. First, we propose a revised implementation for Java generics that greatly increases the expressiveness of the Java platform by adding reification support for generic types. Secondly, we show how Java genericity can be leveraged in a real world case-study in the context of the multi-paradigm language integration. Several approaches have been proposed in order to overcome the lack of reification of generic types in the Java programming language. Existing approaches tackle the problem of reification of generic types by defining new translation techniques which would allow for a runtime representation of generics and wildcards. Unfortunately most approaches suffer from several problems: heterogeneous translations are known to be problematic when considering reification of generic methods and wildcards. On the other hand, more sophisticated techniques requiring changes in the Java runtime, supports reified generics through a true language extension (where clauses) so that backward compatibility is compromised. In this thesis we develop a sophisticated type-passing technique for addressing the problem of reification of generic types in the Java programming language; this approach — first pioneered by the so called EGO translator — is here turned into a full-blown solution which reifies generic types inside the Java Virtual Machine (JVM) itself, thus overcoming both performance penalties and compatibility issues of the original EGO translator. Java-Prolog integration Integrating Object-Oriented and declarative programming has been the subject of several researches and corresponding technologies. Such proposals come in two flavours, either attempting at joining the two paradigms, or simply providing an interface library for accessing Prolog declarative features from a mainstream Object-Oriented languages such as Java. Both solutions have however drawbacks: in the case of hybrid languages featuring both Object-Oriented and logic traits, such resulting language is typically too complex, thus making mainstream application development an harder task; in the case of library-based integration approaches there is no true language integration, and some “boilerplate code” has to be implemented to fix the paradigm mismatch. In this thesis we develop a framework called PatJ which promotes seamless exploitation of Prolog programming in Java. A sophisticated usage of generics/wildcards allows to define a precise mapping between Object-Oriented and declarative features. PatJ defines a hierarchy of classes where the bidirectional semantics of Prolog terms is modelled directly at the level of the Java generic type-system. Alma Mater Studiorum - Università di Bologna Natali, Antonio 2010-04-30 Doctoral Thesis PeerReviewed application/pdf en http://amsdottorato.unibo.it/2476/ info:eu-repo/semantics/openAccess
collection NDLTD
language en
format Doctoral Thesis
sources NDLTD
topic ING-INF/05 Sistemi di elaborazione delle informazioni
spellingShingle ING-INF/05 Sistemi di elaborazione delle informazioni
Cimadamore, Maurizio <1979>
Costrutti ed Applicazioni di Programmazione Generica in Linguaggi Object-Oriented
description Generic programming is likely to become a new challenge for a critical mass of developers. Therefore, it is crucial to refine the support for generic programming in mainstream Object-Oriented languages — both at the design and at the implementation level — as well as to suggest novel ways to exploit the additional degree of expressiveness made available by genericity. This study is meant to provide a contribution towards bringing Java genericity to a more mature stage with respect to mainstream programming practice, by increasing the effectiveness of its implementation, and by revealing its full expressive power in real world scenario. With respect to the current research setting, the main contribution of the thesis is twofold. First, we propose a revised implementation for Java generics that greatly increases the expressiveness of the Java platform by adding reification support for generic types. Secondly, we show how Java genericity can be leveraged in a real world case-study in the context of the multi-paradigm language integration. Several approaches have been proposed in order to overcome the lack of reification of generic types in the Java programming language. Existing approaches tackle the problem of reification of generic types by defining new translation techniques which would allow for a runtime representation of generics and wildcards. Unfortunately most approaches suffer from several problems: heterogeneous translations are known to be problematic when considering reification of generic methods and wildcards. On the other hand, more sophisticated techniques requiring changes in the Java runtime, supports reified generics through a true language extension (where clauses) so that backward compatibility is compromised. In this thesis we develop a sophisticated type-passing technique for addressing the problem of reification of generic types in the Java programming language; this approach — first pioneered by the so called EGO translator — is here turned into a full-blown solution which reifies generic types inside the Java Virtual Machine (JVM) itself, thus overcoming both performance penalties and compatibility issues of the original EGO translator. Java-Prolog integration Integrating Object-Oriented and declarative programming has been the subject of several researches and corresponding technologies. Such proposals come in two flavours, either attempting at joining the two paradigms, or simply providing an interface library for accessing Prolog declarative features from a mainstream Object-Oriented languages such as Java. Both solutions have however drawbacks: in the case of hybrid languages featuring both Object-Oriented and logic traits, such resulting language is typically too complex, thus making mainstream application development an harder task; in the case of library-based integration approaches there is no true language integration, and some “boilerplate code” has to be implemented to fix the paradigm mismatch. In this thesis we develop a framework called PatJ which promotes seamless exploitation of Prolog programming in Java. A sophisticated usage of generics/wildcards allows to define a precise mapping between Object-Oriented and declarative features. PatJ defines a hierarchy of classes where the bidirectional semantics of Prolog terms is modelled directly at the level of the Java generic type-system.
author2 Natali, Antonio
author_facet Natali, Antonio
Cimadamore, Maurizio <1979>
author Cimadamore, Maurizio <1979>
author_sort Cimadamore, Maurizio <1979>
title Costrutti ed Applicazioni di Programmazione Generica in Linguaggi Object-Oriented
title_short Costrutti ed Applicazioni di Programmazione Generica in Linguaggi Object-Oriented
title_full Costrutti ed Applicazioni di Programmazione Generica in Linguaggi Object-Oriented
title_fullStr Costrutti ed Applicazioni di Programmazione Generica in Linguaggi Object-Oriented
title_full_unstemmed Costrutti ed Applicazioni di Programmazione Generica in Linguaggi Object-Oriented
title_sort costrutti ed applicazioni di programmazione generica in linguaggi object-oriented
publisher Alma Mater Studiorum - Università di Bologna
publishDate 2010
url http://amsdottorato.unibo.it/2476/
work_keys_str_mv AT cimadamoremaurizio1979 costruttiedapplicazionidiprogrammazionegenericainlinguaggiobjectoriented
_version_ 1716654110694965248