DocumentCode
3534562
Title
Representation inheritance: a safe form of "white box" code inheritance
Author
Edwards, Stephen H.
Author_Institution
Dept. of Comput. & Inf. Sci., Ohio State Univ., Columbus, OH, USA
fYear
1996
fDate
23-26 April 1996
Firstpage
195
Lastpage
204
Abstract
There are two approaches to using code inheritance for defining new component implementations in terms of existing implementations. Black-box code inheritance allows subclasses to reuse superclass implementations as-is, without direct access to their internals. Alternatively, white-box code inheritance allows subclasses to have direct access to superclass implementation details, which may be necessary for the efficiency of some subclass operations. Unfortunately, white-box code inheritance violates the protection that encapsulation affords to superclasses, opening up the possibility of a subclass interfering with the correct operation of its superclass methods. Representation inheritance is proposed as a restricted form of white-box code inheritance where subclasses have direct access to superclass implementation details, but are required to respect the representation invariant(s) and abstraction relation(s) of their ancestor(s). This preserves the protection that encapsulation provides, while allowing the freedom of access that component implementers sometimes desire.
Keywords
data encapsulation; inheritance; object-oriented programming; software reusability; abstraction function; abstraction relation; abstraction relations; access; ancestors; behavioral subtype; component implementations; encapsulation; model-based specification; object-oriented software; representation inheritance; representation invariants; safety; specialization; subclass operations; superclass implementations reuse; superclass protection; white-box code inheritance; Encapsulation; Functional programming; Information science; Object oriented modeling; Object oriented programming; Protection; Safety;
fLanguage
English
Publisher
ieee
Conference_Titel
Software Reuse, 1996., Proceedings Fourth International Conference on
Conference_Location
Orlando, FL, USA
Print_ISBN
0-8186-7301-X
Type
conf
DOI
10.1109/ICSR.1996.496127
Filename
496127
Link To Document