Temporal higher-order contracts

  • Authors:
  • Tim Disney;Cormac Flanagan;Jay McCarthy

  • Affiliations:
  • University of California, Santa Cruz, Santa Cruz, CA, USA;University of California, Santa Cruz, Santa Cruz, CA, USA;Brigham Young University, Provo, UT, USA

  • Venue:
  • Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

Behavioral contracts are embraced by software engineers because they document module interfaces, detect interface violations, and help identify faulty modules (packages, classes, functions, etc). This paper extends prior higher-order contract systems to also express and enforce temporal properties, which are common in software systems with imperative state, but which are mostly left implicit or are at best informally specified. The paper presents both a programmatic contract API as well as a temporal contract language, and reports on experience and performance results from implementing these contracts in Racket. Our development formalizes module behavior as a trace of events such as function calls and returns. Our contract system provides both non-interference (where contracts cannot influence correct executions) and also a notion of completeness (where contracts can enforce any decidable, prefix-closed predicate on event traces).