You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
t27: threads and async map to actors and structured concurrency (with a simulated scheduler) #9003
Part of the effects-at-the-edge epic. Research basis:
Algebraic effects give async as a library: Microsoft Research, "Structured asynchrony with algebraic effects"; Ahman and Pretnar, "Asynchronous effects" (POPL 2021).
Repo rule: "Actors, not threads" (AGENTS.md; specs/queen/actors.t27).
Design:
Threads, channels and tokio tasks in source code map to actors and messages.
async/await maps to effect operations handled by a scheduler.
The scheduler for tests is the deterministic simulator (see the DST issue), which explores interleavings by seed.
Acceptance:
One concurrent Rust example (a channel-based worker pool) becomes actors in .t27.
It is checked under many seeds, with results equal to the oracle.
User Scenarios
Given a channel-based worker pool written in Rust using threads and channels, When it is expressed as actors and message passing in a .t27 spec and executed under the deterministic scheduler with varying seeds, Then all explored interleavings produce results identical to the reference oracle.
Requirements
FR-001: The .t27 spec MUST express the worker pool using actors and structured concurrency instead of OS threads.
FR-002: async/await operations in the spec MUST map to algebraic effect operations handled by the simulated scheduler.
FR-003: The deterministic simulator MUST explore interleavings by seed and produce results equal to the oracle for every seed.
FR-004: The spec MUST be checked under many seeds (at least 100) with all runs passing.
Success Criteria
specs/tri/net/async.t27 compiles with t27c and exits 0
The worker pool spec runs under the simulator with 100 seeds and all 100 runs exit 0 with oracle-equivalent results
t27c specs/queen/actors.t27 exits 0 confirming actor model conformance
Activity