From d1119770214b91a343a90e1543cd2bd6a072c102 Mon Sep 17 00:00:00 2001 From: Tamim Burgstaller Date: Wed, 15 Jul 2026 11:18:14 +0200 Subject: [PATCH] Fix prefix computation on loading automata from file --- aalpy/utils/FileHandler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aalpy/utils/FileHandler.py b/aalpy/utils/FileHandler.py index 820019ea5a..e3f652e600 100644 --- a/aalpy/utils/FileHandler.py +++ b/aalpy/utils/FileHandler.py @@ -406,7 +406,7 @@ def load_automaton_from_file(path, automaton_type, compute_prefixes=False): automaton = aut_type(initial_state, list(node_label_dict.values())) if automaton_type not in {'mc', 'sevpa', 'vpa'} and not automaton.is_input_complete(): print('Warning: Loaded automaton is not input complete.') - if compute_prefixes and not automaton_type not in {'mc', 'sevpa', 'vpa'}: + if compute_prefixes and automaton_type not in {'mc', 'sevpa', 'vpa'}: for state in automaton.states: state.prefix = automaton.get_shortest_path(automaton.initial_state, state) return automaton