xbt_assert(mc_model_checker == nullptr, "Did you manage to start the MC twice in this process?");
- checker_side_ = std::make_unique<simgrid::mc::CheckerSide>(sockets[1]);
auto memory = std::make_unique<simgrid::mc::RemoteProcessMemory>(pid);
model_checker_ = std::make_unique<simgrid::mc::ModelChecker>(std::move(memory));
mc_model_checker = model_checker_.get();
+ checker_side_ = std::make_unique<simgrid::mc::CheckerSide>(sockets[1], model_checker_.get());
start();
}
void RemoteApp::start()
{
- checker_side_->start(model_checker_.get());
-
XBT_DEBUG("Waiting for the model-checked process");
int status;
to_c_str(message.type), (int)message.type, (int)MessageType::DEADLOCK_CHECK_REPLY);
if (message.value != 0) {
+ auto* explo = Exploration::get_instance();
XBT_CINFO(mc_global, "Counter-example execution trace:");
- for (auto const& frame : model_checker_->get_exploration()->get_textual_trace())
+ for (auto const& frame : explo->get_textual_trace())
XBT_CINFO(mc_global, " %s", frame.c_str());
XBT_INFO("You can debug the problem (and see the whole details) by rerunning out of simgrid-mc with "
"--cfg=model-check/replay:'%s'",
- model_checker_->get_exploration()->get_record_trace().to_string().c_str());
- model_checker_->get_exploration()->log_state();
+ explo->get_record_trace().to_string().c_str());
+ explo->log_state();
throw DeadlockError();
}
}
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);