Skip to content

Add simplified logic graph folding - #49

Merged
rollrat merged 5 commits into
masterfrom
codex/logic-graph-or-folding
Jun 19, 2026
Merged

Add simplified logic graph folding#49
rollrat merged 5 commits into
masterfrom
codex/logic-graph-or-folding

Conversation

@rollrat

@rollrat rollrat commented Jun 3, 2026

Copy link
Copy Markdown
Member

Summary

  • add simplified Logic Graph mode with optional high-level gate composition in the NBT viewer
  • fold OR chains while preserving binary fan-in
  • compose high-level And/Xor gates, including half/full-adder XOR cones via truth-table fallback

Verification

  • cargo test --release
  • cargo check --release -p nbt-sim-wasm
  • npm.cmd run build:wasm
  • npm.cmd run build
  • browser verified half-adder-generated.nbt Logic Graph Simplified + High-level has connected Xor inputs

@rollrat
rollrat force-pushed the codex/logic-graph-or-folding branch from 13a092b to 31a2ae9 Compare June 14, 2026 14:54
rollrat added 2 commits June 15, 2026 16:51
Skip simplified and high-level logic graph transforms for cyclic graphs because those passes rely on topological CSE. This keeps feedback-based NBT examples from panicking in the viewer while preserving the raw logic graph fallback.
Keep simplified and high-level logic graph passes useful for feedback-based circuits by skipping only CSE on cyclic graphs. OR folding now skips cyclic OR candidates instead of aborting the whole pass, so acyclic regions in counter examples can still fold and compose.
@rollrat
rollrat merged commit be3be20 into master Jun 19, 2026
2 checks passed
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