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: repeated systems flows like A > B twice collide on one name #399
Two flows with the same source and destination (A > B @ 3 and A > B @ 5) used to produce two variables with the same generated name.
The translator now numbers the repeats: the first is a_to_b, the second a_to_b_2, and the module names get the same suffix.
Example
A(10) > B @ 3
A > B @ 5
This translates, compiles and simulates; duplicate_parallel_flows_simulate_correctly checks it.
Remaining gap
The numbered names can still collide with a name the user wrote.
Adding a third flow A > B_2 @ 1 to the model above also generates a_to_b_2.
The engine rejects the result as a model with two variables of one name, so the run fails loudly rather than giving a wrong number, but the error names a variable the user never wrote.
That general problem (generated names colliding with user names) is tracked in #438.
Pointers
src/simlin-engine/src/systems/translate.rs: flow_suffixes in translate, and the tests duplicate_parallel_flows_produce_distinct_idents / duplicate_parallel_flows_simulate_correctly
changed the title [-]Systems format translator: duplicate source/dest flow pairs produce colliding identifiers[/-][+]engine: repeated systems flows like A > B twice collide on one name[/+]on Oct 12, 2026
translate() numbers repeated (source, dest) pairs via flow_suffixes (src/simlin-engine/src/systems/translate.rs:110-134), applied to the module, flow and waste idents (lines 154-158, 248, 275), from #398 (14c4653). duplicate_parallel_flows_produce_distinct_idents and duplicate_parallel_flows_simulate_correctly (translate.rs:1560, 1623) pin distinct names and a compiled run moving 1+2 per step.
Activity
[-]Systems format translator: duplicate source/dest flow pairs produce colliding identifiers[/-][+]engine: repeated systems flows like A > B twice collide on one name[/+]bpowers commentedon Oct 12, 2026
Closing: already fixed on main.
translate() numbers repeated (source, dest) pairs via flow_suffixes (src/simlin-engine/src/systems/translate.rs:110-134), applied to the module, flow and waste idents (lines 154-158, 248, 275), from #398 (14c4653). duplicate_parallel_flows_produce_distinct_idents and duplicate_parallel_flows_simulate_correctly (translate.rs:1560, 1623) pin distinct names and a compiled run moving 1+2 per step.