Skip to main content
Log in

Contracts for concurrency

  • Original Article
  • Published:
Formal Aspects of Computing

Abstract

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.

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. Adrian C (2002) SCOOP for SmallEiffel. draft, available online at http://www.chez.com/cadrian/eiffel/scoop.html, June 2002

  2. 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, Heidelberg

    Google Scholar 

  3. 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 2006

  4. Bailly A (2004) Formal semantics and proof system for SCOOP. White paper, October 2004

  5. Barnett M, Leino KRM, Schulte W (2004) The Spec\(\sharp\) programming system: an overview. In: CASSIS, vol 3362 of LNCS. Springer, Heidelberg

  6. Brooke PJ, Paige RF (2007) Exceptions in Concurrent Eiffel. J Object Technol 6(10):111–126

    Google Scholar 

  7. Caromel D (1993) Towards a method of object-oriented concurrent programming. Commun ACM 36(9):90–102

    Article  Google Scholar 

  8. Gunaseelan L, LeBlanc RJ (1992) Distributed eiffel: a language for programming multigranular objects. In: 4th International conference on computer languages, San Francisco

  9. Jalloul G (1994) Concurrent object-oriented systems: a disciplined approach. PhD thesis, University of Technology, Sydney

  10. Jones CB (1981) Development methods for computer programs including a notion of interference. PhD thesis, Oxford University

  11. Jones CB (2003) Wanted: a compositional approach to concurrency, Chapter 1. Springer, Heidelberg, pp 1–15

  12. Löhr K-P (1992) Concurrency annotations. ACM SIGPLAN Notices 27(10):327–340

    Article  Google Scholar 

  13. Leavens GT, Poll E, Clifton C, Cheon Y, Ruby v, Cok DR, Kiniry J (2005) JML reference manual. Iowa State University, Department of Computer Science

  14. Misra J, Chandy KM (1981) Proofs of networks of processes. IEEE Trans Softw Eng 7(4):417–426

    Article  MathSciNet  Google Scholar 

  15. Meyer B (1992) Applying “Design by contract”. IEEE Comput 25(10):40–51

    Google Scholar 

  16. Meyer B (1997) Object-oriented software construction, 2nd edn. Prentice Hall, Englewood Cliffs

    MATH  Google Scholar 

  17. Manna Z, Pnueli A (1995) Temporal verification of reactive systems: safety. Springer, New York

    Google Scholar 

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

  19. Nienaltowski P (2007) Practical framework for contract-based concurrent object-oriented programming. PhD thesis, no. 17061, Department of Computer Science, ETH Zurich

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

  21. 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–576

  22. Sutton SM (1995) Preconditions, postconditions, and provisional execution in software processes. Technical Report UM-CS-1995-077, University of Massachusetts, Amherst

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Piotr Nienaltowski.

Additional information

P. J. Brooke, R. F. Paige and Dong Jin Song

Rights and permissions

Reprints and permissions

About this article

Cite this article

Nienaltowski, P., Meyer, B. & Ostroff, J.S. Contracts for concurrency. Form Asp Comp 21, 305–318 (2009). https://doi.org/10.1007/s00165-007-0063-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00165-007-0063-2

Keywords

Navigation