Published 2011-12-30
abstract views: 9 // FULL TEXT ARTICLE (PDF): 0
Keywords
- formal methods,
- inheritance,
- object-oriented program verification,
- program correctness
How to Cite
Copyright (c) 2023 International Journal of Industrial Engineering and Management
This work is licensed under a Creative Commons Attribution 4.0 International License.
Abstract
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)