Checking Behavioral Compatibility between Objects by Extending the Methods Rule

Heung Seok CHAE  Joon-Sang LEE  Jung Ho BAE  

IEICE TRANSACTIONS on Information and Systems   Vol.E94-D   No.1   pp.79-90
Publication Date: 2011/01/01
Online ISSN: 1745-1361
DOI: 10.1587/transinf.E94.D.79
Print ISSN: 0916-8532
Type of Manuscript: PAPER
Category: Software System
object oriented programming,  

Full Text: PDF(839.4KB)
>>Buy this Article

Behavioral compatibility between subtypes and supertypes in object-oriented systems is a very important issue to enable the substitution between object types since it supports the extension and evolution of an object oriented system. In other words, the subtype must be guaranteed that it can provide all behaviors (operations) of the supertype for replacing the supertype with the subtype. Invocation consistency checking is one of techniques to verify behavioral compatibility between two object types. The technique confirms weather an object type can accept all sequence of operations of the other object type or not. The classical methods rule checks behavioral compatibility by verifying invocation consistency of two object types. The rule argues that subtypes meet behavioral compatibility with supertypes if the subtypes' preconditions of inherited operations are weakened and postconditions are strengthened. Noting that the classical methods rule is not sufficient for checking behavioral compatibility between objects, we propose an extended methods rule on the basis of the classical methods rule. Based on the proposed extended methods rule, we have implemented a tool, BCCT, to automatically check behavioral compatibility between two objects.