Abstract
This article shows how to construct robust class libraries in the context of flexibility, implementation efficiency and extensibility as further design goals. A library is 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 library code but into the user’s application, and (3) statically checkable incorrect uses of library classes are recognized by compilers. 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 only solution that ensures robustness is to drop one of these criteria. Redesigning an existing library for robustness may lead to an exponential growth in the number of classes in the hierarchy of abstract classes. However, it is shown that this class explosion can be controlled by automatically generating the required additional classes.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
G. Booch. Object-Oriented Design with Applications. Benjamin/Cummings Publishing Company, 1991.
K. K. Dhara and G. T. Leavens. Forcing behavioral subtyping through specification inheritance. In Proceedings 18th International Conference on Software Engineering, pages 258–267. IEEE, 1996.
A. Frick, R. Neumann, and W. Zimmermann. A method for the construction of robust class hierarchies. In Proceedings of WOON’ 96, 1996.
A. Frick, W. Zimmer, and W. Zimmermann. On the design of reliable libraries. In TOOLS 17—Technology of Object-Oriented Programming, pages 13–23, 1995.
A. Frick, W. Zimmer, and W. Zimmermann. Konstruktion robuster und flexibler Klassenbibliotheken. Informatik—Forschung und Entwicklung, 11(4):168–178, 1996. A preliminaryv ersion of this article was published in Softwaretechnik’95, pp. 35–46.
Arne Frick, Rainer Neumann, and Wolf Zimmermann. Eine Methode zur Konstruktion robuster Klassenhierarchien. Informatik—Forschung und Entwicklung, 12(4):186–195, 1997.
Jozsef Frigo, Rainer Neumann, and Wolf Zimmermann. Generation of robust class hierarchies. In TOOLS 23—Technology of Object-Oriented Programming and Systems, pages 282–291, 1997.
E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns: Elements of Reusable Software Components. Addison-Wesley, 1995.
B. Liskov and J. Wing. A behavioral notion of subtyping. ACM Transactions on Programming Languages and Systems, 16(6):1811–1841, 1994.
R. Mitchell, I. Maung, J. Howse, and T. Heathcote. Checking software contracts. In R. Ege, M. Singh, and B. Meyer, editors, TOOLS 17-Technology of Object-Oriented Languages and Systemes, pages 97–106, 1995.
H. Rumbaugh, M. Blaha, W. Premerlani, F. Eddy, and W. Lorensen. Object-Oriented Modelling and Design. Prentice-Hall, 1991.
H. W. Schmidt and R. Walker. TOF: An efficient type system for objects and functions. Technical Report TR-CS-92-17, Department of Computer Science, The Australian National University, November 1992.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2000 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Zimmermann, W., Frick, A., Neumann, R. (2000). The Construction Principles of the Class Library Karla . In: Jazayeri, M., Loos, R.G.K., Musser, D.R. (eds) Generic Programming. Lecture Notes in Computer Science, vol 1766. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-39953-4_5
Download citation
DOI: https://doi.org/10.1007/3-540-39953-4_5
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-41090-4
Online ISBN: 978-3-540-39953-7
eBook Packages: Springer Book Archive