The Construction Principles of the Class Library KARLA

  • Authors:
  • Wolf Zimmermann;Arne Frick;Rainer Neumann

  • Affiliations:
  • -;-;-

  • Venue:
  • Selected Papers from the International Seminar on Generic Programming
  • Year:
  • 1998

Quantified Score

Hi-index 0.00

Visualization

Abstract

This article shows how to construct robust class libraries in the context of flexibility, implementation efficiency and extensibility as further design goals. A libraryis called robust if (1) no errors can be introduced into an application due to its use or inheritance from it, (2) error messages do not point deep into libraryco de but into the user's application, and (3) staticallyc heckable incorrect uses of library classes are recognized bycompilers. The principles derived from a theoretical analysis have been applied practically in Karla, a robust class library of data structures and algorithms the authors designed and implemented, and that is being used for research projects and student education. The main focus of this article is on the construction of hierarchies of abstract classes. The analysis shows that it is not possible in general to achieve all of the above design goals for robust libraries at the same time. The onlysolution that ensures robustness is to drop one of these criteria. Redesigning an existing libraryfor robustness maylead to an exponential growth in the number of classes in the hierarchyof abstract classes. However, it is shown that this class explosion can be controlled by automatically generating the required additional classes.