Skip to content

Commit c83d108

Browse files
author
Edi Muskardin
committed
fix potential infinite loop
1 parent 53ff651 commit c83d108

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aalpy/utils/ModelChecking.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def compare_automata(aut_1: DeterministicAutomaton, aut_2: DeterministicAutomato
331331
# be reached
332332
failsafe_counter = 0
333333
failsafe_stopping = num_cex * 100
334-
while len(found_cex) < num_cex or failsafe_counter == failsafe_stopping:
334+
while len(found_cex) < num_cex and failsafe_counter < failsafe_stopping:
335335
cex = eq_oracle.find_cex(test_automaton)
336336
# if no counterexample can be found terminate the loop
337337
if cex is None:

0 commit comments

Comments
 (0)