SCOOP (software)

Last updated

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.

Contents

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

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:separateINVENTORY

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 itemrequireinventory_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

Related Research Articles

Eiffel is an object-oriented programming language designed by Bertrand Meyer and Eiffel Software. Meyer conceived the language in 1985 with the goal of increasing the reliability of commercial software development. The first version was released in 1986. In 2005, the International Organization for Standardization (ISO) released a technical standard for Eiffel.

<span class="mw-page-title-main">Oberon (programming language)</span> General-purpose programming language

Oberon is a general-purpose programming language first published in 1987 by Niklaus Wirth and the latest member of the Wirthian family of ALGOL-like languages. Oberon was the result of a concentrated effort to increase the power of Modula-2, the direct successor of Pascal, and simultaneously to reduce its complexity. Its principal new feature is the concept of data type extension of record types. It permits constructing new data types on the basis of existing ones and to relate them, deviating from the dogma of strict static typing of data. Type extension is Wirth's way of inheritance reflecting the viewpoint of the parent site. Oberon was developed as part of the implementation of an operating system, also named Oberon at ETH Zurich in Switzerland. The name was inspired both by the Voyager space probe's pictures of the moon of the planet Uranus, named Oberon, and because Oberon is famous as the king of the elves.

<span class="mw-page-title-main">Design by contract</span> Approach for designing software

Design by contract (DbC), also known as contract programming, programming by contract and design-by-contract programming, is an approach for designing software.

In computer programming, a precondition is a condition or predicate that must always be true just prior to the execution of some section of code or before an operation in a formal specification.

In computer programming, a postcondition is a condition or predicate that must always be true just after the execution of some section of code or after an operation in a formal specification. Postconditions are sometimes tested using assertions within the code itself. Often, postconditions are simply included in the documentation of the affected section of code.

In concurrent programming, guarded suspension is a software design pattern for managing operations that require both a lock to be acquired and a precondition to be satisfied before the operation can be executed. The guarded suspension pattern is typically applied to method calls in object-oriented programs, and involves suspending the method call, and the calling thread, until the precondition is satisfied.

In computer science, a lock or mutex is a synchronization primitive that prevents state from being modified or accessed by multiple threads of execution at once. Locks enforce mutual exclusion concurrency control policies, and with a variety of possible methods there exist multiple unique implementations for different applications.

Command-query separation (CQS) is a principle of imperative computer programming. It was devised by Bertrand Meyer as part of his pioneering work on the Eiffel programming language.

<span class="mw-page-title-main">Bertrand Meyer</span> French computer scientist

Bertrand Meyer is a French academic, author, and consultant in the field of computer languages. He created the Eiffel programming language and the concept of design by contract.

In computer programming, specifically object-oriented programming, a class invariant is an invariant used for constraining objects of a class. Methods of the class should preserve the invariant. The class invariant constrains the state stored in the object.

In computer science, message passing is a technique for invoking behavior on a computer. The invoking program sends a message to a process and relies on that process and its supporting infrastructure to then select and run some appropriate code. Message passing differs from conventional programming where a process, subroutine, or function is directly invoked by name. Message passing is key to some models of concurrency and object-oriented programming.

Concurrent computing is a form of computing in which several computations are executed concurrently—during overlapping time periods—instead of sequentially—with one completing before the next starts.

Object-oriented analysis and design (OOAD) is a technical approach for analyzing and designing an application, system, or business by applying object-oriented programming, as well as using visual modeling throughout the software development process to guide stakeholder communication and product quality.

<i>Object-Oriented Software Construction</i> Book by Bertrand Meyer

Object-Oriented Software Construction, also called OOSC, is a book by Bertrand Meyer, widely considered a foundational text of object-oriented programming. The first edition was published in 1988; the second edition, extensively revised and expanded, in 1997. Many translations are available including Dutch, French (1+2), German (1), Italian (1), Japanese (1+2), Persian (1), Polish (2), Romanian (1), Russian (2), Serbian (2), and Spanish (2). The book has been cited thousands of times. As of 15 December 2011, The Association for Computing Machinery's (ACM) Guide to Computing Literature counts 2,233 citations, for the second edition alone in computer science journals and technical books; Google Scholar lists 7,305 citations. As of September 2006, the book is number 35 in the list of all-time most cited works in computer science literature, with 1,260 citations. The book won a Jolt award in 1994. The second edition is available online free.

The following outline is provided as an overview of and topical guide to computer programming:

<i>The Journal of Object Technology</i> Academic journal

The Journal of Object Technology is an online scientific journal welcoming manuscripts describing theoretical, empirical, conceptual, and experimental results in the area of software and language engineering, including

<span class="mw-page-title-main">EiffelStudio</span> Development environment

EiffelStudio is a development environment for the Eiffel programming language developed and distributed by Eiffel Software.

<span class="mw-page-title-main">Object-oriented programming</span> Programming paradigm based on the concept of objects

Object-oriented programming (OOP) is a programming paradigm based on the concept of objects, which can contain data and code: data in the form of fields, and code in the form of procedures. In OOP, computer programs are designed by making them out of objects that interact with one another.

The TOOLS conference series is a long-running conferences on object technology, component-based development, model-based development and other advanced software technologies. The name originally stood for "Technology of Object-Oriented Languages and Systems" although later it was usually no longer expanded, the conference being known simply as "the TOOLS conference". The conferences ran from 1988 to 2012, with a hiatus in 2003–2007, and was revived in 2019.

References

  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 (inactive 7 December 2024).{{cite journal}}: CS1 maint: DOI inactive as of December 2024 (link)
  5. ETH Zurich, Chair of Software Engineering: SCOOP project page
  6. Eiffel Software: SCOOP: Concurrency for Eiffel