Automatic Verification of Inheritance - Kupusinac, Aleksandar; Malbaški, Dušan (International Journal of Industrial Engineering and Management, 2011)
Implementation of inheritance in programming languages as they are does not impose any restrictions regarding the relation between the superclass and its subclass. This means that in principle it is al-most possible to derive any class from any other. On the other hand, from the theoretical point of view the inheritance models a specialization relationship, meaning that logically the subclass must be a specialization of the superclass. Breaking this rule causes serious problems especially with polymor-phic replacement. This fact is a motivation to introduce the concept of correct inheritance and to estab-lish the appropriate conditions that must be satisfied by the subclass. In the present paper, we discuss such formal conditions and develop a formal recursive algorithm for automatic verification of inheri-tance. The solution is based solely on the first-order predicate logic. Article history: Received (27.05.2011); Revised (17.09.2011); Accepted (22.10.2011)