This article discusses the problem of constructing robust class libraries.
Further design criteria include the flexibility of class libraries, the eff
iciency of the implementations, and their safe extensibility. We show that
it is possible to design robust libraries to satisfy any two of the require
ments at the same time, Although the solution may require an exponential gr
owth in the number of classes compared to the original design, this apparen
t class explosion can be controlled by generating only the necessary additi
onal classes automatically, As an application demonstrating both the theore
tical problems and the power of our generator approach, the design of a lib
rary modelling data structures and algorithms for graphs is considered. Bot
h the discussion and the results in this article generalize to other domain
s. Copyright (C) 2000 John Wiley & Sons, Ltd.