Advanced Object-Oriented Language Mechanisms for Variability Management

Classes are often too small units of modularization. In a lot of cases, a cohesive piece of functionality involves a group of related classes. Although mainstream languages provide class grouping mechanisms, such as packages and inner classes in Java, the typical object-oriented techniques, such as...

Full description

Bibliographic Details
Main Author: Gasiūnas, Vaidas
Format: Others
Language:English
en
Published: 2010
Online Access:http://tuprints.ulb.tu-darmstadt.de/2353/1/gasiunas-thesis.pdf
Gasiūnas, Vaidas <http://tuprints.ulb.tu-darmstadt.de/view/person/Gasi==016Bnas=3AVaidas=3A=3A.html> : Advanced Object-Oriented Language Mechanisms for Variability Management. Technische Universität, Darmstadt [Ph.D. Thesis], (2010)
id ndltd-tu-darmstadt.de-oai-tuprints.ulb.tu-darmstadt.de-2353
record_format oai_dc
spelling ndltd-tu-darmstadt.de-oai-tuprints.ulb.tu-darmstadt.de-23532017-03-17T06:35:20Z http://tuprints.ulb.tu-darmstadt.de/2353/ Advanced Object-Oriented Language Mechanisms for Variability Management Gasiūnas, Vaidas Classes are often too small units of modularization. In a lot of cases, a cohesive piece of functionality involves a group of related classes. Although mainstream languages provide class grouping mechanisms, such as packages and inner classes in Java, the typical object-oriented techniques, such as inheritance and subtype polymorphism, are not supported at the scope of such class groups. As a result, variations involving multiple classes must be encoded by variations of individual classes. Such encodings compromise type-safety and produce a considerable amount of glue code, which is often error-prone and not stable. The main statement of this thesis is that by making typical object-oriented techniques available at the scope of a group of classes we can provide a better support for managing variations at that scope. For the purpose of making inheritance and polymorphism available for a group of classes, we rely on the ideas of virtual classes and family polymorphism. A large-scale multiple inheritance is enabled by the propagating mixin composition. In this thesis we present the first implementation of these ideas for Java, and propose improvements to their semantics, namely a more intuitive linearization algorithm for propagating mixin composition and more flexible path-dependent types. We also introduce abstract virtual classes, which increase the advantages of family polymorphism by providing the possibility to describe interfaces for families of classes. Further, we propose a novel concept of dependent classes, which enhances virtual classes in analogous way like multimethods enhance single-dispatch. The multi-dispatch for classes not only enables dispatch of their functionality by multiple constructor parameters, but also generalizes family polymorphism with the possibility to express membership of an object in multiple families. The feasibility of the new concept is validated in two ways. First, we design a concrete language with dependent classes, called DepJ, and implement a type-checker and interpreter for it. Second, we formalize the features of dependent classes in vc^n and DC_C calculi, and verify their soundness and decidability. The expected advantages of virtual classes and dependent classes for variation management are validated by a set of variation scenarios. We explore variations at the scope of individual objects, as well as at the scope of a group of objects. We also investigate interactions of different kinds of variations and analyze specific variation scenarios in the context of object-oriented frameworks. We identify the problems of implementing these scenarios using conventional object-oriented techniques, and show that these problems are resolved by implementations with the advanced techniques. In particular, we show that virtual classes and propagating-mixin composition provide the typical advantages of inheritance for managing variations of a group of objects. Dependent classes provide the typical advantages of multi-dispatch for managing variations of a class. They also generalize the advantages of virtual classes with the possibility to modularize variations of multiple overlapping groups of objects, and provide a better solution for modelling multiple variations of a group of objects. 2010-12-01 Ph.D. Thesis PeerReviewed application/pdf eng Creative Commons: Attribution-Noncommercial-No Derivative Works 3.0 http://tuprints.ulb.tu-darmstadt.de/2353/1/gasiunas-thesis.pdf Gasiūnas, Vaidas <http://tuprints.ulb.tu-darmstadt.de/view/person/Gasi==016Bnas=3AVaidas=3A=3A.html> : Advanced Object-Oriented Language Mechanisms for Variability Management. Technische Universität, Darmstadt [Ph.D. Thesis], (2010) en info:eu-repo/semantics/doctoralThesis info:eu-repo/semantics/openAccess
collection NDLTD
language English
en
format Others
sources NDLTD
description Classes are often too small units of modularization. In a lot of cases, a cohesive piece of functionality involves a group of related classes. Although mainstream languages provide class grouping mechanisms, such as packages and inner classes in Java, the typical object-oriented techniques, such as inheritance and subtype polymorphism, are not supported at the scope of such class groups. As a result, variations involving multiple classes must be encoded by variations of individual classes. Such encodings compromise type-safety and produce a considerable amount of glue code, which is often error-prone and not stable. The main statement of this thesis is that by making typical object-oriented techniques available at the scope of a group of classes we can provide a better support for managing variations at that scope. For the purpose of making inheritance and polymorphism available for a group of classes, we rely on the ideas of virtual classes and family polymorphism. A large-scale multiple inheritance is enabled by the propagating mixin composition. In this thesis we present the first implementation of these ideas for Java, and propose improvements to their semantics, namely a more intuitive linearization algorithm for propagating mixin composition and more flexible path-dependent types. We also introduce abstract virtual classes, which increase the advantages of family polymorphism by providing the possibility to describe interfaces for families of classes. Further, we propose a novel concept of dependent classes, which enhances virtual classes in analogous way like multimethods enhance single-dispatch. The multi-dispatch for classes not only enables dispatch of their functionality by multiple constructor parameters, but also generalizes family polymorphism with the possibility to express membership of an object in multiple families. The feasibility of the new concept is validated in two ways. First, we design a concrete language with dependent classes, called DepJ, and implement a type-checker and interpreter for it. Second, we formalize the features of dependent classes in vc^n and DC_C calculi, and verify their soundness and decidability. The expected advantages of virtual classes and dependent classes for variation management are validated by a set of variation scenarios. We explore variations at the scope of individual objects, as well as at the scope of a group of objects. We also investigate interactions of different kinds of variations and analyze specific variation scenarios in the context of object-oriented frameworks. We identify the problems of implementing these scenarios using conventional object-oriented techniques, and show that these problems are resolved by implementations with the advanced techniques. In particular, we show that virtual classes and propagating-mixin composition provide the typical advantages of inheritance for managing variations of a group of objects. Dependent classes provide the typical advantages of multi-dispatch for managing variations of a class. They also generalize the advantages of virtual classes with the possibility to modularize variations of multiple overlapping groups of objects, and provide a better solution for modelling multiple variations of a group of objects.
author Gasiūnas, Vaidas
spellingShingle Gasiūnas, Vaidas
Advanced Object-Oriented Language Mechanisms for Variability Management
author_facet Gasiūnas, Vaidas
author_sort Gasiūnas, Vaidas
title Advanced Object-Oriented Language Mechanisms for Variability Management
title_short Advanced Object-Oriented Language Mechanisms for Variability Management
title_full Advanced Object-Oriented Language Mechanisms for Variability Management
title_fullStr Advanced Object-Oriented Language Mechanisms for Variability Management
title_full_unstemmed Advanced Object-Oriented Language Mechanisms for Variability Management
title_sort advanced object-oriented language mechanisms for variability management
publishDate 2010
url http://tuprints.ulb.tu-darmstadt.de/2353/1/gasiunas-thesis.pdf
Gasiūnas, Vaidas <http://tuprints.ulb.tu-darmstadt.de/view/person/Gasi==016Bnas=3AVaidas=3A=3A.html> : Advanced Object-Oriented Language Mechanisms for Variability Management. Technische Universität, Darmstadt [Ph.D. Thesis], (2010)
work_keys_str_mv AT gasiunasvaidas advancedobjectorientedlanguagemechanismsforvariabilitymanagement
_version_ 1718423803557576704