Abstract
The SCOOP model extends Eiffel to support the construction of concurrent applications with little more effort than sequential ones. The model provides strong safety guarantees: mutual exclusion and atomicity at the routine level, and FIFO scheduling of clients’ calls. Unfortunately, in the original proposal of the model (SCOOP_97) these guarantees come at a high price: they entail locking all the arguments of a feature call, even if the corresponding objects are never used by the feature. In most cases, the amount of locking is higher than necessary. Additionally, a client that holds a lock on a given processor cannot relinquish it temporarily when the lock is needed by one of its suppliers. This increases the likelihood of deadlocks; additionally, some interesting synchronisation scenarios, e.g. separate callbacks, cannot be implemented. We propose two refinements of the access control policy for SCOOP: a type-based mechanism to specify which arguments of a routine call should be locked, and a lock passing mechanism for safe handling of complex synchronisation scenarios with mutual locking of several separate objects. When combined, these refinements increase the expressive power of the model, give programmers more control over the computation, and enable more potential parallelism, thus reducing the risk of deadlock.
Similar content being viewed by others
References
Brooke PJ, Paige RF, Jacob JL (2007) A CSP model of Eiffel’s SCOOP. Formal Aspects Comput 19(4):487–512
Caromel D (1993) Towards a method of object-oriented concurrent programming. Commun ACM 36(9):90–102
ECMA (2005) ECMA-367: Eiffel analysis, design and programming language. European Association for Standardizing Information and Communication Systems, June 2005
Fähndrich M, Leino KRM (2003) Declaring and checking non-null types in an object-oriented language. In: Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pp 302–312
ISO (2006) ISO/IEC DIS 25436: Eiffel analysis, design and programming language. In: International Organization for Standardization, June 2006
Meyer B (1992) Applying Design by Contract. IEEE Comput 25(10):40–51
Meyer B (1997) Object-oriented software construction 2nd edn. Prentice Hall, New Jersey
Meyer B (2005) Attached types and their application to three open problems of object-oriented programming. In: European Conference on Object-Oriented Programming (ECOOP), pp 1–32, July 2005
Nienaltowski P (2006) Flexible locking in SCOOP. In: International symposium on Concurrency, Real-Time, and Distribution in Eiffel-like Languages (CORDIE), pp 71–90, York, UK, July 2006
Nienaltowski P (2006) Refined access control policy for SCOOP. Technical report 511. Computer Science Department, ETH Zurich, February 2006
Nienaltowski P (2007) Practical framework for contract-based concurrent object-oriented programming. Ph.D Thesis, no. 17061. Department of Computer Science, ETH Zurich (2007)
Nienaltowski P, Meyer B, Ostroff JS (2008) Contracts for concurrency. Formal Aspects Comput (to appear)
Parkinson MJ (2005) Local reasoning for Java. Ph.D Thesis, Computer Laboratory, University of Cambridge, UK
Poetzsch-Heffter A, Müller P (1999) A programming logic for sequential Java. LNCS, vol 1576, pp 162–176
Author information
Authors and Affiliations
Corresponding author
Additional information
P. J. Brooke, R. F. Paige and Dong Jin Song
Rights and permissions
About this article
Cite this article
Nienaltowski, P. Flexible access control policy for SCOOP. Form Asp Comp 21, 347–362 (2009). https://doi.org/10.1007/s00165-008-0072-9
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00165-008-0072-9