cli: lower boolean builtin operands iteratively
This commit is contained in:
1 parent
627ad8f857
commit
5cc69393e4
5 files changed
+323
-27
No files matched your search
@@ -705,6 +705,55 @@ probes still abort at 1,024 before and after (`variant-followup-assert-probes.js
|
||||
in `prepareCall` → `expr`. Builtin/place/control callbacks and liveness/read/
|
||||
assignment walks keep Q-061 open; Q-060 full GC and Phase 6 gates remain separate.
|
||||
|
||||
## Boolean builtin operand continuations
|
||||
|
||||
`assert` and `assume` now evaluate their non-consuming boolean operand in the
|
||||
shared expression driver (spec 15 §4–§5; unsafe boundary: spec 13 §6). Arity precedes the child; its exact
|
||||
span/type check precedes unsafe registration, emission and the void result.
|
||||
Dispatch priority, names, CFG and errors remain unchanged. Stable continuation
|
||||
states and work buffers retain caller-arena lifetime. Host OOM propagates
|
||||
separately from source problems, including allocation while rejecting a
|
||||
program. No normative, format, feature, code, bundle, limit or ownership/runtime
|
||||
rule changes. The preserved invariant is that only a checked boolean reaches
|
||||
the instruction. Verifier effect requirements and deterministic runtime rules
|
||||
remain unchanged: `source/layer6/unchecked.aji` is valid and
|
||||
`source/nonvalue_operands/assume.aji` rejects E7005; supplemental false-input
|
||||
runs retain T0002/T0009. Public output parity establishes compatibility.
|
||||
|
||||
The copied old boolean builtin bodies join the shallow oracle, including
|
||||
scalar/boolean/call, aggregate/field/variant consumers and non-value operands.
|
||||
Shared control/place/emission/type helpers limit its independence. Deep units
|
||||
cover 32,768 ordinary-call operands and alternating assert/assume/call errors,
|
||||
exact spans, counts and unsafe registration. Public recovering/persistent OOM
|
||||
sweeps cover accepted and rejected programs and arena backing cleanup.
|
||||
Final expanded unit validation, including distinct-callee spans and exact
|
||||
counters, passes.
|
||||
|
||||
The ordinary conformance run passes all 1,793 cases with exact coverage
|
||||
(`boolean-builtin-conformance.jsonl` and its audit). Frozen public check/lower
|
||||
outputs are exact (1,423/506; `boolean-builtin-public-parity.json`); targeted
|
||||
nonvalue/linear/independent-error suites pass 635/49/234 checks. The focused CLI
|
||||
block passes 282 checks: nested void errors and ordinary-call operands through
|
||||
65,536, exact diagnostic positions and cross-command records, AIR/formatter
|
||||
parity, and successful values/fuel through 1,024. Supplemental trap/hosted/
|
||||
feature and mixed deep arity/type validation passes 69 checks
|
||||
(`boolean-builtin-supplemental-depth.log`). Trap/hosted/fuel runs are bounded
|
||||
at 1,024; the larger depths check/lower/format or reject. These focused runs
|
||||
are not a new full run of `source_expression_depth.py`.
|
||||
|
||||
Claude's read-only core/follow-up reviews found no production defect
|
||||
(`/tmp/aji-boolean-builtin-review.md` and
|
||||
`/tmp/aji-boolean-builtin-followup-review.md`). Fixture gaps were corrected;
|
||||
final distinct-callee-span/counter assertions follow the review. Neither
|
||||
reviewer ran tests. Dispatch/query shadowing was not separately validated;
|
||||
mixed deep-error call frames are descended but not all resumed. A repetition
|
||||
fixture requires the prepared nominal-property module and is tested there. Separate probes of
|
||||
`own.free`, `own.take` and `region.destroy` retain JSON at 16/256 but abort at
|
||||
1,024 before and after (`boolean-builtin-callback-probes.json`); the current
|
||||
trace enters `prepareCall` from `consuming`. Other builtin/place/control
|
||||
callbacks and liveness/read/assignment walks, Q-060 full GC validation and
|
||||
Phase 6 exit gates remain open.
|
||||
|
||||
## Remaining work
|
||||
|
||||
Follow-up checks accept 16 parenthesized/mixed-call levels but abort
|
||||
@@ -719,7 +768,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. Nested assert lowering 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 builtin operands are repaired above; own/region argument callbacks still abort at 1,024 in both binaries. 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