Modules and Class Refinement: A Meta-modeling Approach to Object-Oriented Programming - LIRMM - Laboratoire d’Informatique, de Robotique et de Microélectronique de Montpellier Access content directly
Reports Year : 2007

Modules and Class Refinement: A Meta-modeling Approach to Object-Oriented Programming

Abstract

With object-oriented programming, classes and inheritance have sometimes been considered as a definitive answer to the need for modularity and reusability in programming languages. However, this view of object-oriented languages is often considered as too limited and many authors have claimed that classes do not make appropriate modules. On the one hand, separate concerns are generally distributed on a set of closely related classes, while on the other, a class implements several unrelated concerns. The so-called expression problem stresses this limitation of the traditional view on object-oriented programming, which makes it easy to add new classes but quite impossible to add concerns to previously defined classes. Accordingly, recent research has yielded a lot of proposals addressing these commonly agreed needs. These proposals are based on various notions, e.g. virtual classes, higher-order hierarchies, nested inheritance, mixin layers or classboxes. All of these proposals are very similar and significantly different, so comparing and evaluating them is not easy, and selecting or designing the ‘best' one is a challenge. Moreover, an entire research field has emerged, i.e. aspect-oriented programming, dedicated to separation of crosscutting concerns. In this paper, we propose two coupled notions of modules and class refinement which provide the required modularity and reusability and represent a pretty good response to the expression problem. However, the goal of this paper is not only to propose these new notions—they are actually close to previous propositions, though somewhat different—but also to base this proposal on very simple and intuitive notions that already underlie object-oriented languages. Meta-modeling is the key of our approach and we use it as a sound criterion to select a precise specification among a large state space. We first propose a meta-model of classes and properties (i.e. methods and attributes), which provides clear insight into inheritance, especially when multiple. The point is that modules and module dependence are specified by a second meta-model which is isomorphic to the first one. Finally, this proposal is not only based on conceptual and theoretical considerations. Modules and class refinement are distinctive features of a new object-oriented language, Prm, and they are intensively used in the organization of its libraries and tools.
Fichier principal
Vignette du fichier
RD-FM-JP-TOPLAS-07-v09.pdf (778.32 Ko) Télécharger le fichier
Loading...

Dates and versions

lirmm-00180214 , version 1 (18-10-2007)

Identifiers

  • HAL Id : lirmm-00180214 , version 1

Cite

Roland Ducournau, Floréal Morandat, Jean Privat. Modules and Class Refinement: A Meta-modeling Approach to Object-Oriented Programming. RR 07021, 2007, pp.66. ⟨lirmm-00180214⟩
306 View
304 Download

Share

Gmail Facebook X LinkedIn More