P5-1a: independent axiomatic oracle and the litmus corpus (20 tests agree)
tools/litmus/enumerate.py was written by an independent author from spec 04 §20 alone, with the programs blind (outcome sets removed). check.py compares its allowed sets with tests/litmus/*.lit: 20/20 equal. 21 self-tests derived from the axioms. Both run in CI. The author's spec findings are Q-024.
This commit is contained in:
1 parent
cfee89ff19
commit
f8d2a99249
28 files changed
+1278
-5
No files matched your search
@@ -26,6 +26,7 @@ Status values: `open`, `resolved`.
|
||||
| Q-018 | resolved | P2 | Runtime diagnostics (traps) vs verifier diagnostics |
|
||||
| Q-019 | resolved | P3 | Non-terminating programs in test tooling |
|
||||
| Q-020 | resolved | P2 | Size bound for SSA array values |
|
||||
| Q-024 | open | P5 | Memory-model clarifications found by the independent oracle |
|
||||
|
||||
## Q-001 — Text AIR grammar
|
||||
|
||||
@@ -170,3 +171,16 @@ A byte string lowers to one `local.zero`, then a borrow, index, store and end pe
|
||||
## Q-023 — `ref` of a whole array passed to a `ref<[T; N]>` parameter
|
||||
|
||||
In `.aji` a borrow of a whole array written as an argument (`f(ref a)`, `a: [u64; 4]`) is always lowered as a slice (`slice<u64>`), so a function declared with a parameter `ref<[u64; 4]>` cannot be called with `ref a` (`E7005`). Spec 15 §5 says that binding a borrow of a whole array (`ref r = a;`) gives a slice. It does not say what an argument borrow gives, so the frontend's choice is not specified. Options: the argument borrow follows the parameter type (array borrow for `ref<[T; N]>`, slice for `slice<T>`), which is a small amount of inference from a known signature; or keep slices only and state it in spec 15. Found while writing the interpreter memory test; not urgent.
|
||||
|
||||
## Q-024 — Memory-model clarifications found by the independent oracle
|
||||
|
||||
The independent author of `tools/litmus/enumerate.py` (P5-1a) worked from spec 04 §20 only. It reported five points the text leaves implicit. For each, the author chose the RC11 reading, and all 20 corpus tests agree with the stated sets under it. Proposed clarifying text for spec 04 §20, for owner approval:
|
||||
|
||||
1. **RMW events (§20.1–§20.2).** An RMW consists of a read event and a write event of the same location, related by `rmw`, with the read immediately `sb`-before the write. Both carry the RMW's ordering. A failed compare-exchange is a single read with the failure ordering and is not in `rmw`.
|
||||
2. **Initial writes (§20.1).** The initializing write of a cell is non-atomic (it starts no `sw`), first in `mo`, and `hb`-before every event of every task that can reach the cell.
|
||||
3. **Primitive orders (§20.3).** "A total order consistent with `hb`" means that no `hb` edge between two operations of one object points backwards in that order.
|
||||
4. **Channels (§20.3).** A channel's messages are received in send order (FIFO), and each message is received at most once. Capacity is not yet modelled. For a bounded channel, a later RFC must say whether a receive that frees a slot synchronizes with the send that was waiting for it. The litmus format has no capacity.
|
||||
5. **Release sequence (§20.2).** `rs = [W] ; (rf ; rmw)*` is deliberately the C++20 form, without RC11's same-thread later stores. Spec 04 §20.2 says "C++20" in the comment; no change is needed beyond keeping it explicit.
|
||||
|
||||
Points 1–3 and 5 are editorial. Point 4 fixes FIFO, which spec 04 §38 already implies for the interpreter, but leaves capacity synchronization open.
|
||||
|
||||
Reference in new issue
Block a user