air: evaluate anonymous type properties iteratively

This commit is contained in:
dev committed 2026-10-09 19:59:36 +03:00
1 parent b0cd7d74ff
commit d0fcc3d473
5 files changed
+304 -118

No files matched your search

+12
View File
@@ -58,3 +58,15 @@ Finite-layout checking now uses suspended DFS frames for nominal declarations, r
Unit cases cover 32,768 anonymous levels, a 32,768-declaration acyclic nominal chain, a deep anonymous self-cycle, the wrapper feature gate, graph validation's single E2111 and diagnostic order through siblings after back edges. Unit/format checks and all 1,769 conformance cases pass. All 366 public conformance AIR checks retain exact old/new exit status, stdout and stderr. An additional 48 generated mixed struct/enum cyclic graphs retain exact old/new outputs, including cycle selection and order.
The complete 4,096-depth check still accepts. At 16,384 it passes wellFormed and then aborts in Module.isLinearType: the symbolized traceback contains 10,001 isLinearType frames, no JSON diagnostics and exit -6. The probe stops there; 32,768 is not claimed to pass the complete pipeline. This confirms the next property-query failure, while equality, formatting and uncached nominal traversals also remain open. Q-059 is not resolved. No syntax-depth limit, semantic feature, public diagnostic code or bundle text is added.
## Anonymous property-query repair
Whole-value linearity, Zeroable, Copy, Local, IslandSafe and endpoint/forbidden-content queries now follow their original anonymous edges iteratively. Send/Share uses an explicit query mode: Send follows ref/slice by querying Share, and Share follows mutex by querying Send. The unchanged terminal classifications and nominal-cache leaves decide acceptance. No borrow, transfer, aliasing, concurrency or runtime rule changes; predicates remain allocation-free read-only queries.
Nominal-property preparation now discovers dependencies through anonymous chains iteratively, still including phantom edges. Its monotone worklist, declaration/field order and fixed-point values are unchanged. Height and source-witness distance fold anonymous edges using their existing saturation at 65 and 34. These are property summaries, not new syntax limits; saturated chains can stop without changing the summary. Uncached nominal fallback calls remain recursive. The existing depth-64 guarded bounded predicate and depth-32 witness remain separate bounded traversals.
Unit tests cover 32,768 anonymous arrays ending in plain data, task-local state or a channel endpoint, both direct and nominal cached queries. A 32,768-handle phantom chain retains dependency/height behavior, and 65,536 alternating ref/mutex edges retain Send/Share mode changes at a non-Share region leaf. Boundary tests retain height and witness-distance saturation. Existing cyclic fixed-point, shared-diamond and mixed cached/uncached tests pass with the new loops. All unit/format checks, test-extended and all 1,769 conformance cases pass; all 366 public AIR files retain exact old/new exit status, stdout and stderr.
The original complete check now accepts depths 4,096, 16,384 and 32,768 on the ordinary 8-MiB stack, with no diagnostic output. A separate 16,384-depth return-equality check accepts, and an invalid atomic content type at the same depth returns E1001 with the complete found type rather than aborting. These observations do not prove arbitrary-depth equality/formatting or uncached nominal traversal. Q-059 remains open; no semantic feature, public diagnostic code, bundle growth or new acceptance limit is introduced.
Further probes confirm the remaining sites rather than merely inferring them from source: return equality accepts depth 32,768 but aborts at 65,536 with 10,001 Type.eql frames; invalid atomic content aborts at depth 32,768 with 9,999 printType frames. Both failing checks exit -6 without diagnostic JSON. Core capture is disabled only for the child; no timeout ends a probe. Equality and diagnostic/canonical type printing now have independently verified native-stack failures.
+2
View File
@@ -464,3 +464,5 @@ Audit parser and subsequent type traversals before claiming bounded processing f
The [size-query increment](air-type-depth-audit.md#size-query-repair) removes recursive verifier sizing and inner-budget visiting, preserves nominal-depth/overflow/zero semantics, and adds immutable anonymous-node cache entries. Unit queries handle 32,768 anonymous and nominal levels; AIR/source zero/overflow fixtures and exact old/new output comparisons constrain compatibility. A repeated 16,384-depth CLI probe now aborts in verifier wellFormed, confirming the next native-recursion failure. Uncached nominal fallback, validity, properties, equality and formatting are still open; Q-059 is not resolved and no new input acceptance limit is introduced.
The [type-validity increment](air-type-depth-audit.md#type-validity-and-finite-layout-repair) iterates anonymous position/length checks and finite-layout DFS, preserving graph stops, wrapper gates and ordered cycle diagnostics. Deep unit cases cover 32,768 anonymous and nominal levels. Complete checking at 16,384 now passes wellFormed and aborts in Module.isLinearType; property, equality, formatting and uncached nominal queries remain open. No new depth limit or normative rule is introduced.
The [anonymous property-query increment](air-type-depth-audit.md#anonymous-property-query-repair) removes recursive anonymous linearity/property/dependency walks, preserving Send/Share mode changes, nominal fixed points and the existing saturated height/witness summaries. Complete checking now accepts 32,768 nested arrays. Follow-up checks verify separate remaining failures: Type.eql at depth 65,536 and diagnostic printType at depth 32,768, both without diagnostic JSON. Equality/printing and uncached nominal fallback remain open; Q-059 is not resolved.