Behavioral Software Contracts
Findler, Robert Bruce
This work was also published as a Rice University thesis/dissertation: http://hdl.handle.net/1911/18078
To sustain a market for software components, component producers and consumers must agree on contracts. These contracts must specify each party’s obligations. To ensure that both sides meet their obligations, they must also agree on standards for monitoring contracts and assigning blame for contract violations This dissertation explores these issues for contracts that specify the sequential behavior of methods and procedures as pre- and post-conditions. In the process, it makes three main contributions: First, this dissertation shows how existing contract checking systems for object- oriented languages incorrectly enforce contracts in the presence of subtyping. This dissertation shows how to check such contracts properly. Second, this dissertation shows how to enforce pre- and post-condition style contracts on higher-order procedures and correctly assign blame for contract violations in that context. Finally, this dissertation lays the groundwork for a theory of contract checking, in the spirit of the theory for type checking. In particular, it states and proves the firstsoundness result for contracts, guaranteeing that the contract checker properly en- forces contracts and properly assigns blame for contract violations.
Technical Report Number