# Use `set()` less

This leads to non-deterministic behavior.

Often it would be possible to just replace these with lists.

When they are used to find unique values, one can either use a `dict`

with `None`

values or sort the results in a well-defined order after going back to a list.

Not sure if networkx may use a set to store graphs though, so it may not be fully possible to get deterministic behavior.

Context:

Run the architecture example a few times and the same code twice yields different results (possibly you will have to swap `add4`

for it to happen. In this case it can be dealt with by moving memory variables to go from one to the other, but it is a bit annoying.

One should possibly also think about another port-splitting-algorithm that is deterministic. (Something like left-edge will actually work and will also work for more than one read/writeport, although it will probably be noticeable that it is sub-optimal more often then...)