An algebraic view of inheritance and subtyping in object oriented programming
In Object Oriented Programming the powerful mechanism of inheritance allows the definition of classes starting from variables and methods of another class previously defined. Inheritance can be viewed as a relation between classes, which suggests how classes can be arranged in hierarchies. The hierarchies contain two kind of information: on the one hand, they indicate how programs are structured, how code is shared among classes; on the other hand, they give information about compatible assignment rules, which are based on subtyping.
In order to distinguish between code sharing, which is related to implementational aspects, and functional specialization, which is connected to the external behavior of objects, we introduce an algebraic specification based formalism, by which one can specify the behavior of a class and state when a class is to be considered subtype or inherits another one. It is shown that implementation inheritance can be reduced to specialization inheritance with respect to a virtual class.
KeywordsObjects classes message passing inheritance, subtyping code sharing encapsulation specifications morphisms
Unable to display preview. Download preview PDF.
- [Am90]P.America A behavioural approach to subtyping in Object-Oriented Programming Languages Proc. REX/FOOL, 1990Google Scholar
- [Card84]L.Cardelli A Semantics of multiple inheritance Proc. Semantics of Data Types, LNCS 173, 1984, pp.51–68Google Scholar
- [Clerici88]S.Clerici, F.Orejas GSBL: an algebraic specification language based on inheritance Proc. ECOOP 1988, LNCS 322Google Scholar
- [Ehrig85]H.Ehrig, B.Mahr Fundamentals of Algebraic Specification 1 EATCS, Springer Verlag, 1985Google Scholar
- [Ehrig90]H.Ehrig, B.Mahr Fundamentals of Algebraic Specification 2 EATCS, Springer Verlag, 1990Google Scholar
- [EW85]H.Ehrig, H.Weber Algebraic Specification of modules in ‘Formal Models in Programming’ (Neuhold E.J., Chronist G.,eds) North-Holland, 1985Google Scholar
- [Gaudel88]M.C.Gaudel.Th.Moineau A Theory of Software Reusability ESOP 88, LNCS 300, pp.115–130Google Scholar
- [Gibbs90]S.Gibbs, D.Tsichritzis, E.Casais Class Management for Software Communities Communication of the ACM,33,9 (Sept 90) pp.90–103Google Scholar
- [Goguen83]J.A.Goguen, R.Burstall Introducing Institutions Proc. Logics of Programming Workshop (E.Clarke, ed.) 1983Google Scholar
- [Liskov87]B.Liskov Data Abstraction and Hierarchy Addendum to the Proc. OOPSLA 87, 1987, pp.17–34Google Scholar
- [Meyer86]B.Meyer Genericity versus Inheritance Proc. OOPSLA '86, 1986, pp.391–405Google Scholar
- [Parisi90]F.Parisi-Presicce A rule-based approach to modular system design Proc. 12th ICSE, Nice 1990Google Scholar
- [Pier90]A.Pierantonio Problemi di ereditarietà e sottotipo in metodologie orientate agli oggetti Tesi di Laurea in Sc.Inf., Università de L'Aquila, December 1990Google Scholar
- [Sannella84]D.Sannella, A.Tarlecki Building Specifications in an arbitrary Institution Proc. Semantics of Data Type, LNCS 173, 1984, pp.337–356Google Scholar
- [Snyder86]A.Snyder Encapsulation and Inheritance in Object-Oriented Programming Languages Proc. OOPSLA '86, 1986, pp.38–45Google Scholar
- [Str86]B.Stroustrup The C++ Programming Language Addison-Wesley,1986Google Scholar
- [WE86]H.Weber, H.Ehrig Specification of Modular Systems Transaction of Software Engineering, June 1986Google Scholar
- [Wiener88]R.Wiener, L.Pinson An introduction to Object-Oriented Programming and Smalltalk Addison-Wesley,1988Google Scholar
- [Wirfs90]R.J.Wirfs-Brock, R.E.Johnson Surveying Current Research in Object-Oriented Design Communication of the ACM,33,9 (Sept 90) pp.104–124Google Scholar