Objectives

This section gives an introduction to the inheritance anomaly and its possible solutions. It further demonstrates the usefulness of having inheritance on processes by sketching an application.

Points to emphasize

Hints

Normally, inheritance results in adding behavior. In the presence of processes, inheritance is problematic since it generally involves synchronization constraints as well. Semantically, the solution to the inheritance anomaly lies in relaxing the obligations for the user while allowing for more, possibly concurrent, behavioral capabilities, analogous to the refinement of a contract. Hence, a suggestion is to allow for multi-threaded objects. Somewhat surprisingly, this route has not been considered by the concurrent extensions of C++ discussed in the previous section.

Questions

  1. What problems arise with respect to concurrency control if you allow for inheritance?
  2. Can you think of an example where inheritance on processes is useful? What impacts does your solution have for the implementation language?

Comments

Combining processes and inheritance may be considered as an important research issue. This section contains some suggestions for further research.