def __init__(self, context): self.context = context # Simulation context (keeps information about current state) self._ready = False self._hooks = {} self._modules = [] self._executor = None self._before_instruction_executor = HookExecutor() self._after_instruction_executor = HookExecutor() self._first_loop = True self._infinite_loop_error = False