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.
Similar content being viewed by others
References
Andersen, J., Elsborg, E.: Compositional specification of commercial contracts. M.S. term project, December (2003)
Arkin, A.: Business process modeling language, (2002)
Baeten J.C.M., Middelburg C.A. (2002) Process Algebra with Timing. Springer, Berlin Heidelberg New York
Baeten J.C.M., Weijland W.P. (1990) Process Algebra. Number 18 in Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, Cambridge
Brookes S.D., Hoare C.A.R., Roscoe A.W. (1984) A theory of communicating sequential processes. J. ACM 31(3):560–599
Conway J.H. (1971) Regular Algebra and Finite Machines. Chapman & Hall, London
Eber, J.-M.: Personal communication, June (2002)
Geerts, G., McCarthy, W.E.: The ontological foundations of rea enterprise information systems. Unpublished, August (2000)
Hennessy M. (1988) Algebraic Theory of Processes. MIT Press, Cambridge
Hoare C.A.R. (1985) Communicating Sequential Processes. International Series in Computer Science. Prentice-Hall, Englewood Cliffs
Jones, S.P., Eber, J.-M.: How to write a financial contract. In Gibbons, J., de Moor, O. (eds) The Fun of Programming. Palgrave Macmillan, Australia (2003)
Jones, S.P., Eber, J.-M., Seward, J.: Composing contracts: an adventure in financial engineering (functional pearl). In: Proceedings of the fifth ACM SIGPLAN International Conference on Functional Programming, pp 280–292. ACM Press,Washington (2000)
Kristoffersen, K.J., Pedersen, C., Andersen, H.R.: Runtime verification of timed LTL using disjunctive normalized equation systems. Unpublished, September (2003)
Kristoffersen, K.J., Pedersen, C., Andersen, H.R.: Checking temporal business rules. In: Proceedings of the First International REA Workshop (2004)
McCarthy W.E. (1982) The REA accounting model: a generalized framework for accounting systems in a shared data environment. Account. Rev. LVII(3): 554–578
Milner R.(1989) Communication and Concurrency. International Series in Computer Science. Prentice-Hall, Englewood Cliffs
Milner R. (1999) Communicating and Mobile Systems: The π-Calculus. Cambridge University Press, Cambridge
Milner R., Parrow J., Walker D. (1992) A calculus of mobile processes, parts I and II. Inf. Comput. 100(1):1–77
Singh, M.P., Meredith, G., Tomlinson, C., Attie, P.C.: An event algebra for specifying and scheduling workflows. In: Database Systems for Advanced Applications, pp 53–60 (1995)
van der Aalst, W.M.P., Dumas, M., ter Hofstede, A.H.M., Wohed, P.: Pattern-based analysis of BPML (and WSCI). Technical Report FIT-TR-2002-05, Queensland University (2002)
van der Aalst W., van Hee K. (2002) Workflow Management—Models, Methods, and Systems. MIT Press, Cambridge
Winskel G. (1993) The Formal Semantics of Programming Languages. MIT Press, Cambridge
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Andersen, J., Elsborg, E., Henglein, F. et al. Compositional specification of commercial contracts. Int J Softw Tools Technol Transfer 8, 485–516 (2006). https://doi.org/10.1007/s10009-006-0010-1
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10009-006-0010-1