Contracts as Pairs of Projections

Robert Bruce Findler; Matthias Blume. 18 November, 2005.
Communicated by Robby Findler.
Obsolete: Yes (updated 01/20/06)


Assertion-based contracts provide a powerful mechanism for stating invariants at module boundaries and for enforcing them uniformly. Recently Findler and Felleisen have shown how to add contracts to higher-order functional languages, allowing programmers to assert invariants about functions as values.

In this paper, we develop a model for such contracts. Specifically, we follow Dana Scott's program and interpret software contracts as projections. The model has already improved our implementation of contracts. We also demonstrate how it increases our understanding of contract-oriented programming and design. For example, it shows how a contract that puts no obligation on either party is not the same as the most permissive contract for one of the parties.

Original Document

The original document is available in PDF (uploaded 18 November, 2005 by Robby Findler).