diff options
author | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-06-06 14:40:37 +0200 |
---|---|---|
committer | Birte Kristina Friesel <birte.friesel@uos.de> | 2025-06-06 14:40:37 +0200 |
commit | 5c17bafad22901b46a912301e275c48cec8effb1 (patch) | |
tree | 528d1f4c48f1b10d05ee9a7f33ff6f8d35656082 /lib/behaviour.py | |
parent | ab87a38312f27a6cbd8ea44b56e0bff6ff254569 (diff) |
SDKBehaviourModel: get_trace: deal with q→q loopsmain
Diffstat (limited to 'lib/behaviour.py')
-rw-r--r-- | lib/behaviour.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/behaviour.py b/lib/behaviour.py index d243b26..626d3c2 100644 --- a/lib/behaviour.py +++ b/lib/behaviour.py @@ -94,6 +94,7 @@ class SDKBehaviourModel: while current_state != "__end__": next_states = delta[current_state] + states_seen.add(current_state) next_states = list(filter(lambda q: q not in states_seen, next_states)) if len(next_states) == 0: @@ -101,7 +102,7 @@ class SDKBehaviourModel: f"get_trace({name}, {param_dict}): found infinite loop at {trace}" ) - if len(next_states) > 1 and current_state in self.transition_guard: + if len(next_states) > 1 and self.transition_guard[current_state]: matching_next_states = list() for candidate in next_states: for condition in self.transition_guard[current_state][candidate]: @@ -127,7 +128,6 @@ class SDKBehaviourModel: (next_state,) = next_states trace.append(next_state) - states_seen.add(current_state) current_state = next_state return trace |