cli: add whole-value linear aggregates
Implement STD-5 through source, AIR, verifier and deterministic interpreter. Constructors consume nested owners; exhaustive unpack/take, explicit swap and own.pack preserve ownership on success and failure. Support owning Option and Result while keeping classification helpers Copy-only. Preserve borrow identity across whole replacement and collection; distinguish individual owned arrays from repeated heap arrays. Specify feature contracts, invariants, diagnostics, compatibility and measured source/AIR budgets in RFC 0023 and normative docs. Add canonical round trips, AIR/source acceptance and rejection fixtures, CLI integration and CI checks. Validate build, unit/extended tests, full conformance, forced-collection schedule stress (32 seeds per quantum), hosted smoke, CLI suites, source coverage (88/88), formatting and reference bundle generation. Source bundle grows 3.2%; Quick Reference grows 4.0%. No MCC improvement is claimed. Dynamic initialized linear buffers and explicit drain remain Q-036/STD-6; frame/region/repeated heap storage is Copy-only. RFC remains Proposed.
This commit is contained in:
109 files changed
+1814
-142
No files matched your search
@@ -27,7 +27,9 @@ Status values: `open`, `resolved`.
|
||||
| Q-019 | resolved | P3 | Non-terminating programs in test tooling |
|
||||
| Q-020 | resolved | P2 | Size bound for SSA array values |
|
||||
| Q-024 | resolved | P5 | Memory-model clarifications found by the independent oracle |
|
||||
| Q-025 | open | — | No array construction from element values in AIR |
|
||||
| Q-025 | resolved | STD-5 | Array construction from complete element values |
|
||||
| Q-035 | resolved | STD-5 | Whole-value linear aggregates |
|
||||
| Q-036 | open | STD-6 | Dynamic initialized linear buffer storage and drain |
|
||||
|
||||
## Q-001 — Text AIR grammar
|
||||
|
||||
@@ -203,6 +205,9 @@ Points 1–3 and 5 are editorial. Point 4 fixes FIFO, which spec 04 §38 already
|
||||
Found by the independent author of `program_atomic_stats.air` (P5-9b). AIR has `array.splat` but no way to build an array from distinct element values. A six-element constant array costs a mutable borrow, six `borrow.index`/`store`/`borrow.end` triples and six index constants. `.aji` has the same gap: it has `[e; N]` but no array literal. The options are an `array.make T (%a, %b, …)` instruction (a value constructor like `struct.make`) with an `.aji` literal `[a, b, c]`, or no change. This is a convenience question, not a correctness one. It is not urgent, and any RFC for it must report its agent-complexity cost.
|
||||
|
||||
|
||||
**Resolved on STD-5 (RFC 0023 Proposed):** array.make and ordered source literals transfer complete linear elements. Copy-only frame stores/splat cannot express this ownership-preserving construction. The same constructor supports distinct Copy elements; its contract, feature gate, argument limits and measured complexity are specified with the vertical linear_aggregates feature.
|
||||
|
||||
|
||||
## Q-026 — Standard library distribution and initial source imports
|
||||
|
||||
The source frontend had no import resolution and the package manifest no dependencies. A source-only std therefore needed either manual concatenation or a specified import path.
|
||||
@@ -252,3 +257,12 @@ The source plan names monomorphized generics but does not define application syn
|
||||
## Q-034 — Source calls returning borrows
|
||||
|
||||
During STD-4 validation, existing `from` declarations still return the frontend's unimplemented outcome and borrow bindings accept places rather than borrow-returning calls. Generics preserve the syntax/metadata and this existing limitation; they do not add an implicit lifetime or a new binding spelling. A separate source/lifetime increment must specify and implement the binding/temporary-end rules vertically before public libraries return retained borrowed views.
|
||||
|
||||
## Q-035 — Whole-value linear aggregates
|
||||
|
||||
**Resolved on the STD-5 branch (RFC 0023 Proposed):** spec 03 §25 and source spec 15 §16 specify complete construction/exhaustive consumption, fixed arrays, explicit exchange and ownership-preserving allocation failure. No partial-move/field initialization state or destructor is introduced. Among heap/frame/region storage forms, only individual own<T> may hold linear content; frame locals, repeated heap arrays and bulk regions retain Copy-only content. Dynamic linear buffers need a separately specified extension in the collection phase.
|
||||
|
||||
|
||||
## Q-036 — Dynamic initialized linear buffer storage and drain
|
||||
|
||||
STD-5 intentionally enables only complete fixed-size values and individually owned allocation. A growable Vec of resources needs bounded dynamic storage with explicit initialized length, moving extraction, failure-preserving growth and complete drain before freeing. Repeated own.array and bulk region/frame freeing remain Copy-only. STD-6 must specify this storage contract through all layers before publishing Vec<File>, Vec<sender<Job>> or a HashMap owning values. Partial holes, implicit destructors or host-only container magic are not an answer.
|
||||
Reference in new issue
Block a user