Lab for Automated Reasoning and Analysis LARA

Differences

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

Link to this comparison view

inheritance [2008/02/04 16:29]
ersoy
inheritance [2008/02/04 16:32] (current)
ersoy
Line 4: Line 4:
  
 Inheritance is not subtyping [1], but I will focus on subclassing that creates subclasses, and I will handle the useful exceptional cases (e.g. implementation inheritance) explicitly by providing some static guarantees. Inheritance is not subtyping [1], but I will focus on subclassing that creates subclasses, and I will handle the useful exceptional cases (e.g. implementation inheritance) explicitly by providing some static guarantees.
 +
  
  
Line 22: Line 23:
 Meyer'​s informal IS-A rule of inheritance is "Do not make a class B inherit from a class A unless you can somehow make the argument that one can view every instance of B also an instance of A.". The notion of substitutability was first proposed by Liskov and Wing [6], and it was called "​behavioral subtyping"​. According to that definition, for B to be a behavioral subtype of A, its invariant must imply A's invariant, and its methods must preserve the behavior of A's methods, that is when contracts are inherited, preconditions cannot be strengthened and postconditions cannot be weakened. Leavens and Naumann [5] formalized behavioral subtyping and fixed some problems with Liskov and Wing's definition. Comprehensive list of work on behavioral subtyping can be found in [5].  Meyer'​s informal IS-A rule of inheritance is "Do not make a class B inherit from a class A unless you can somehow make the argument that one can view every instance of B also an instance of A.". The notion of substitutability was first proposed by Liskov and Wing [6], and it was called "​behavioral subtyping"​. According to that definition, for B to be a behavioral subtype of A, its invariant must imply A's invariant, and its methods must preserve the behavior of A's methods, that is when contracts are inherited, preconditions cannot be strengthened and postconditions cannot be weakened. Leavens and Naumann [5] formalized behavioral subtyping and fixed some problems with Liskov and Wing's definition. Comprehensive list of work on behavioral subtyping can be found in [5]. 
  
-Subsumption problem also arises in the context of knowledge representation. Taxonomies play a key role in conceptual modelling, and wrong uses of subsumption in taxonomies, makes models confusing, and difficult to integrate or reuse. Welty and Guarino [9], developed OntoClean for analysing ontologies based on formal, domain-independent properties of classes (the metaproperties) such as identity, unity, rigidity, and dependence. OntoClean allows designers to make assumptions about each property in the taxonomy and checks the consistency of each set of metaproperties. Rigorous analysis of the ontological meta-properties of taxonomic nodes lead to consistent usage of the subsumption relation.+Subsumption problem also arises in the context of knowledge representation. Taxonomies play a key role in conceptual modelling, and wrong uses of subsumption in taxonomies, makes models confusing, and difficult to integrate or reuse. Welty and Guarino [9], developed OntoClean for analysing ontologies based on formal, domain-independent properties of classes (the metaproperties) such as identity, unity, rigidity, and dependence. OntoClean allows designers to make assumptions about each property in the taxonomy and checks the consistency of each set of metaproperties. Rigorous analysis of the ontological meta-properties of taxonomic nodes lead to consistent usage of the subsumption relation. A detalied account of ontology cleaning example can be seen in [3].
  
 Another problem with Meyer'​s classification is, even though he says inheritance should only be used when IS-A relation holds between classes, he includes implementation inheritance in his classification. Just to include implementation inheritance,​ which actually represents "​is-implemented-in-terms-of"​ relation, he says there are different forms of "​is-a"​ and he modifies the definition of his IS-A relation. ​ Another problem with Meyer'​s classification is, even though he says inheritance should only be used when IS-A relation holds between classes, he includes implementation inheritance in his classification. Just to include implementation inheritance,​ which actually represents "​is-implemented-in-terms-of"​ relation, he says there are different forms of "​is-a"​ and he modifies the definition of his IS-A relation. ​
 
inheritance.txt · Last modified: 2008/02/04 16:32 by ersoy
 
© EPFL 2018 - Legal notice