} // namespace kernel
namespace mc {
class State;
+class RemoteApp;
}
} // namespace simgrid
get_remote_process_memory().clear_cache();
if (this->get_remote_process_memory().running())
- checker_side_->dispatch();
+ checker_side_->dispatch_events();
}
void RemoteApp::shutdown()
get_remote_process_memory().clear_cache();
if (this->get_remote_process_memory().running())
- checker_side_->dispatch(); // The app may send messages while processing the transition
+ checker_side_->dispatch_events(); // The app may send messages while processing the transition
s_mc_message_simcall_execute_answer_t answer;
ssize_t s = checker_side_->get_channel().receive(answer);
for (std::unique_ptr<State> const& state : stack_) {
if (state == stack_.back()) /* If we are arrived on the target state, don't replay the outgoing transition */
break;
- state->get_transition()->replay();
+ state->get_transition()->replay(get_remote_app());
on_transition_replay_signal(state->get_transition(), get_remote_app());
visited_states_count_++;
}
std::shared_ptr<State> state = pair->app_state_;
if (pair->exploration_started) {
- state->get_transition()->replay();
+ state->get_transition()->replay(get_remote_app());
XBT_DEBUG("Replay (depth = %d) : %s (%p)", depth, state->get_transition()->to_string().c_str(), state.get());
}
signal_event_.reset(signal_event);
}
-void CheckerSide::dispatch() const
+void CheckerSide::dispatch_events() const
{
event_base_dispatch(base_.get());
}
Channel const& get_channel() const { return channel_; }
Channel& get_channel() { return channel_; }
- void dispatch() const;
+ void dispatch_events() const;
void break_loop() const;
};
return xbt::string_printf("label = \"[(%ld)] %s\", color = %s, fontcolor = %s", aid_, Transition::to_c_str(type_),
color, color);
}
-void Transition::replay() const
+void Transition::replay(RemoteApp& app) const
{
replayed_transitions_++;
#if SIMGRID_HAVE_MC
- mc_model_checker->get_exploration()->get_remote_app().handle_simcall(aid_, times_considered_, false);
- mc_model_checker->get_exploration()->get_remote_app().wait_for_requests();
+ app.handle_simcall(aid_, times_considered_, false);
+ app.wait_for_requests();
#endif
}
virtual std::string dot_string() const;
/* Moves the application toward a path that was already explored, but don't change the current transition */
- void replay() const;
+ void replay(RemoteApp& app) const;
virtual bool depends(const Transition* other) const { return true; }