Skip to main content
U.S. Department of Energy
Office of Scientific and Technical Information

Checking software contracts

Conference ·
OSTI ID:210042
In object-oriented software, contracts between classes can be expressed in terms of preconditions, postconditions and invariants. In the programming language Eiffel, contracts can be checked at run-time. Within inheritance hierarchies, contracts can be used to control the redefinition of services. In Eiffel, the rules ensure that redefinition is safe in the presence of polymorphism and dynamic binding. This paper shows that Eiffel`s support for contracts can be extended, both to cover the polymorphic case more fully, and to cover other uses of inheritance, including its use for selectively reusing code from a parent class. The paper proposes that software designers should state what properties they claim for any uses of inheritance, in order that extra checks on consistency can be applied, and shows that some extra debugging power could be obtained easily, by changing only the run-time system for Eiffel, rather than the language itself.
OSTI ID:
210042
Report Number(s):
CONF-950773--
Country of Publication:
United States
Language:
English

Similar Records

A Simplified Method for Implementing Run‐Time Polymorphism in Fortran95
Journal Article · Mon Feb 16 19:00:00 EST 2004 · Scientific Programming · OSTI ID:1198059

Secure System Composition and Type Checking using Cryptographic Proofs [Slides]
Technical Report · Tue Aug 03 00:00:00 EDT 2021 · OSTI ID:1811878