Skip to main content
Log in

Compositional specification of commercial contracts

  • Special Section on Leveraging Applications of Formal Methods
  • Published:
International Journal on Software Tools for Technology Transfer Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Andersen, J., Elsborg, E.: Compositional specification of commercial contracts. M.S. term project, December (2003)

  2. Arkin, A.: Business process modeling language, (2002)

  3. Baeten J.C.M., Middelburg C.A. (2002) Process Algebra with Timing. Springer, Berlin Heidelberg New York

    MATH  Google Scholar 

  4. Baeten J.C.M., Weijland W.P. (1990) Process Algebra. Number 18 in Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, Cambridge

    Google Scholar 

  5. Brookes S.D., Hoare C.A.R., Roscoe A.W. (1984) A theory of communicating sequential processes. J. ACM 31(3):560–599

    Article  MathSciNet  Google Scholar 

  6. Conway J.H. (1971) Regular Algebra and Finite Machines. Chapman & Hall, London

    MATH  Google Scholar 

  7. Eber, J.-M.: Personal communication, June (2002)

  8. Geerts, G., McCarthy, W.E.: The ontological foundations of rea enterprise information systems. Unpublished, August (2000)

  9. Hennessy M. (1988) Algebraic Theory of Processes. MIT Press, Cambridge

    MATH  Google Scholar 

  10. Hoare C.A.R. (1985) Communicating Sequential Processes. International Series in Computer Science. Prentice-Hall, Englewood Cliffs

    MATH  Google Scholar 

  11. 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)

  12. 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)

  13. Kristoffersen, K.J., Pedersen, C., Andersen, H.R.: Runtime verification of timed LTL using disjunctive normalized equation systems. Unpublished, September (2003)

  14. Kristoffersen, K.J., Pedersen, C., Andersen, H.R.: Checking temporal business rules. In: Proceedings of the First International REA Workshop (2004)

  15. 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

    Google Scholar 

  16. Milner R.(1989) Communication and Concurrency. International Series in Computer Science. Prentice-Hall, Englewood Cliffs

    Google Scholar 

  17. Milner R. (1999) Communicating and Mobile Systems: The π-Calculus. Cambridge University Press, Cambridge

    Google Scholar 

  18. Milner R., Parrow J., Walker D. (1992) A calculus of mobile processes, parts I and II. Inf. Comput. 100(1):1–77

    Article  MathSciNet  Google Scholar 

  19. 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)

  20. 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)

  21. van der Aalst W., van Hee K. (2002) Workflow Management—Models, Methods, and Systems. MIT Press, Cambridge

    Google Scholar 

  22. Winskel G. (1993) The Formal Semantics of Programming Languages. MIT Press, Cambridge

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Fritz Henglein.

Rights and permissions

Reprints 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

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10009-006-0010-1

Keywords

Navigation