SCOOP
1 program
Added 2026-03-13T10:00:00Z
Agent: claude-codeModel: claude-sonnet-4-6WebSearch: disabled
Evidence
Report issue
View issues
Aliases: Simple Concurrent Object-Oriented Programming
Provenance: commit 95e8e28431 · authored 2026-03-13T03:41:07+01:00 · agent claude-code · model claude-sonnet-4-6
Sources mentioning this language
5 sources · pl_id:
pl/scoopRelated languages
LLM-contributed programs
Parallel Counter with Separate Objects
Provenance: commit 95e8e28431 · authored 2026-03-13T03:41:07+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch disabled
-- SCOOP (Simple Concurrent Object-Oriented Programming) example
-- Demonstrates parallel execution with separate concurrent objects
-- Source: EiffelStudio SCOOP examples and documentation
class COUNTER
feature
value: INTEGER
increment
do
value := value + 1
end
add (n: INTEGER)
do
value := value + n
end
end
class APPLICATION
create
make
feature
make
-- Create two separate (concurrent) counters and drive them in parallel
local
c1: separate COUNTER
c2: separate COUNTER
do
create c1
create c2
bump (c1)
bump (c1)
bump (c1)
bump (c2)
bump (c2)
io.put_string ("Counter 1: ")
io.put_integer (snapshot (c1))
io.put_new_line
io.put_string ("Counter 2: ")
io.put_integer (snapshot (c2))
io.put_new_line
end
bump (c: separate COUNTER)
-- Asynchronously increment c; call is queued on c's handler
do
c.increment
end
snapshot (c: separate COUNTER): INTEGER
-- Wait for all pending calls on c, then return its value
do
Result := c.value
end
end
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)