LARA

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
inheritance [2008/02/04 16:25]
ersoy
inheritance [2008/02/04 16:28]
ersoy
Line 32: Line 32:
  
 2) Convenience Inheritance:​ This is using inheritance just for resusing some features. Meyer says, convenience inheritance is unacceptable;​ however, implementation inheritance is a form of convenience inheritance. Instead of changing the definition of "​is-a"​ into something different, just to allow some forms of inheritance for convenience,​ I will propose a more general approach. The principle is ensuring safety when one class does not subsume the other. For instance, in the presence of implementation inheritance,​ Meyer proposes hiding the inherited methods using Eiffel'​s facilities. C++ has a private inheritance mechanism that can be used for the same purpose. However, some languages like Java do not have such facilities. For any kind of convenience inheritance,​ static safety mechanisms should be developed. 2) Convenience Inheritance:​ This is using inheritance just for resusing some features. Meyer says, convenience inheritance is unacceptable;​ however, implementation inheritance is a form of convenience inheritance. Instead of changing the definition of "​is-a"​ into something different, just to allow some forms of inheritance for convenience,​ I will propose a more general approach. The principle is ensuring safety when one class does not subsume the other. For instance, in the presence of implementation inheritance,​ Meyer proposes hiding the inherited methods using Eiffel'​s facilities. C++ has a private inheritance mechanism that can be used for the same purpose. However, some languages like Java do not have such facilities. For any kind of convenience inheritance,​ static safety mechanisms should be developed.
 +
  
 =====References===== ​ =====References===== ​
Line 39: Line 40:
 [2] Nicola Guarino, Christopher Welty. Evaluating ontological decisions with OntoClean. //​Communications of the ACM//, v.45 n.2, February 2002.  [2] Nicola Guarino, Christopher Welty. Evaluating ontological decisions with OntoClean. //​Communications of the ACM//, v.45 n.2, February 2002. 
  
-[3] Robert Harper. //​Programming in Standard ML//. Draft, 2005. Available at: http://​www.cs.cmu.edu/​~rwh/​smlbook/​+[3] Nicola Guarino, Christopher Welty. An overview of OntoClean. In S. Staab and R. Studer, editors, //Handbook on Ontologies//​. Springer Verlag, 2003. 
 + 
 +[4] Robert Harper. //​Programming in Standard ML//. Draft, 2005. Available at: http://​www.cs.cmu.edu/​~rwh/​smlbook/​
  
-[4] Gary T. Leavens, David A. Naumann. Behavioral subtyping, specification inheritance,​ and modular reasoning. Technical Report 06-20a, Department of Computer Science, Iowa State University, Ames, Iowa, 50011, Aug. 2006.+[5] Gary T. Leavens, David A. Naumann. Behavioral subtyping, specification inheritance,​ and modular reasoning. Technical Report 06-20a, Department of Computer Science, Iowa State University, Ames, Iowa, 50011, Aug. 2006.
  
-[5] Barbara Liskov, Jeanette M. Wing. A behavioral notion of subtyping. //ACM Transactions on Programming Languages and Systems//, 16(6), 1994.+[6] Barbara Liskov, Jeanette M. Wing. A behavioral notion of subtyping. //ACM Transactions on Programming Languages and Systems//, 16(6), 1994.
  
-[6] Bertrand Meyer. //​Object-oriented software construction//​ (2nd ed.). Prentice-Hall,​ Inc., Upper Saddle River, NJ, 1997.+[7] Bertrand Meyer. //​Object-oriented software construction//​ (2nd ed.). Prentice-Hall,​ Inc., Upper Saddle River, NJ, 1997.
  
-[7] Jens Palsberg, Michael I. Schwartzbach. //​Object-oriented type systems//. John Wiley and Sons Ltd., Chichester, UK, 1994.+[8] Jens Palsberg, Michael I. Schwartzbach. //​Object-oriented type systems//. John Wiley and Sons Ltd., Chichester, UK, 1994.
  
-[8] Christopher Welty, Nicola Guarino. Supporting ontological analysis of taxonomic relationships. //Data & Knowledge Engineering//,​ v.39 n.1, p.51-74, October 2001.  ​+[9] Christopher Welty, Nicola Guarino. Supporting ontological analysis of taxonomic relationships. //Data & Knowledge Engineering//,​ v.39 n.1, p.51-74, October 2001.  ​