An Extended Concept of Delegation and its Implementation within a Modelling and Programming Language Architecture

Authors

  • Ulrich Frank University of Duisburg-Essen, Germany
  • Tony Clark Aston University, Birmingham, United Kingdom
  • Jens Gulden
  • Daniel Töpel University Duisburg-Essen, Germany

DOI:

https://doi.org/10.18417/emisa.19.2

Keywords:

Delegation, Inheritance, Specialization, Subclassing, Object-oriented Modelling, Software-architecture

Abstract

Object-oriented modeling languages provide various concepts to express abstractions, which foster reuse and integrity. Among these concepts, generalization/specialization is of specific relevance. However, in many cases where generalization/specialization seems to be a natural choice, its use is likely to jeopardize a system’s integrity. Delegation has for long been known as an alternative that allows preventing the accidental damage caused by the inproper use of specialization. Nevertheless, delegation is ignored by most tools for object-oriented modeling as well as by many textbooks, which may be caused by the fact that there is no unified conception of delegation, and that delegation is not supported by most object-oriented programming languages. This paper aims at a revival of delegation. To that end, the need for delegation is motivated by the analysis of counter-intuitive effects of specialization. Based on an extensive requirements analysis, a new, extended conception of delegation is presented. It allows for using delegation between classes on any (meta-) level and introduces the "delegation to class" pattern. Delegation in multi-level environments enables an additional reduction of redundancy and, hence, promotes integrity. The paper also presents design guidelines to foster the appropriate use of delegation. With respect to the implementation of delegation with object-oriented programming languages, two alternative flavours of delegation are analyzed. Finally, a prototypical implementation within a language engineering and execution environment does not only demonstrate the use of delegation in a modeling tool, but also its seamless implementation, by featuring a common representation of models and code at runtime.

Additional Files

Published

2024-02-08

Issue

Section

Research Note