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 express the fragile base class problem in terms of a flexibility property. By means of five orthogonal examples, violating the flexibility property, we demonstrate different aspects of the problem. We formulate requirements for disciplining inheritance, and extend the refinement calculus to accommodate for classes, objects, class-based inheritance, and class refinement. We formulate and formally prove a flexibility theorem demonstrating that the restrictions we impose on inheritance are sufficient to permit safe substitution of a base class with its revision in presence of extension classes.
Preview
Unable to display preview. Download preview PDF.
References
P. America. Designing an object-oriented programming language with behavioral subtyping. Foundations of Object-Oriented Languages, REX School/Workshop, Noordwijkerhout, The Netherlands, May/June 1990, volume 489 of Lecture Notes in Computer Science, pp. 60–90, Springer-Verlag, 1991.
Apple Computer, Inc. OpenDoc programmer's guide. Addison-Wesley Publishing Company, Draft. Apple Computer, Inc., 9/4/95.
R.J.R. Back. Correctness preserving program refinements: proof theory and applications. vol. 131 of Mathematical Center Tracts. Amsterdam: Mathematical Center, 1980.
R.J.R. Back. Changing data representation in the refinement calculus. 21st Hawaii International Conference on System Sciences, 1989.
R.J.R. Back and M.J. Butler. Exploring summation and product operators in the refinement calculus. Mathematics of Program Construction, 1995, volume 947 of Lecture Notes in Computer Science, Springer-Verlag, 1995.
R. J. R. Back, J. von Wright. Refinement Calculus I: Sequential Nondeterministic Programs. In Stepwise Refinement of Distributed Systems, pp. 42–66, Springer-Verlag, 1990.
R. J. R. Back, J. von Wright. Predicate Transformers and Higher Order Logic. In REX Workshop on Semantics: Foundations and Applications, the Netherlands, 1992
R.J.R. Back, J. von Wright. Refinement Calculus, A Systematic Introduction. Springer-Verlag, April 1998.
L. Cardelli and P. Wegner. On understanding types, data abstraction, and polymorphism. Computing Surveys, 17(4):471–522, 1985.
W. Cook, J. Palsberg. A denotational semantics of inheritance and its correctness. OOPSLA '89 Proceedings, volume 24 of SIGPLAN Notices, pp. 433–443, October 1989.
E.W.Dijkstra, A discipline of programming. Prentice-Hall International, 1976.
P.H.B. Gardiner and C.C. Morgan. Data refinement of predicate transformers. Theoretical Computer science, 87:143–162, 1991.
A. V. Hense. Denotational semantics of an object-oriented programming language with explicit wrappers. Volume 5 of Formal Aspects of Computing, pp. 181.207, Springer-Verlag, 1993.
C.A.R. Hoare. Proofs of correctness of data representation. Acta informatica, 1(4), 1972.
IBM Corporation. IBM's System Object Model (SOM): Making reuse a reality. IBM Corporation, Object Technology Products Group, Austin, Texas.
G. Kiczales, J. Lamping. Issues in the design and specification of class libraries. OOPSLA'92 Proceedings, volume 27 of SIGPLAN Notices, pp. 435–451, October 1992.
B. Liskov and J. M. Wing. A behavioral notion of subtyping. ACM Transactions on Programming Languages and Systems, 16(6):1811–1841, November 1994.
A. Mikhajlova, E. Sekerinski. Class refinement and interface refinement in object-oriented programs. FME'97: Industrial Applications and Strengthened Foundations of Formal Methods, volume 1313 of Lecture Notes in Computer Science, Springer-Verlag, 1997.
C. C.Morgan. Programming from specifications. Prentice-Hall, 1990.
J. M. Morris. A theoretical basis for stepwise refinement and the programming calculus. Science of Computer Programming, 9, 287–306, 1987.
C. Pfister, C. Szyperski. Oberon/F framework. Tutorial and reference. Oberon microsystems, Inc., 1994.
D. Pountain, C. Szyperski. Extensible software systems. Byte Magazine, 19(5): 57–62, May 1994. http://www.byte.com/art/9405/sec6/art1.html.
A. Snyder. Encapsulation and Inheritance in Object-Oriented Programming Languages. OOPSLA '86 Proceedings, volume 21 of SIGPLAN Notices, pp. 38–45, 1986.
R. Stata, J. V. Guttag. Modular reasoning in the presence of subtyping. OOPSLA '95 Proceedings, volume 30 of SIGPLAN Notices, pp. 200–214, 1995.
R. Stata. Modularity in the presence of subclassing. SRC Research Report 145, Digital Systems Research Center, 1997.
P. Steyaert, Carine Lucas, Kim Mens, Theo D'Hondt. Reuse contracts: managing the evolution of reusable assets. OOPSLA '96 Proceedings, volume 31 of SIGPLAN Notices, pp. 268–285, 1996.
B. Stroustrup. The C++ programming language. Addison-Wesley, 1986.
C. Szyperski. Independently extensible systems. Software engineering potential and challenges. Proceedings of the 19th Australasian Computer Science Conference Melbourne, Australia, February 1996.
D. Taenzer, M. Gandi, S. Podar. Problems in object-oriented software reuse. Proceedings ECOOP'89, S. Cook (Ed.), Cambridge University Press Nottingham, July 10–14, 1989, pp. 25–38.
A. Tarski. A Lattice Theoretical Fixed Point Theorem and its Applications. volume 5 of Pacific J. Mathematics, pp. 285–309, 1955.
P. Wegner, S. B. Zdonik. Inheritance as an incremental modification mechanism or what like is and isn't like. Proceedings ECOOP'88, volume 322 of Lecture Notes in Computer Science, pp. 55–77, Springer-Verlag, Oslo, August 1988.
S. Williams and C. Kinde. The Component Object Model: Technical Overview. Dr. Dobbs Journal, December 1994.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1998 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mikhajlov, L., Sekerinski, E. (1998). A study of the fragile base class problem. In: Jul, E. (eds) ECOOP’98 — Object-Oriented Programming. ECOOP 1998. Lecture Notes in Computer Science, vol 1445. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0054099
Download citation
DOI: https://doi.org/10.1007/BFb0054099
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-64737-9
Online ISBN: 978-3-540-69064-1
eBook Packages: Springer Book Archive