Issue No.02 - February (1997 vol.23)
DOI Bookmark: http://doi.ieeecomputersociety.org/10.1109/32.585498
<p><b>Abstract</b>—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 and to prevent unnecessary duplication of code.</p><p>Unfortunately, white box code inheritance violates the protection that encapsulation affords superclasses, opening up the possibility of a subclass interfering with the correct operation of its superclass' methods. <it>Representation inheritance</it> 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.</p>
Abstraction function, abstraction relation, behavioral subtype, inheritance, model-based specification, object-oriented, representation invariant, reuse, specialization, subclass.
Stephen H. Edwards, "Representation Inheritance: A Safe Form of "White Box" Code Inheritance", IEEE Transactions on Software Engineering, vol.23, no. 2, pp. 83-92, February 1997, doi:10.1109/32.585498