Solving the Inheritance Anomaly in Concurrent Object-Oriented Programming

  • Authors:
  • José Meseguer

  • Affiliations:
  • -

  • Venue:
  • ECOOP '93 Proceedings of the 7th European Conference on Object-Oriented Programming
  • Year:
  • 1993

Quantified Score

Hi-index 0.02

Visualization

Abstract

The inheritance anomaly [23] refers to the serious difficulty in combining inheritance and concurrency in a simple and satisfactory way within a concurrent object-oriented language. The problem is closely connected with the need to impose synchronization constraints on the acceptance of a message by an object. In most concurrent object-oriented languages this synchronization is achieved by synchronization code controlling the acceptance of messages by objects. Synchronization code is often hard to inherit and tends to require extensive redefinitions. The solutions that have appeared so far in the literature to alleviate this problem seem to implicitly assume that better, more reusable, mechanisms are needed to create and structure synchronization code. The approach taken in this paper is to consider the inheritance anomaly as a problem caused by the very presence of synchronization code. The goal is then to completely eliminate synchronization code. This is achieved by using order-sorted rewriting logic, an abstract model of concurrent computation that is machine-independent and extremely fine grain, and that can be used directly to program concurrent object-oriented systems. Our proposed solution involves a distinction between two different notions of inheritance, a type-theoretic one called class inheritance, and a notion called module inheritance that supports reuse and modification of code. These two different notions address two different ways in which the inheritance anomaly can appear; for each of them we propose declarative solutions in which no explicit synchronization code is ever used.