Formal Aspects of Computing

, Volume 21, Issue 4, pp 305–318 | Cite as

Contracts for concurrency

  • Piotr Nienaltowski
  • Bertrand Meyer
  • Jonathan S. Ostroff
Original Article


The SCOOP model extends the Eiffel programming language to provide support for concurrent programming. The model is based on the principles of Design by Contract. The semantics of contracts used in the original proposal (SCOOP_97) is not suitable for concurrent programming because it restricts parallelism and complicates reasoning about program correctness. This article outlines a new contract semantics which applies equally well in concurrent and sequential contexts and permits a flexible use of contracts for specifying the mutual rights and obligations of clients and suppliers while preserving the potential for parallelism. We argue that it is indeed a generalisation of the traditional correctness semantics. We also propose a proof technique for concurrent programs which supports proofs—similar to those for traditional non-concurrent programs—of partial correctness and loop termination in the presence of asynchrony.


Concurrency Object-oriented programming Design by contract SCOOP Software verification Safety and liveness properties Partial correctness 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. Adr02.
    Adrian C (2002) SCOOP for SmallEiffel. draft, available online at, June 2002
  2. AENV06.
    Arslan V, Eugster P, Nienaltowski P, Vaucouleur S (2006) SCOOP: concurrency made easy. In: Meyer B, Schiper A, Kohlas J (eds) Dependable systems: software, computing, networks. Springer, HeidelbergGoogle Scholar
  3. Am06.
    Arslan V, Meyer B (2006) Asynchronous exceptions in concurrent object-oriented programming. In: International Symposium on Concurrency, Real-Time, and Distribution in Eiffel-like Languages (CORDIE), York, UK, July 2006Google Scholar
  4. Bai04.
    Bailly A (2004) Formal semantics and proof system for SCOOP. White paper, October 2004Google Scholar
  5. BLS04.
    Barnett M, Leino KRM, Schulte W (2004) The Spec\(\sharp\) programming system: an overview. In: CASSIS, vol 3362 of LNCS. Springer, HeidelbergGoogle Scholar
  6. BP07.
    Brooke PJ, Paige RF (2007) Exceptions in Concurrent Eiffel. J Object Technol 6(10):111–126Google Scholar
  7. Car93.
    Caromel D (1993) Towards a method of object-oriented concurrent programming. Commun ACM 36(9):90–102CrossRefGoogle Scholar
  8. GL92.
    Gunaseelan L, LeBlanc RJ (1992) Distributed eiffel: a language for programming multigranular objects. In: 4th International conference on computer languages, San FranciscoGoogle Scholar
  9. Jal94.
    Jalloul G (1994) Concurrent object-oriented systems: a disciplined approach. PhD thesis, University of Technology, SydneyGoogle Scholar
  10. Jon81.
    Jones CB (1981) Development methods for computer programs including a notion of interference. PhD thesis, Oxford UniversityGoogle Scholar
  11. Jon03.
    Jones CB (2003) Wanted: a compositional approach to concurrency, Chapter 1. Springer, Heidelberg, pp 1–15Google Scholar
  12. Löh92.
    Löhr K-P (1992) Concurrency annotations. ACM SIGPLAN Notices 27(10):327–340CrossRefGoogle Scholar
  13. LPC+05.
    Leavens GT, Poll E, Clifton C, Cheon Y, Ruby v, Cok DR, Kiniry J (2005) JML reference manual. Iowa State University, Department of Computer ScienceGoogle Scholar
  14. MC81.
    Misra J, Chandy KM (1981) Proofs of networks of processes. IEEE Trans Softw Eng 7(4):417–426CrossRefMathSciNetGoogle Scholar
  15. Mey92.
    Meyer B (1992) Applying “Design by contract”. IEEE Comput 25(10):40–51Google Scholar
  16. Mey97.
    Meyer B (1997) Object-oriented software construction, 2nd edn. Prentice Hall, Englewood CliffszbMATHGoogle Scholar
  17. MP95.
    Manna Z, Pnueli A (1995) Temporal verification of reactive systems: safety. Springer, New YorkGoogle Scholar
  18. Nie07a.
    Nienaltowski P (2007) Flexible access control policy for SCOOP. Formal Aspects of Computing, special issue: Concurrency, Real-Time, and Distribution in Eiffel-like Languages (CORDIE), (to appear)Google Scholar
  19. Nei07b.
    Nienaltowski P (2007) Practical framework for contract-based concurrent object-oriented programming. PhD thesis, no. 17061, Department of Computer Science, ETH ZurichGoogle Scholar
  20. OTHS07.
    Ostroff J, Torshizi FA, Huang HF, Schoeller B (2007) Beyond contracts for concurrency. Formal Aspects of Computing, special issue: Concurrency, Real-Time, and Distribution in Eiffel-like Languages (CORDIE), (to appear)Google Scholar
  21. RDF+05.
    Rodriguez E, Dwyer M, Flanagan C, Hatcliff J, Leavens GT, Robby (2005) Extending JML for modular specification and verification of multi-threaded programs. In: European Conference on Object-Oriented Programming (ECOOP), pp 551–576Google Scholar
  22. Sut95.
    Sutton SM (1995) Preconditions, postconditions, and provisional execution in software processes. Technical Report UM-CS-1995-077, University of Massachusetts, AmherstGoogle Scholar

Copyright information

© British Computer Society 2007

Authors and Affiliations

  • Piotr Nienaltowski
    • 1
  • Bertrand Meyer
    • 2
  • Jonathan S. Ostroff
    • 3
  1. 1.Praxis High Integrity Systems LimitedBathUK
  2. 2.ETH ZurichZurichSwitzerland
  3. 3.York UniversityTorontoCanada

Personalised recommendations