Compositional specification of commercial contracts

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


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.


Operational Semantic Base Language Denotational Semantic Enterprise Resource Plan System Contractual Obligation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Andersen, J., Elsborg, E.: Compositional specification of commercial contracts. M.S. term project, December (2003)Google Scholar
  2. 2.
    Arkin, A.: Business process modeling language, (2002)Google Scholar
  3. 3.
    Baeten J.C.M., Middelburg C.A. (2002) Process Algebra with Timing. Springer, Berlin Heidelberg New YorkzbMATHGoogle Scholar
  4. 4.
    Baeten J.C.M., Weijland W.P. (1990) Process Algebra. Number 18 in Cambridge Tracts in Theoretical Computer Science. Cambridge University Press, CambridgeGoogle Scholar
  5. 5.
    Brookes S.D., Hoare C.A.R., Roscoe A.W. (1984) A theory of communicating sequential processes. J. ACM 31(3):560–599CrossRefMathSciNetGoogle Scholar
  6. 6.
    Conway J.H. (1971) Regular Algebra and Finite Machines. Chapman & Hall, LondonzbMATHGoogle Scholar
  7. 7.
    Eber, J.-M.: Personal communication, June (2002)Google Scholar
  8. 8.
    Geerts, G., McCarthy, W.E.: The ontological foundations of rea enterprise information systems. Unpublished, August (2000)Google Scholar
  9. 9.
    Hennessy M. (1988) Algebraic Theory of Processes. MIT Press, CambridgezbMATHGoogle Scholar
  10. 10.
    Hoare C.A.R. (1985) Communicating Sequential Processes. International Series in Computer Science. Prentice-Hall, Englewood CliffszbMATHGoogle Scholar
  11. 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)Google Scholar
  12. 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)Google Scholar
  13. 13.
    Kristoffersen, K.J., Pedersen, C., Andersen, H.R.: Runtime verification of timed LTL using disjunctive normalized equation systems. Unpublished, September (2003)Google Scholar
  14. 14.
    Kristoffersen, K.J., Pedersen, C., Andersen, H.R.: Checking temporal business rules. In: Proceedings of the First International REA Workshop (2004)Google Scholar
  15. 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–578Google Scholar
  16. 16.
    Milner R.(1989) Communication and Concurrency. International Series in Computer Science. Prentice-Hall, Englewood CliffsGoogle Scholar
  17. 17.
    Milner R. (1999) Communicating and Mobile Systems: The π-Calculus. Cambridge University Press, CambridgeGoogle Scholar
  18. 18.
    Milner R., Parrow J., Walker D. (1992) A calculus of mobile processes, parts I and II. Inf. Comput. 100(1):1–77CrossRefMathSciNetGoogle Scholar
  19. 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)Google Scholar
  20. 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)Google Scholar
  21. 21.
    van der Aalst W., van Hee K. (2002) Workflow Management—Models, Methods, and Systems. MIT Press, CambridgeGoogle Scholar
  22. 22.
    Winskel G. (1993) The Formal Semantics of Programming Languages. MIT Press, CambridgezbMATHGoogle Scholar

Copyright information

© Springer-Verlag 2006

Authors and Affiliations

  • Jesper Andersen
    • 1
  • Ebbe Elsborg
    • 2
  • Fritz Henglein
    • 1
    Email author
  • 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