Repository navigation
Support bounded rule loops and restore ordered array scans - #284
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pure behavioral rules could not express ordered prefix computations without manually expanding each step. This change implements bounded ordinary
for name in range(INTEGER_LITERAL)through the existing Python capture and MLIR lowering flow and restores the originalarray_scansexample. No decorator, Table scan method, IR opcode or alternate compiler route is added.Loop lowering preserves logical Integer induction, existing typed assignment boundaries, final binder values and zero-trip behavior. It rejects unsupported effects and syntax before expansion, prepays source-wide resources, retains iteration/call provenance and rolls back failed staging. Unchanged branch values reuse the existing SSA only after declaration/binding validation. The example retains all four ordered scalar/aggregate scans, complete prefix snapshots and the two original depth-one queues.
Deep-record validation exposed redundant C++ default member initializers. Direct nominal Struct fields now rely on their initialized leaves; scalar, Enum and Table initialization, layout and aggregate construction are preserved. For the same depth-32 final IR and compiler, one measured generated-C++ syntax check fell from 154.77 s to 0.41 s. This is a single workload measurement, not a general scaling claim.
Validation:
array_scans: 1,031 Work samples agree across native workers 1/2 and Verilator; 495 accepted tokens, 492 retired and three reset drops. Closed system: 16 cycles / 32 sampling epochs, both backends. Both standalone CTests pass.The catalog now contains 69 examples / 25 API cases and 66 / 13 systems. These are inventory counts, not full-catalog acceptance. The three remaining historical roots (
multirate_compute,nested_config_types,parameterized_types) require capabilities/policy that cannot be truthfully replaced by fixed fixtures; their exact original requirements are recorded in #272.The extra depth-32 Icarus known-value scaling probe exceeded its 600-second resource limit and was stopped after 707 seconds; its simulation was not run. It is not counted as passing. Required main Icarus X/Z coverage and depth-32 native/Verilator outcomes remain in the semantic gate. Exact evidence and reproduction are tracked in #265. Full nightly and cross-platform native release acceptance were not run.
Candidate-bound commands, hashes, independent reviews, results and performance records remain local ignored artifacts under
docs/gates/logs/array-scans-20261009/anddocs/gates/logs/array-scans-final-20261010/; no tests depend on those logs.Independent code review: APPROVE, all 36 files bound to reviewed content; architecture: CLEAR. Final local candidate:
21255887baf2e1141f9ec3c3c85812f0ae423c50. The native producer test checks exact input-derived AST sites, ordered iteration/call frames, outside-loop origin restoration and active malformed-frame rejection.