+ const aid_t next_actor = e.get_transition()->aid_;
+
+ // TODO: Add the trace if possible for reporting a bug
+ xbt_assert(next_actor >= 0, "\n\n****** INVARIANT VIOLATION ******\n"
+ "In reaching this execution path, UDPOR ensures that at least one\n"
+ "one transition of the state of an visited event is enabled, yet no\n"
+ "state was actually enabled. Please report this as a bug.\n"
+ "*********************************\n\n");
+ state.execute_next(next_actor, get_remote_app());
+}
+
+void UdporChecker::restore_program_state_with_current_stack()
+{
+ get_remote_app().restore_initial_state();
+
+ /* Traverse the stack from the state at position start and re-execute the transitions */
+ for (const std::unique_ptr<State>& state : state_stack) {
+ if (state == state_stack.back()) /* If we are arrived on the target state, don't replay the outgoing transition */
+ break;
+ state->get_transition()->replay(get_remote_app());
+ }
+}
+
+std::unique_ptr<State> UdporChecker::record_current_state()
+{
+ auto next_state = this->get_current_state();
+
+ // In UDPOR, we care about all enabled transitions in a given state
+ next_state->consider_all();
+
+ return next_state;