A concurrency abstraction model for avoiding inheritance anomaly in object-oriented programs

  • Authors:
  • Sandeep Kumar;Dharma P. Agrawal

  • Affiliations:
  • -;-

  • Venue:
  • Compiler optimizations for scalable parallel systems
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

In a concurrent object-oriented programming language one would like to be able to inherit behavior and realize synchronization control without compromising the flexibility of either the inheritance mechanism or the synchronization mechanism. A problem called the inheritance anomaly arises when synchronization constraints are implemented within the methods of a class and an attempt is made to specialize methods through inheritance. The anomaly occurs when a subclass violates the synchronization constraints assumed by the superclass. A subclass should have the flexibility to add methods, add instance variables, and redefine inherited methods. Ideally, all the methods of a superclass should be reusable. However, if the synchronization constraints are defined by the superclass in a manner prohibiting incremental modification through inheritance, they cannot be reused, and must be reimplemented to reflect the new constraints; hence, inheritance is rendered useless. We have proposed a novel model of concurrency abstraction, where (a) the specification of the synchronization code is kept separate from the method bodies, and (b) the sequential and concurrent parts in the method bodies of a superclass are inherited by its subclasses in an orthogonal manner.