Skip to content

Preserve aggregate state through SCF - #650

Draft
iangneal wants to merge 1 commit into
codex/circom-analysis-2-aggregate-storagefrom
codex/circom-analysis-3-scf-aggregates
Draft

Preserve aggregate state through SCF#650
iangneal wants to merge 1 commit into
codex/circom-analysis-2-aggregate-storagefrom
codex/circom-analysis-3-scf-aggregates

Conversation

@iangneal

@iangneal iangneal commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Preserves aggregate analysis state across SCF loops using the storage model from #649. This is PR 3 of 6 in the stacked series.

Related issues

No standalone issue; depends on #649.

Changes

  • Carry aggregate state through scf.while operands, block arguments, conditions, yields, and results.
  • Support resultless array writes/inserts, nested and dynamic writes, and static loop-index ranges.
  • Conservatively fold reads and materialize small static nondeterministic arrays from final storage.
  • Add focused regressions for array-of-POD loop state, nested writes, post-loop reads, and conservative intervals.

Testing

  • git diff --check
  • Focused SCF aggregate-state analysis regressions
  • nix build -L on this exact stacked commit (371 lit tests plus the full unit/CAPI suite passed)

Submission checklist

  • If I am an external contributor, this PR has a linked issue marked approved; otherwise, this does not apply.
  • I added or updated tests for all relevant behavior, or explained above why tests are not needed.
  • I updated the relevant TableGen or other documentation, or explained above why documentation is not needed.
  • I added a changelog entry describing user-visible changes. (create-changelog in the Nix development shell creates a template.)
  • I enabled Allow edits from maintainers if this PR comes from a fork.

AI assistance

  • No AI tools contributed to this PR.
  • AI tools contributed to this PR.

Tools used: OpenAI Codex.

How the tools contributed: Codex helped partition the original working-tree change, preserve dependency ordering, add focused regressions, and prepare this draft PR.

How I verified the contribution: Reviewed the isolated diff and ran git diff --check, the focused analysis regressions through the project test suite, and nix build -L on this exact commit.

@iangneal
iangneal force-pushed the codex/circom-analysis-3-scf-aggregates branch from 4955055 to a63f2ff Compare July 28, 2026 20:07
@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Test Results

  2 files  ±0    2 suites  ±0   8m 18s ⏱️ - 1m 33s
371 tests ±0  367 ✅ ±0  4 💤 ±0  0 ❌ ±0 
742 runs  ±0  734 ✅ ±0  8 💤 ±0  0 ❌ ±0 

Results for commit df58ee6. ± Comparison against base commit e845f58.

♻️ This comment has been updated with latest results.

@iangneal
iangneal force-pushed the codex/circom-analysis-3-scf-aggregates branch from a63f2ff to a195113 Compare July 28, 2026 22:08
@iangneal
iangneal force-pushed the codex/circom-analysis-3-scf-aggregates branch from a195113 to 6618a80 Compare July 28, 2026 22:24
@iangneal
iangneal force-pushed the codex/circom-analysis-3-scf-aggregates branch from 6618a80 to 9eb7629 Compare July 28, 2026 22:46
@iangneal
iangneal force-pushed the codex/circom-analysis-3-scf-aggregates branch from 9eb7629 to 566713d Compare July 29, 2026 02:20
@iangneal
iangneal force-pushed the codex/circom-analysis-3-scf-aggregates branch from 566713d to 78e4176 Compare July 29, 2026 15:06
@iangneal
iangneal force-pushed the codex/circom-analysis-3-scf-aggregates branch from 78e4176 to ccdeafb Compare July 29, 2026 15:30
@iangneal
iangneal force-pushed the codex/circom-analysis-3-scf-aggregates branch from ccdeafb to 305824f Compare July 29, 2026 16:07
@iangneal
iangneal force-pushed the codex/circom-analysis-3-scf-aggregates branch from 305824f to df58ee6 Compare July 29, 2026 17:05
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