Compositional specification of commercial contracts

  • Jesper Andersen
  • Ebbe Elsborg
  • Fritz Henglein
  • Jakob Grue Simonsen
  • Christian Stefansen
Special Section on Leveraging Applications of Formal Methods

DOI: 10.1007/s10009-006-0010-1

Cite this article as:
Andersen, J., Elsborg, E., Henglein, F. et al. Int J Softw Tools Technol Transfer (2006) 8: 485. doi:10.1007/s10009-006-0010-1

Abstract

We present a declarative language for compositional specification of contracts governing the exchange of resources. It extends Eber and Peyton Jones’s declarative language for specifying financial contracts (Jones et al. in The Fun of Programming. 2003) to the exchange of money, goods and services amongst multiple parties and complements McCarthy’s Resources, Events and Agents (REA) accounting model (McCarthy in Account Rev. LVII(3), 554–578, 1982) with a view- independent formal contract model that supports definition of user-defined contracts, automatic monitoring under execution and user-definable analysis of their state before, during and after execution. We provide several realistic examples of commercial contracts and their analyses. A variety of (real) contracts can be expressed in such a fashion as to support their integration, management and analysis in an operational environment that registers events. The language design is driven by both domain considerations and semantic language design methods: a contract denotes a set of traces of events, each of which is an alternative way of concluding the contract successfully, which gives rise to a CSP-style (Brooker et al. in J.ACM 31(3), 560–599, 1984; Hoare in Communicating Sequential Processes, 1985) denotational semantics. The denotational semantics drives the development of a sound and complete small-step operational semantics, where a partially executed contract is represented as a (full) contract that represents the remaining contractual commitments. This operational semantics is then systematically refined in two stages to an instrumented operational semantics that reflects the bookkeeping practice of identifying the specific contractual commitment a particular event matches at the time the event occurs, as opposed to delaying this matching until the contract is concluded.

Copyright information

© Springer-Verlag 2006

Authors and Affiliations

  • Jesper Andersen
    • 1
  • Ebbe Elsborg
    • 2
  • Fritz Henglein
    • 1
  • Jakob Grue Simonsen
    • 1
  • Christian Stefansen
    • 1
  1. 1.Department of Computer ScienceUniversity of Copenhagen (DIKU)CopenhagenDenmark
  2. 2.Institute of Theoretical Computer ScienceIT University of Copenhagen (ITU)Copenhagen SDenmark

Personalised recommendations