Contract Soundness for Object-Oriented Languages

13 years 4 months ago
Contract Soundness for Object-Oriented Languages
Checking pre- and post-conditions of procedures and methods at runtime helps improve software reliability. In the procedural world, pre- and post-conditions have a straightforward interpretation. If a procedure’s pre-condition doesn’t hold, the caller failed to establish the proper context. If a post-condition doesn’t hold, the procedure failed to compute the expected result. In the object-oriented world, checking pre- and post-conditions for methods, often called contracts in this context, posescomplex problems. Because methods may be overridden, it is not sufficient to check only pre- and post-conditions. In addition, the contract hierarchy must be checked to ensure that the contracts on overridden methods are properly related to the contracts on overriding methods. Otherwise, a class hierarchy may violate the substitution principle, that is, it may no longer be true that an instance of a class is substitutable for objects of the super-class. In this paper, we study the probl...
Robert Bruce Findler, Matthias Felleisen
Added 30 Jul 2010
Updated 30 Jul 2010
Type Conference
Year 2001
Authors Robert Bruce Findler, Matthias Felleisen
Comments (0)