verifier: traverse type validity and layouts iteratively
This commit is contained in:
1 parent
3906ce5a9b
commit
b0cd7d74ff
4 files changed
+228
-51
No files matched your search
@@ -48,3 +48,13 @@ The allocation-free fallback folds anonymous chains using a saturated affine map
|
||||
Unit cases cover 32,768 anonymous levels, 32,768 nominal declarations, zero/overflow behavior, null-result reuse, shared-content constructor identities and rebuilding a forged anonymous cache. Two AIR/source pairs additionally preserve acceptance of sixty-four huge arrays over an empty record and E5101 for the same chain over u64. All four new fixtures pass GC-before-each-step checking; the rejection adds a verified same-code twin. The existing full 1,765-case conformance snapshot and sixteen focused nested-size/heap-quota cases pass, and all 364 pre-existing AIR checks retain exact old/new outputs. The full snapshot plus four focused fixtures cover all 1,769 current conformance cases; test-extended also passes. These tests confirm the metric and cache behavior, not the whole Q-059 pipeline.
|
||||
|
||||
At depth 4,096 the complete check still accepts. At depth 16,384 it now reaches type validity and aborts with 8,711 wellFormed frames in verifier/types.zig, rather than sizeQuery/sizeValue. The size failure is removed; validity/property/equality/formatting and uncached nominal traversal remain open. No syntax-depth limit, semantic feature, public code or bundle text is added.
|
||||
|
||||
## Type-validity and finite-layout repair
|
||||
|
||||
Type-position validation and generic-argument array-length checking now walk anonymous chains iteratively. The order of per-node checks, the transition to each inner position, and the graph-owner stop remain unchanged: graph content is checked for IslandSafe and is not rechecked as an ordinary member. Property predicates called by those checks are a separate traversal obligation.
|
||||
|
||||
Finite-layout checking now uses suspended DFS frames for nominal declarations, retaining field order, enum variant/payload order, empty variants and the original grey/black cycle behavior. An active declaration continues its remaining siblings after a back edge marks it black. Anonymous layout edges are iterative too. Arrays always follow their element; the original ownership/borrow wrapper set follows its content only with linear_aggregates. Graph owners and atomic cells retain their original layout boundary. No new accepted/rejected type position or cycle rule is introduced.
|
||||
|
||||
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.
|
||||
@@ -462,3 +462,5 @@ Source inspection during Q-058 finds recursive `parseType` in `src/air/parse.zig
|
||||
Audit parser and subsequent type traversals before claiming bounded processing for arbitrary AIR type syntax. Iterative traversal could preserve accepted syntax; imposing a new acceptance limit instead needs normative spec 08 resource rules and fixed diagnostic facts. Q-058 does not add such a limit or claim to resolve this separate issue.
|
||||
|
||||
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.
|
||||
Reference in new issue
Block a user