Modules and Class Refinement: A Meta-modeling Approach to Object-Oriented Programming (original) (raw)

Modules and Class Refinement—A Metamodeling Approach to Object-Oriented Languages

2007

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 signicantly dierent, so comparing and evaluating them is not easy, and selecting or designing the 'best' one is a

New Perspective To Improve Reusability in Object-Oriented Languages

The Journal of Object Technology, 2006

Object-oriented languages provide insufficient answers regarding reuse of hierarchies of classes especially because mechanisms provided for separating application concerns are not sufficient. We propose to extend object-oriented languages, Java in the current implementation, to address this particular issue. The model, inspired by approaches dedicated to the separation of concerns, introduces a new concept called adapter. It enables to specify the composition protocol of a hierarchy of classes independently from the context of use. This composition protocol allows the programmer to benefit from the necessary guidance and controls when the adapter is customized to be integrated into applications. 1 This is the term used in UML to deal with the various kinds of class.

Refining Classes in Statically Typed Object-Oriented Languages

2004

Classes and specialisation bring simultaneously structuration and flexibility to object oriented programs. However, numerous model extension propositions (aspects, modules, etc.) prove these qualities are often considered insufficient. This article proposes two binded notions of class refinement and modules, the first one brings flexibility and the second one, the structuration. Modules contain a coherent set of class definitions and can modify classes defined in modules they depend. This proposition focuses on statically typed languages where modules can be separately compiled. It is based on a module metamodel similar to the class one and problems with multiple specialisation and refinement are managed like those in multiple inheritance.

Class Refinement and Interface Refinement in Object-Oriented Programs

FME '97: Industrial Applications and Strengthened Foundations of Formal Methods, 1997

Constructing new classes from existing ones by inheritance or subclassing is a characteristic feature of object-oriented development. Imposing semantic constraints on subclassing allows us to ensure that the behaviour of superclasses is preserved or refined in their subclasses. This paper defines a class refinement relation which captures these semantic constraints. The class refinement relation is based on algorithmic and data refinement supported by Refinement Calculus. Class refinement is generalized to interface refinement, which takes place when a change in user requirements causes interface changes of classes designed as refinements of other classes. We formalize the interface refinement relation and present rules for refinement of clients of the classes involved in this relation.

Advanced Concepts on Top of Object-Oriented Programming

Inspired by the progress, advantages, and disadvantages of object-oriented programming some advanced approaches have been proposed that simplify the software development using reusable components. They will be introduced in this paper.

Virtual classes: a powerful mechanism in object-oriented programming

ACM SIGPLAN Notices, 1989

The notions of class, subclass and virtual procedure are fairly well understood and recognized as some of the key concepts in object-oriented programming. The possibility of modifying a virtual procedure in a subclass is a powerful technique for specializing the general properties of the superclass. In most object-oriented languages, the attributes of an object may be references to objects and (virtual) procedures. In Simula and BETA it is also possible to have class attributes. The power of class attributes has not yet been widely recognized. In BETA a class may also have virtual class attributes . This makes it possible to defer part of the specification of a class attribute to a subclass. In this sense virtual classes are analogous to virtual procedures. Virtual classes are mainly interesting within strongly typed languages where they provide a mechanism for defining general parameterized classes such as set, vector and list. In this sense they provide an alternative to generics....

The object-oriented paradigm

Computing science notes, 1994

In this paper we discuss the fundamental concepts present in the object-oriented methodology. First we concentrate on the notion of an object, the key concept in this approach. A (software) object is the abstract representation of a physical or conceptual object. It consists of a name, a specified set of data-elements and methods. Data-elements can have values attached to them. Data-hiding is the feature that certain data and methods can be kept invisible (= hidden) for the outside of an object, thus facilitating its description. Only knowledge on the nature of the visible data-elements and methods is required to make proper use of the object. This is called data-abstraction. A related concept is encapsulation, a technique for achieving both data-hiding and data-abstraction. A class is a template for a number of similar objects. Classes do not prescribe values for the data-elements nor fixed implementations for their methods. A class can be seen as a set of objects that satisfy the same specification for data-elements and method-behavior. An alternative grouping of objects may take place by means of object types, as we will describe. A type is a set of objects that satisfy the same ezternai specification, i.e., specification of the visible data-elements and methods. Thus, a classification via types differs from an ordering into classes, as we shall explain. The notion of type brings along a notion of subtyping. We also discuss different forms of inheritance between classes. By means of inheritance a class can use data-and method-descriptions from another class. We describe, among other things, single inheritance, multiple inheritance and overriding. We also discuss mUltiple preferred inheritance and runtime inheritance. Finally, we show how actual programming can take place in an object oriented approach. For that we need a description of inter-object communication by means of messages. Relevant aspects are: synchronous and asynchronous message passing, scheduling and delegation. The paper concludes with an overview and a number of summarizing remarks. "'This paper originates from Marc van der Kammen's master's thesis "The logic of objects; object oriented programming in a logical perspective". It is the revised version of his chapter 0, which contains an overview of the most important basic notions concerning object-oriented programming.

Designing Reusable Classes

Journal of Object-oriented Programming, 1988

Object-oriented programming is as much a different way of designing programs as it is a different way of designing programming languages. This paper describes what it is like to design systems in Smalltalk.