Phase 5: race detector (P5-6) and the atomic_stats reference program (P5-9b)

Dynamic data-race detector for ordinary memory: vector clocks are the
task-keyed part of the weak-memory views, so happens-before follows every
synchronization edge already modelled; per-cell shadows with path
granularity. Enabled for every conformance run test (433, no false
positive); a unit test shows an unverified racy program caught on every
schedule. Reference program atomic_stats in .aji and hand-written AIR by an
independent author (equivalent:, 30 schedule seeds). Author feedback:
07a clarifications; Q-025 (no array construction) logged.
This commit is contained in:
dev committed 2026-10-06 08:11:25 +03:00
1 parent 4242132b2a
commit 0879b9497b
10 files changed
+481 -10

No files matched your search

+3 -2
View File
@@ -257,7 +257,7 @@ Allowed only in functions that declare the effect `unsafe` or are `trusted` (`E6
## Feature `tasks`
Types `scope` and `task<T>` (linear, function-bound), instructions `task.scope.begin`, `task.spawn %s, @f(…)`, `task.join`, `task.cancel`, `task.cancelled`, `task.scope.end`; loans, `Send`/`Share` and the scheduler: spec 04 §33–§36.
Types `scope` and `task<T>` (linear, function-bound), instructions `task.scope.begin`, `task.spawn %s, @f(…)`, `task.join`, `task.cancel`, `task.cancelled`, `task.scope.end`; loans, `Send`/`Share` and the scheduler: spec 04 §33–§36. In a module that declares `cancellation`, `task.join` waits and requires the effect `task.wait` (spec 04 §37.4); `task.spawn` always requires `task.spawn`.
## Features `cancellation`, `channels`, `sync`
@@ -281,7 +281,8 @@ Status `reserved` until it is published with its implementation (P5-2a). Its con
- type: linear `atomic<T>` for AtomicScalar `T`;
- instructions: `atomic.new`, `atomic.take`, `atomic.load.<o>`, `atomic.store.<o>`, `atomic.<rmw>.<o>` (`xchg`, `add.wrap`, `sub.wrap`, `and`, `or`, `xor`), `atomic.cmpxchg.<s>.<f>` (two results), `atomic.fence.<o>`;
- the contract table: spec 04 §42;
- the contract table: spec 04 §42. `atomic.cmpxchg` has two results, in this order: the value read and a `bool` that is `true` when it exchanged;
- `atomic<T>` is `Share`, so one `ref<atomic<T>>` may be lent to any number of tasks (spec 04 §35);
- the orderings: spec 04 §24;
- the memory model: spec 04 §20–§30;
- effects: spec 05 §13.