diff --git a/docs/v4.0.0/ARTIFACT.md b/docs/v4.0.0/ARTIFACT.md index dd35a874..74fb7dc5 100644 --- a/docs/v4.0.0/ARTIFACT.md +++ b/docs/v4.0.0/ARTIFACT.md @@ -78,7 +78,7 @@ Each hash is SHA-512 (choice 2). | 2 | the flags, as the entry's: immediate, compile-only, in-line, and the ACL defaults (pinned, mode) | | 3 | the data stack effect: cells taken in the low 16 bits, cells left in the high 16, derived (choice 2) | | 4 | the return stack effect, the same way, derived | -| 5 | the capabilities: a bit for the ports, then a string pool offset to its list of kernel request numbers, or 0 | +| 5 | the capabilities: bit 31 set if it touches ports; bits 0–30 the string pool offset of its list of kernel requests, or 0 for none | | 6–7 | reserved, 0 | **An import (6 units):** @@ -115,7 +115,8 @@ The tool writes these properties and placement checks them. They are also the fi about the format: - the magic and the version; - every count and offset within the payload; -- every string pool offset on a counted string; +- every string pool offset on a counted string, or, for a capabilities list, on a unit holding its count + *n* followed by *n* units, each a `KERNEL-WORD` number; - every export's entry inside the code; - every relocation's cell inside the code, its slot one that holds a branch, its import index below I; - every reserved unit 0. @@ -134,6 +135,9 @@ about the format: return-stack effect as it derives the data-stack effect, and records it in unit 4 of each export and import (§5). Placement, compatibility (`ABI.md` §7, "the same stack effect") and the proofs check both. -4. **Capabilities:** the port bit plus a list of kernel request numbers (§5, unit 5), or something else? +4. ~~Capabilities~~ **Ruled 2026-11-19: "Port bit + request list".** As drafted (§5, unit 5). The tool + derives it from the code: a port opcode sets the bit, and each kernel request the word reaches goes in + its list. Compatibility refuses a replacement that needs one the old did not (`ABI.md` §7). The list + is a count unit then that many request numbers (§7). 5. **Endianness for the code cells:** as the golden model stores them (host order), or fixed low-first like the records?