You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
engine: models with many shared graphical functions fail to compile #582
When the per-variable compiled pieces of a model were joined, every piece carried its own copy of each graphical function it used, and nothing removed the duplicates.
The bytecode names a graphical function with an 8-bit id, so a model with about 165 distinct tables, each used by many variables, ran past 256 and failed to compile:
graphical function offset 493 exceeds GraphicalFunctionId capacity (u8::MAX = 255)
This blocked C-LEARN.
Status
Fixed on main by #592.
The merger now de-duplicates graphical functions by content, so the count is the number of distinct tables, and still refuses with an error (not a wrapped id) if a model really has more than 256.
Pointers
src/simlin-engine/src/compiler/symbolic.rs: FragmentMerger, the GraphicalFunctionId capacity check
changed the title [-]engine: GraphicalFunctionId u8 overflow in concatenate_fragments (no cross-fragment GF de-duplication)[/-][+]engine: models with many shared graphical functions fail to compile[/+]on Oct 12, 2026
FragmentMerger::absorb_gf (src/simlin-engine/src/compiler/symbolic.rs:1890-1945) de-duplicates graphical-function blocks by bit-exact content and errors loudly only when the distinct count exceeds 256. Pinned by the #582 dedup tests in the same file (~3680 onward, including test_concatenate_genuinely_distinct_gf_over_capacity_fails_loud at :4205), and C-LEARN compiles in the default suite (simulates_clearn).
Activity
doc: add phase 6 task 6 for #582 cross-fragment GF de-dup
engine: cross-fragment graphical-function de-duplication (#582)
doc: add phase 6 task 7 for #583 temp recycle fix
engine: C-LEARN incremental structural-gate test (AC7.1-7.3, AC7.5)
doc: update engine context for element-cycle resolution
doc: index element-cycle-resolution plan; test-requirements finalizat…
engine: element-level cycle resolution (C-LEARN hero model) (#592)
[-]engine: GraphicalFunctionId u8 overflow in concatenate_fragments (no cross-fragment GF de-duplication)[/-][+]engine: models with many shared graphical functions fail to compile[/+]bpowers commentedon Oct 12, 2026
Closing: already fixed on main.
FragmentMerger::absorb_gf (src/simlin-engine/src/compiler/symbolic.rs:1890-1945) de-duplicates graphical-function blocks by bit-exact content and errors loudly only when the distinct count exceeds 256. Pinned by the #582 dedup tests in the same file (~3680 onward, including test_concatenate_genuinely_distinct_gf_over_capacity_fails_loud at :4205), and C-LEARN compiles in the default suite (simulates_clearn).