cli: lower task join operands iteratively
This commit is contained in:
1 parent
8d6792d4f1
commit
b85df6777e
5 files changed
+355
-24
No files matched your search
@@ -519,6 +519,10 @@ The [closing path/lifetime inspection](runtime-value-depth-audit.md#closing-runt
|
||||
|
||||
## Q-061 — Source expression/statement nesting and native recursion
|
||||
|
||||
The paragraphs below record chronological checkpoints. Later repairs supersede
|
||||
earlier failure/OOM findings; the [current inventory](source-expression-depth-audit.md#remaining-work)
|
||||
lists the remaining paths.
|
||||
|
||||
Inspection during Q-059's closing inventory finds native recursion through source expression parsing (`binary`/`unary`), expression queries (`peekType`/`useIn`) and generic expression transformation (`expression`/`walk`). The fixed generic type/instantiation guards do not establish a bound on arbitrary expression or statement nesting. **Unverified:** no expression/statement stack-exhaustion probe has been run in this audit; this entry records inspection risk, not an observed failure or a new acceptance rule.
|
||||
|
||||
Follow-up [expression-depth probes](source-expression-depth-audit.md) now confirm native-stack aborts without JSON diagnostics: 1,024 `not` prefixes fail in lowering; 16,384/65,536 fail earlier in the unary parser. The parser's direct prefix recursion is replaced by explicit continuations with unchanged grammar, AST spans, syntax errors and OOM propagation. Deep parse/format/missing-operand checks pass, but the confirmed lowering failure and other expression/statement paths remain open. The preceding inspection-only statement describes the initial checkpoint, not the current evidence.
|
||||
@@ -551,8 +555,10 @@ The [array-continuation increment](source-expression-depth-audit.md#array-list-a
|
||||
|
||||
The [enum-payload increment](source-expression-depth-audit.md#enum-payload-continuations) preserves lookup/arity-before-arguments, per-payload type/consumption/check order, empty/built-in construction, spans/loans and OOM. Independent shallow/deep/sibling and direct/public allocation tests pass; exact ordinary conformance coverage and final public check/lower parity (1,423/506) pass. The former enum-payload failure at 256 is repaired; nested assert still aborts at 1,024 before and after. Scoped read-only Claude reviews found no semantic defects; 331 core and 66 final supplementary CLI checks pass. Q-061 and Phase 6 remain open, with no semantic or new depth limit change.
|
||||
|
||||
The [boolean builtin increment](source-expression-depth-audit.md#boolean-builtin-operand-continuations) preserves assert/assume arity, non-consuming operands, type/error spans, unsafe registration and emission order, using shared continuations. All 1,793 ordinary conformance cases, public check/lower parity (1,423/506) and 282 focused depth checks pass. Expanded units and 69 supplemental checks pass; read-only Claude core/follow-up reviews found no production defect. Final span/counter unit checks pass. Own/region argument callbacks still abort at 1,024 before and after; remaining callbacks/walks keep Q-061 and Phase 6 open. No new semantic or depth limit changes.
|
||||
The [boolean builtin increment](source-expression-depth-audit.md#boolean-builtin-operand-continuations) preserves assert/assume arity, non-consuming operands, type/error spans, unsafe registration and emission order, using shared continuations. All 1,793 ordinary conformance cases, public check/lower parity (1,423/506) and 282 focused depth checks pass. Expanded units and 69 supplemental checks pass; read-only Claude core/follow-up reviews found no production defect. Final span/counter unit checks pass. At that boolean checkpoint own/region argument callbacks still aborted at 1,024 before and after; remaining callbacks/walks keep Q-061 and Phase 6 open. No new semantic or depth limit changes.
|
||||
|
||||
The [consuming ownership builtin increment](source-expression-depth-audit.md#consuming-ownership-builtin-continuations) preserves own.take/free and region.destroy arity, explicit transfers, type/error priority, emission and OOM separation. All 1,793 ordinary conformance cases, public check/lower parity (1,423/506) and 351 frozen-core CLI checks pass; corrected OOM/expanded units pass. 108 formatted-rejection checks pass; read-only Claude core/follow-up reviews found no production defect. Final `own<bool>` CFG unit comparisons pass. Atomic-new/take pairs and task.join still abort at 1,024. Q-061, Q-060 full GC and Phase 6 gates remain open; no semantic/depth-limit change.
|
||||
The [consuming ownership builtin increment](source-expression-depth-audit.md#consuming-ownership-builtin-continuations) preserves own.take/free and region.destroy arity, explicit transfers, type/error priority, emission and OOM separation. All 1,793 ordinary conformance cases, public check/lower parity (1,423/506) and 351 frozen-core CLI checks pass; corrected OOM/expanded units pass. 108 formatted-rejection checks pass; read-only Claude core/follow-up reviews found no production defect. Final `own<bool>` CFG unit comparisons pass. At that consuming checkpoint atomic-new/take pairs and task.join still aborted at 1,024. Q-061, Q-060 full GC and Phase 6 gates remain open; no semantic/depth-limit change.
|
||||
|
||||
The [atomic operand increment](source-expression-depth-audit.md#atomic-operand-continuations) preserves new/take and ordinary update operand rules, cell/ordering/type priority, temporary loans, emission and host OOM separation through shared continuations. Build/units/format, all 1,793 ordinary conformance cases, public check/lower parity (1,423/506) and 33/635/234 targeted checks pass. Focused depth validation passes 270 checks in two subset runs (57/213), including exact rejections and temporary-loan updates through 65,536; mixed chains reach the existing E5101 instruction limit, with runtime/fuel checked through 1,024. Read-only Claude core/follow-up reviews found no production defect. Task.join still aborts at 1,024; other callbacks/walks, Q-060 full GC and Phase 6 gates remain open. No semantic/order-default/depth-limit change.
|
||||
The [atomic operand increment](source-expression-depth-audit.md#atomic-operand-continuations) preserves new/take and ordinary update operand rules, cell/ordering/type priority, temporary loans, emission and host OOM separation through shared continuations. Build/units/format, all 1,793 ordinary conformance cases, public check/lower parity (1,423/506) and 33/635/234 targeted checks pass. Focused depth validation passes 270 checks in two subset runs (57/213), including exact rejections and temporary-loan updates through 65,536; mixed chains reach the existing E5101 instruction limit, with runtime/fuel checked through 1,024. Read-only Claude core/follow-up reviews found no production defect. At that checkpoint task.join still aborted at 1,024; other callbacks/walks, Q-060 full GC and Phase 6 gates remain open. No semantic/order-default/depth-limit change.
|
||||
|
||||
The [task.join increment](source-expression-depth-audit.md#task-join-operand-continuations) preserves consuming/type/result/void rules, spans, loans and host OOM through the shared driver. Build/units/format, exact ordinary conformance coverage, public check/lower parity, lifetime/related/CFG checks and 522 focused CLI checks pass, with valid call operands and exact rejections through 65,536 and runtime/fuel through 1,024. Read-only Claude core/follow-up reviews found no production or fixture defect. A valid 16-level alternating join/spawn probe still aborts at 256 before/after, confirming the next spawn-argument callback. Other callbacks/walks, Q-060 full GC and Phase 6 gates remain open; no semantic/depth-limit change.
|
||||
@@ -792,8 +792,9 @@ Claude's read-only core/follow-up reviews found no production defect
|
||||
`/tmp/aji-consuming-builtin-followup-review.md`). Their fixture gaps were
|
||||
corrected; the final `own<bool>` addition follows the review. Neither reviewer
|
||||
ran tests. Deep mixed errors establish descent and one builtin completion,
|
||||
not completion of every pending call. Separate atomic-new/take pairs accept 16 in both binaries, abort at
|
||||
256 only before, and abort at 1,024 in both; task.join chains still abort at
|
||||
not completion of every pending call. At this consuming checkpoint, separate
|
||||
atomic-new/take pairs accept 16 in both binaries, abort at 256 only before,
|
||||
and abort at 1,024 in both; task.join chains still aborted at
|
||||
1,024 (`consuming-builtin-next-probes.json`). No frame-size explanation is
|
||||
established. Other builtin/place/control and liveness callbacks, Q-060 full GC
|
||||
validation and Phase 6 gates remain open.
|
||||
@@ -841,11 +842,53 @@ uses a function call as its leaf, so signed-literal folding does not erase the
|
||||
first negation.
|
||||
No new whole-expression-suite, arbitrary callback or runtime-depth claim.
|
||||
|
||||
Task.join still aborts at 1,024 before and after
|
||||
At this atomic checkpoint, task.join still aborts at 1,024 before and after
|
||||
(`atomic-operand-next-probes.json`); bounded 16/256 records remain equal.
|
||||
Other builtin/place/control and liveness walks, Q-060 full GC and Phase 6
|
||||
exit gates remain open.
|
||||
|
||||
## Task join operand continuations
|
||||
|
||||
Task.join now uses the shared consuming operand driver (spec 15 §7;
|
||||
spec 04 §33–34): arity precedes children, named linear inputs still require
|
||||
move, the operand receives no type hint, and its task type is checked before
|
||||
emission. Void joins emit without a result; other joins define the same result
|
||||
name/type at the same call span. Tasks remain function-bound; join consumes the
|
||||
handle and returns its loans. Scope/result/Send/effect/verifier/runtime rules,
|
||||
scheduler behavior, AIR, diagnostics, bundle and limits are unchanged.
|
||||
|
||||
`ReferenceTaskJoin` copies the former body and recursively consumes through
|
||||
`ReferenceCalls`; shared leaf/place/type/emission helpers limit independence.
|
||||
Shallow comparisons cover scalar/void/linear/aggregate results, moves,
|
||||
non-values, wrappers and error priority. Raw helper task results containing
|
||||
borrows/tasks/scopes deliberately compare lowering only, not legal programs;
|
||||
spec 04 §33.1 still rejects them. Deep 32,768 helper-call operands and rejected
|
||||
join chains retain exact spans/counts/first errors. Recovering/persistent public
|
||||
OOM sweeps cover scalar/void success and E7003/E7005, with host-error separation
|
||||
and backing cleanup. Work states retain caller-arena lifetime.
|
||||
|
||||
Build/units/format, all 1,793 ordinary conformance cases with exact coverage,
|
||||
frozen public checks/lowerings (1,423/506), lifetime checks (188), related-location
|
||||
checks (409) and CFG-provenance checks (146) pass. Focused CLI passes 522 checks:
|
||||
valid scalar/void joins with call operands and pure/mixed rejected join chains
|
||||
through 65,536, exact formatted positions, source/AIR/fuel checks through 1,024
|
||||
and three schedule seeds through 16. Existing `source/linear/task_loan_join.aji`
|
||||
passes eight schedules; `source/layer7/reject/scope_unjoined.aji` retains E4301.
|
||||
Read-only Claude core/follow-up reviews found no production or fixture defect
|
||||
(`/tmp/aji-task-join-review.md`, `/tmp/aji-task-join-followup-review.md`); stale
|
||||
comment/checkpoint wording is corrected. Neither ran tests. Follow-up inspected
|
||||
current lower.zig and the diff, not full CLI/docs or evidence artifacts; its
|
||||
file tools could not open the core report in /tmp. The initial unit fixture aliased its
|
||||
destination while copying a child; child copying now precedes assignment.
|
||||
|
||||
The next finite probe alternates join/spawn in one scope, with scalar arguments
|
||||
and one live child at a time. It accepts 16 levels but aborts at 256/1,024 in
|
||||
both frozen binaries (`task-join-next-probes.json`). Spawn-argument callbacks,
|
||||
multi-result task.join_cancel inputs and other graph/place/control/liveness
|
||||
walks retain native callback entry with depth unverified beyond these probes.
|
||||
Q-060 full GC and Phase 6 exit gates remain open. No whole-frontend or arbitrary
|
||||
runtime-depth claim.
|
||||
|
||||
## Remaining work
|
||||
|
||||
Follow-up checks accept 16 parenthesized/mixed-call levels but abort
|
||||
@@ -860,7 +903,7 @@ includes a confirmed lowerer failure and inspection-only risks:
|
||||
| Production path | Evidence and next scope |
|
||||
|---|---|
|
||||
| Parser `ifExpr`, block/statement and match/arm expression entry | Native callback re-entry remains. Bounded block/if regression probes above pass; arbitrary and alternating control/statement depth is unverified. |
|
||||
| Lowerer non-scalar `expr` callbacks: builtin/variant calls, fields/indices/places, arrays/structs, if/match/arms and blocks/statements | Ordinary calls, struct/value-field, array and enum-payload descent are repaired above. Boolean and consuming own/region builtin operands are repaired above. Ordinary atomic operand callbacks are repaired above; task.join still aborts at 1,024 in both binaries. Other callback depth remains unverified; include alternating scalar/non-scalar expressions. |
|
||||
| Lowerer non-scalar `expr` callbacks: builtin/variant calls, fields/indices/places, arrays/structs, if/match/arms and blocks/statements | Ordinary calls, struct/value-field, array and enum-payload descent are repaired above. Boolean, consuming own/region, atomic and task.join operands are repaired above. Alternating join/spawn still aborts at 256 in both binaries. Spawn arguments and multi-result task.join_cancel inputs retain native callback entry. Other callback depth remains unverified; include alternating scalar/non-scalar expressions. |
|
||||
| Lowerer use-after-region/liveness and assignment scans (`After`, first-use/read scans, `blockAssigns`/`stmtAssigns`/`exprAssigns`, match/select helpers) | Recursive AST walks inspected; audit their callers and finite deep inputs separately. |
|
||||
|
||||
The formatter's expression-marking traversal already uses a worklist, as
|
||||
|
||||
Reference in new issue
Block a user