cli: add safe owning binary heaps

Add std.heap with an exact explicit pure ordering operation, bounded
push, Copy-only peek, moving pop and empty-only free. Sift Copy indices
while complete owners remain in dense initialized storage; repair holes
through complete exchange. Reserve preserves layout on returned failure
and accounts for both old/new buffers and separately owned payloads.

Integrate normative contracts, RFC, references, bundle measurements,
independent heapq/permutation oracles and CLI/package/profile checks.

Validation: 1007 conformance cases; 34 heap GC fixtures and scheduled
stress; unit/Quick Reference, formatting, hosted smoke, 70 CLI checks,
109 source coverage constructs and unchanged AIR reference bundle.
This commit is contained in:
dev committed 2026-10-07 11:41:35 +03:00
1 parent 4114a39846
commit cfece6080c
51 files changed
+2192 -12

No files matched your search

+3
View File
@@ -24,6 +24,9 @@ CHECKLIST = [
("hashmap", "explicit general growth/extraction/drain", r"std\.hashmap\.(reserve|remove|pop|free)::<", True),
("hashset", "explicit membership and duplicate owner return", r"std\.hashset\.(insert|contains)::<", True),
("hashset", "explicit set growth/extraction/drain", r"std\.hashset\.(reserve|remove|pop|free)::<", True),
("heap", "explicit order and bounded owning push", r"std\.heap\.push::<", True),
("heap", "Copy peek and moving pop", r"std\.heap\.(peek|pop)::<", True),
("heap", "explicit heap growth and drain", r"std\.heap\.(reserve|free)::<", True),
("static functions", "explicit callable contract", r"[A-Z]\w*: fn\(", True),
("static functions", "explicit named operation argument", r"(?:<|, )fn [a-z]\w*(?:\.|>|:)", True),
("static functions", "forwarded static operation", r"(?:<|, )fn [A-Z]\w*", True),