Jump to content

SCOOP (software): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Dexbot (talk | contribs)
m Bot: Cleaning up old interwiki links
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
 
(14 intermediate revisions by 11 users not shown)
Line 1: Line 1:
{{About|the concurrency model|the Python distributed-computation environment|Python SCOOP (software)}}

'''SCOOP''' ('''Simple Concurrent Object Oriented Programming''') is a concurrency model designed for the [[Eiffel (programming language)|Eiffel programming language]], conceived by Eiffel's creator and designer, [[Bertrand Meyer]].
'''SCOOP''' ('''Simple Concurrent Object Oriented Programming''') is a concurrency model designed for the [[Eiffel (programming language)|Eiffel programming language]], conceived by Eiffel's creator and designer, [[Bertrand Meyer]].


SCOOP defines a way for an object oriented program to be written without the concept of threads, locks, or other typical [[multiprogramming]] methods. This allows the compiler or runtime environment to optimize the amount of concurrency as well as eliminate typical design flaws such as deadlock.
SCOOP defines a way for an object oriented program to be written without the concept of threads, locks, or other typical [[multiprogramming]] methods. This allows the compiler or runtime environment to optimize the amount of concurrency as well as eliminate typical design flaws such as deadlock.


The model was first designed in the early 1990s and published in 1993 in the [[Communications of the ACM]]<ref>Bertrand Meyer: ''Systematic Concurrent Object-Oriented Programming'', in Communications of the ACM, 36, 9, September 1993, pp. 56-80, also available [http://se.ethz.ch/~meyer/publications/acm/scoop.pdf online].</ref> An updated version was described in chapter 30 of the book ''Object-Oriented Software Construction''.<ref>Bertrand Meyer: [[Object-Oriented Software Construction]], 2nd edition, Prentice Hall, 1997</ref>
The model was first designed in the early 1990s and published in 1993 in the [[Communications of the ACM]]<ref>Bertrand Meyer: ''Systematic Concurrent Object-Oriented Programming'', in Communications of the ACM, 36, 9, September 1993, pp. 56-80, also available [http://se.ethz.ch/~meyer/publications/acm/scoop.pdf online].</ref> An updated version was described in chapter 30 of the book ''[[Object-Oriented Software Construction]]''.<ref>Bertrand Meyer: [[Object-Oriented Software Construction]], 2nd edition, Prentice Hall, 1997</ref>
A prototype implementation was developed in 1995 by [[Eiffel Software]]. An article by Compton and Walker<ref>
A prototype implementation was developed in 1995 by Eiffel Software. An article by Compton and Walker<ref>
{{cite journal
{{cite journal
|last1=Compton |first1=Michael
| author = [[Michael Compton]], CSIRO Mathematical and Information Sciences and Richard Walker, The Australian National University
|last2=Walker |first2=Richard
| title = A Run-time System for SCOOP
|year=2002
| journal = Journal of Object Technology
|title=A Run-time System for SCOOP
| volume = 1
|journal=Journal of Object Technology
| number = 3
|volume=1 |number=3 |pages=119&ndash;157
| year = 2002
|url=http://www.jot.fm/issues/issue_2002_08/article8
| pages = 119&ndash;157
|doi=10.5381/jot.2002.1.3.a8
| url = http://www.jot.fm/issues/issue_2002_08/article8
|doi-access=free
| id = ISSN 1660-1769
}}</ref> provides an overview of SCOOP and describes another early implementation. Nienaltowski, Arslan and Meyer have published a description of the model as of 2003.<ref>
| publisher = Chair of Software Engineering, Swiss Federal Institute of Technology
{{Cite journal
| location = Zurich, Switzerland
|last1=Nienaltowski|first1=P.
}}
|last2=Arslan|first2=V.
</ref> provides an overview of SCOOP and describes another early implementation. Nienaltowski, Arslan and Meyer have published a description of the model as of 2003.<ref>
|last3=Meyer|first3=B.
P. Nienaltowski, V. Arslan and B. Meyer: ''Concurrent object-oriented programming on .NET'', in IEE Proceedings on Software, vol. 150, no. 5, October 2003, pages 308-314, also available [http://se.ethz.ch/~meyer/publications/concurrency/scoop_iee.pdf online]</ref> Work on SCOOP proceeded at the Chair of Software Engineering at [[ETH Zurich]].<ref>ETH Zurich, Chair of Software Engineering: [http://cme.ethz.ch/scoop/ SCOOP project page]</ref> SCOOP became available as a standard part of [[EiffelStudio]] early in 2011.<ref>Eiffel Software: [http://www.eiffel.com/products/concurrency/scoop.html SCOOP: Concurrency for Eiffel]</ref>
|year=2003
|title=Concurrent object-oriented programming on .NET
|url=http://se.ethz.ch/~meyer/publications/concurrency/scoop_iee.pdf
|journal=IEE Proceedings - Software
|volume=150|issue=5|pages=308
|doi=10.1049/ip-sen:20030992
}}</ref> Work on SCOOP proceeded at the Chair of Software Engineering at [[ETH Zurich]].<ref>ETH Zurich, Chair of Software Engineering: [http://cme.ethz.ch/scoop/ SCOOP project page]</ref> SCOOP became available as a standard part of [[EiffelStudio]] early in 2011.<ref>Eiffel Software: [http://www.eiffel.com/products/concurrency/scoop.html SCOOP: Concurrency for Eiffel]</ref>


==Technical overview==
==Technical overview==

SCOOP works by allowing references to certain objects to be declared as '''separate'''. In the code below, an entity <code>local_inventory</code> is declared as a separate type, by specifying the Eiffel language keyword <code>separate</code> in the declaration.
SCOOP works by allowing references to certain objects to be declared as '''separate'''. In the code below, an entity <code>local_inventory</code> is declared as a separate type, by specifying the Eiffel language keyword <code>separate</code> in the declaration.


<source lang="eiffel">
<syntaxhighlight lang="eiffel">
local_inventory: separate INVENTORY
local_inventory: separate INVENTORY
</syntaxhighlight>
</source>


A separate object may be handled by a '''SCOOP processor''' that is different from the processor handling the referencing object. A SCOOP processor is the abstract notion of an autonomous thread of control that handles the execution of operations on one or more objects. SCOOP processors are independent of underlying concurrency mechanisms like [[Thread (computing)|processor threads]], [[Multi-core processor|multiple processor cores]], and [[Distributed computing|distributed computer systems]].
A separate object may be handled by a '''SCOOP processor''' that is different from the processor handling the referencing object. A SCOOP processor is the abstract notion of an autonomous thread of control that handles the execution of operations on one or more objects. SCOOP processors are independent of underlying concurrency mechanisms like [[Thread (computing)|processor threads]], [[Multi-core processor|multiple processor cores]], and [[Distributed computing|distributed computer systems]].


In addition to the concept of separateness, SCOOP exploits the principles of [[Design by contract|Design by Contract]] as part of the SCOOP strategy for synchronizing access to shared separate resources. For example, a [[precondition]] for a consumer wishing to access an item in the inventory example above, might be that such an item does currently exist. This would be expressed with a contract on the feature of class <code>INVENTORY</code> which returns the item.
In addition to the concept of separateness, SCOOP exploits the principles of ''[[design by contract]]'' as part of the SCOOP strategy for synchronizing access to shared separate resources. For example, a [[precondition]] for a consumer wishing to access an item in the inventory example above, might be that such an item does currently exist. This would be expressed with a contract on the feature of class <code>INVENTORY</code> which returns the item.


<source lang="eiffel">
<syntaxhighlight lang="eiffel">
item: PRODUCT
item: PRODUCT
-- Current item
-- Current item
require
require
inventory_has_item: has_item
inventory_has_item: has_item
</syntaxhighlight>
</source>


In traditional, sequential processing, a client intending to call <code>local_inventory.item</code> would be responsible for making certain that the precondition <code>local_inventory.has_item</code> holds before making the call. If the call to <code>item</code> were made in a state in which <code>has_item</code> did not hold, the caller would incur a precondition violation exception.
In traditional, sequential processing, a client intending to call <code>local_inventory.item</code> would be responsible for making certain that the precondition <code>local_inventory.has_item</code> holds before making the call. If the call to <code>item</code> were made in a state in which <code>has_item</code> did not hold, the caller would incur a precondition violation exception.


In the presence of SCOOP and given the separateness of <code>local_inventory</code>, making the check on <code>has_item</code> before calling <code>item</code> would not be reliable. This is because the state of <code>local_inventory</code> could have been changed by requests from other SCOOP processors between the time that the check was made and the time that <code>item</code> could be called.
In the presence of SCOOP and given the separateness of <code>local_inventory</code>, making the check on <code>has_item</code> before calling <code>item</code> would not be reliable. This is because the state of <code>local_inventory</code> could have been changed by requests from other SCOOP processors between the time that the check was made and the time that <code>item</code> could be called.


As a result, when SCOOP is enabled, the precondition <code>has_item</code> is transformed from a '''correctness condition''', which will cause an exception in the case of a violation, to a '''wait condition'''. The wait condition will cause the execution of <code>item</code> to be delayed until such time as <code>has_item</code> holds. In the Eiffel Software implementation, if SCOOP is not enabled, the <code>separate</code> keyword is ignored and sequential processing is assumed.
As a result, when SCOOP is enabled, the precondition <code>has_item</code> is transformed from a '''correctness condition''', which will cause an exception in the case of a violation, to a '''wait condition'''. The wait condition will cause the execution of <code>item</code> to be delayed until such time as <code>has_item</code> holds. In the Eiffel Software implementation, if SCOOP is not enabled, the <code>separate</code> keyword is ignored and sequential processing is assumed.
Line 50: Line 58:
*''[[Object-Oriented Software Construction]]''
*''[[Object-Oriented Software Construction]]''


== References ==
==References==
{{reflist}}
{{reflist|30em}}


==External links==
==External links==
Line 57: Line 65:
* The [http://se.ethz.ch/research/scoop SCOOP research page at ETH Zurich].
* The [http://se.ethz.ch/research/scoop SCOOP research page at ETH Zurich].


[[Category:1993 software]]
[[Category:Concurrent programming languages]]
[[Category:Concurrent programming languages]]
[[Category:Object-oriented programming languages]]
[[Category:Object-oriented programming languages]]

[[Category:1993 software]]
[[es:Computación concurrente]]
[[fr:Programmation concurrente]]
[[nl:Multiprogrammeren]]
[[pt:Programação concorrente]]

Latest revision as of 18:28, 11 May 2020

SCOOP (Simple Concurrent Object Oriented Programming) is a concurrency model designed for the Eiffel programming language, conceived by Eiffel's creator and designer, Bertrand Meyer.

SCOOP defines a way for an object oriented program to be written without the concept of threads, locks, or other typical multiprogramming methods. This allows the compiler or runtime environment to optimize the amount of concurrency as well as eliminate typical design flaws such as deadlock.

The model was first designed in the early 1990s and published in 1993 in the Communications of the ACM[1] An updated version was described in chapter 30 of the book Object-Oriented Software Construction.[2] A prototype implementation was developed in 1995 by Eiffel Software. An article by Compton and Walker[3] provides an overview of SCOOP and describes another early implementation. Nienaltowski, Arslan and Meyer have published a description of the model as of 2003.[4] Work on SCOOP proceeded at the Chair of Software Engineering at ETH Zurich.[5] SCOOP became available as a standard part of EiffelStudio early in 2011.[6]

Technical overview

[edit]

SCOOP works by allowing references to certain objects to be declared as separate. In the code below, an entity local_inventory is declared as a separate type, by specifying the Eiffel language keyword separate in the declaration.

    local_inventory: separate INVENTORY

A separate object may be handled by a SCOOP processor that is different from the processor handling the referencing object. A SCOOP processor is the abstract notion of an autonomous thread of control that handles the execution of operations on one or more objects. SCOOP processors are independent of underlying concurrency mechanisms like processor threads, multiple processor cores, and distributed computer systems.

In addition to the concept of separateness, SCOOP exploits the principles of design by contract as part of the SCOOP strategy for synchronizing access to shared separate resources. For example, a precondition for a consumer wishing to access an item in the inventory example above, might be that such an item does currently exist. This would be expressed with a contract on the feature of class INVENTORY which returns the item.

    item: PRODUCT
        -- Current item
    require
        inventory_has_item: has_item

In traditional, sequential processing, a client intending to call local_inventory.item would be responsible for making certain that the precondition local_inventory.has_item holds before making the call. If the call to item were made in a state in which has_item did not hold, the caller would incur a precondition violation exception.

In the presence of SCOOP and given the separateness of local_inventory, making the check on has_item before calling item would not be reliable. This is because the state of local_inventory could have been changed by requests from other SCOOP processors between the time that the check was made and the time that item could be called.

As a result, when SCOOP is enabled, the precondition has_item is transformed from a correctness condition, which will cause an exception in the case of a violation, to a wait condition. The wait condition will cause the execution of item to be delayed until such time as has_item holds. In the Eiffel Software implementation, if SCOOP is not enabled, the separate keyword is ignored and sequential processing is assumed.

See also

[edit]

References

[edit]
  1. ^ Bertrand Meyer: Systematic Concurrent Object-Oriented Programming, in Communications of the ACM, 36, 9, September 1993, pp. 56-80, also available online.
  2. ^ Bertrand Meyer: Object-Oriented Software Construction, 2nd edition, Prentice Hall, 1997
  3. ^ Compton, Michael; Walker, Richard (2002). "A Run-time System for SCOOP". Journal of Object Technology. 1 (3): 119–157. doi:10.5381/jot.2002.1.3.a8.
  4. ^ Nienaltowski, P.; Arslan, V.; Meyer, B. (2003). "Concurrent object-oriented programming on .NET" (PDF). IEE Proceedings - Software. 150 (5): 308. doi:10.1049/ip-sen:20030992.
  5. ^ ETH Zurich, Chair of Software Engineering: SCOOP project page
  6. ^ Eiffel Software: SCOOP: Concurrency for Eiffel
[edit]