DocumentCode :
1547407
Title :
Representation inheritance: a safe form of “White box” code inheritance
Author :
Edwards, Stephen H.
Author_Institution :
Dept. of Comput. Sci., Virginia Polytech. Inst. & State Univ., Blacksburg, VA, USA
Volume :
23
Issue :
2
fYear :
1997
fDate :
2/1/1997 12:00:00 AM
Firstpage :
83
Lastpage :
92
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 and to prevent unnecessary duplication of code. 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. 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 :
encapsulation; inheritance; object-oriented programming; software reusability; abstraction function; abstraction relations; behavioral subtypes; black box code inheritance; encapsulation; model-based specification; object-oriented programming; representation inheritance; representation invariance; software reuse; superclass implementations; white box code inheritance; Computer Society; Computer science; Encapsulation; Functional programming; Notice of Violation; Object oriented modeling; Object oriented programming; Programming profession; Protection; Safety;
fLanguage :
English
Journal_Title :
Software Engineering, IEEE Transactions on
Publisher :
ieee
ISSN :
0098-5589
Type :
jour
DOI :
10.1109/32.585498
Filename :
585498
Link To Document :
بازگشت