Article ID | Journal | Published Year | Pages | File Type |
---|---|---|---|---|
431024 | The Journal of Logic and Algebraic Programming | 2012 | 27 Pages |
In this article we present a model for multiparty contracts in which contract conformance is defined abstractly as a property on traces. A key feature of our model is blame assignment, which means that for a given contract, every breach is attributed to a set of parties. We show that blame assignment is compositional by defining contract conjunction and contract disjunction. Moreover, to specify real-world contracts, we introduce the contract specification language CSL with an operational semantics. We show that each CSL contract has a counterpart in our trace-based model and from the operational semantics we derive a run-time monitor. CSL overcomes limitations of previously proposed formalisms for specifying contracts by supporting: (history sensitive and conditional) commitments, parametrised contract templates, relative and absolute temporal constraints, potentially infinite contracts, and in-place arithmetic expressions. Finally, we illustrate the general applicability of CSL by formalising in CSL various contracts from different domains.
► A trace-based model for multiparty contracts with blame assignment. ► A contract specification language for formalising real-world contracts. ► The contract specification language supports run-time monitoring with blame assignment.