Contracts as Pairs of projections

Robert Bruce Findler*, Matthias Blume

*Corresponding author for this work

Research output: Chapter in Book/Report/Conference proceedingConference contribution

44 Scopus citations

Abstract

Assertion-based contracts provide a powerful mechanism for stating invariants at module boundaries and for enforcing them uniformly. In 2002, Findler and Felleisen showed how to add contracts to higher-order functional languages, allowing programmers to assert invariants about functions as values. Following up in 2004, Blume and McAllester provided a quotient model for contracts. Roughly speaking, their model equates a contract with the set of values that cannot violate the contract. Their studies raised interesting questions about the nature of contracts and, in particular, the nature of the any contract. In this paper, we develop a model for software contracts that follows Dana Scott's program by interpreting 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. In particular, our work provides a definitive answer to the questions raised by Blume and McAllester's work. The key insight from our model that resolves those questions is that a contract that puts no obligation on either party is not the same as the most permissive contract for just one of the parties.

Original languageEnglish (US)
Title of host publicationFunctional and Logic Programming
Subtitle of host publication8th International Symposium, FLOPS 2006, Proceedings
PublisherSpringer Verlag
Pages226-241
Number of pages16
ISBN (Print)3540334386, 9783540334385
DOIs
StatePublished - 2006
Event8th International Symposium on Functional and Logic Programming, FLOPS 2006 - Fuji-Susono, Japan
Duration: Apr 24 2005Apr 26 2005

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume3945 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Other

Other8th International Symposium on Functional and Logic Programming, FLOPS 2006
Country/TerritoryJapan
CityFuji-Susono
Period4/24/054/26/05

ASJC Scopus subject areas

  • Theoretical Computer Science
  • General Computer Science

Fingerprint

Dive into the research topics of 'Contracts as Pairs of projections'. Together they form a unique fingerprint.

Cite this