-
Notifications
You must be signed in to change notification settings - Fork 0
Explorer
Explain some code gadgets in tango/core/explorer.py
_start
is changed when the original input has caused a new state, its caps at the end of the new-state-causing input.
_stop
continues to add up while the instructions inside the input are iterated.
If self._sman._last_state.last_input
is None
, it will return the current input sliced by self._start
and self._stop
. Otherwise, it returns the concatenation of last_input
and the sliced current input (by self._start
and self._stop
).
Calls _generator.update_state
and _strategy.update_state
Calls _generator.update_transition
and _strategy.update_transition
Used as an async iter
function to make the object an generator. It will iterate over the instructions inside the input. Everytime it updates the explorer, and checks if a state change has happened after the execution of an instruction (by the loader). If a state change happens within an input sequence, the input is split, where the first part is used as the transition and the second part continues to build up state for any following transition.