Skip to content

Commit 92ec71c

Browse files
committed
ensure reproducibility of compute_characterization_set
1 parent aef5c31 commit 92ec71c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

aalpy/base/Automaton.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,12 @@ def compute_characterization_set(self, char_set_init=None,
400400
for new_block in new_blocks:
401401
blocks.append(new_block)
402402

403-
char_set = list(set(char_set))
403+
unique_char_set = []
404+
for seq in char_set:
405+
if seq not in unique_char_set:
406+
unique_char_set.append(seq)
407+
char_set = unique_char_set
408+
404409
if return_same_states:
405410
return None, None
406411
return char_set

0 commit comments

Comments
 (0)