Skip to content

Fix equivalent Table projections and restore recursive array updates - #282

Merged
zhoubot merged 1 commit into
mainfrom
codex/recursive-array-updates
Oct 9, 2026
Merged

zhoubot merged 1 commit into
mainfrom
codex/recursive-array-updates

Conversation

@zhoubot

@zhoubot zhoubot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

A valid captured-value Table map followed by record construction could fail compilation because the record simplifier required identical MLIR types even when their hardware types were equivalent. Keep the verified aggregate projection when no exactly typed replacement exists. Genuine type mismatches, dominance checks, Bits provenance handling and dependency verification remain unchanged; no cast, API or backend path is added.

Restore the full historical recursive_array_updates example using this existing source surface: nominal Struct/Enum values, Tables of 3/5/3/65 elements, five actual immutable updates, all fourteen result fields (42 bits), and the original two depth-one queues. Zero initialization plus shared maps replaces 65 repeated seed literals; the modulo-three index is reused. A compact @system retains the original four cases.

Validation:

  • Independent native and public regressions fail with the old exact-type diagnostic, then pass with the repair. Native simplifier tests: 16/16, including exact-type preservation, unchanged dependencies/idempotence and genuine Table mismatch rejection.
  • Public record fixture: 24 known plus 4 X/Z rows, native workers 1/2, Verilator and Icarus; existing negative/output-protection checks retained.
  • API gate 22/22; source-system suite 43/43; related Python units 108/108.
  • Standalone and aggregate-selected example CTests: 2/2 each after final source refinement. Module: 4,669 Work samples, 2,314 accepted = 2,311 retired + 3 reset-discarded, peak depth two. Original goldens, 2,048 raw/replacement combinations, 256 identity cases and timing stress use independent full-array oracles.
  • Closed system: 16 cycles, 32 sampling epochs, 64 observations and 18 source-check definitions on both backends.
  • Changed-file pre-commit, strict MkDocs and diff checks passed. Source-import/transformed units reproduce the published bodies/interfaces byte-for-byte; both targets use the same final IR.

Local ignored evidence: docs/gates/logs/recursive-array-20261009/, with current stages in final-stages-shared-index/. An initial system-test launch lacked native-tool environment variables; its failed setup log is retained separately from the successful full rerun.

Root-specific four-state, exhaustive input-space, full-catalog/nightly and platform acceptance are not claimed. This closes one historical root; four remain in #272. Table-of-Table indexing and retired range/array APIs remain outside scope.

@zhoubot
zhoubot requested a review from xiekunpeng as a code owner October 9, 2026 13:05
@zhoubot
zhoubot merged commit aa1fc52 into main Oct 9, 2026
2 checks passed
@zhoubot
zhoubot deleted the codex/recursive-array-updates branch October 9, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant