The Fragile Base Class Problem and Its Solution

  • Authors:
  • Leonid Mikhajlov;Emil Sekerinski

  • Affiliations:
  • -;-

  • Venue:
  • The Fragile Base Class Problem and Its Solution
  • Year:
  • 1997

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this paper we study the fragile base class problem. This problem occurs in open object-oriented systems employing code inheritance as an implementation reuse mechanism. System developers unaware of extensions to the system developed by its users may produce a seemingly acceptable revision of a base class which may damage its extensions. The fragile base class problem becomes apparent during maintenance of open object-oriented systems, but requires consideration during design. We formulate the fragile base class problem in terms of a flexibility property. By means of five orthogonal examples demostrating that the flexibility property does not hold, we introduce requirements for disciplining inheritance. We extend the refinement calculus to accommodate for classes, objects, class-based inheritance, and class refinement. We formulate and formally prove a flexibility theorem showing that the restrictions we impose on inheritance are sufficient to permit substituting a base class with its revision in presence of extension classes. We also present three check lists for system designers, developers, and extenders to allow application of our results in practice informally.