Skip to content

Commit 04e723c

Browse files
committed
update execute_sequence to account for epsilon
1 parent bdff49a commit 04e723c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

aalpy/base/Automaton.py

+3
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,9 @@ def make_input_complete(self, missing_transition_go_to='self_loop'):
143143
make_input_complete(self, missing_transition_go_to)
144144

145145
def execute_sequence(self, origin_state, seq):
146+
# to account epsilon in DFAs, Moore, MDPs machines
147+
if not seq:
148+
return origin_state.output
146149
self.current_state = origin_state
147150
return [self.step(s) for s in seq]
148151

0 commit comments

Comments
 (0)