xbt_assert(mc_model_checker == nullptr, "Did you manage to start the MC twice in this process?");
- auto process = std::make_unique<simgrid::mc::RemoteSimulation>(pid);
+ auto process = std::make_unique<simgrid::mc::RemoteProcess>(pid);
model_checker_ = std::make_unique<simgrid::mc::ModelChecker>(std::move(process), sockets[1]);
mc_model_checker = model_checker_.get();
this->close();
}
-/** Take the initial snapshot of the application, that must be stopped. */
-void Session::initialize()
+/** The application must be stopped. */
+void Session::take_initial_snapshot()
{
xbt_assert(initial_snapshot_ == nullptr);
model_checker_->wait_for_requests();
void Session::restore_initial_state() const
{
- this->initial_snapshot_->restore(&model_checker_->get_remote_simulation());
+ this->initial_snapshot_->restore(&model_checker_->get_remote_process());
}
void Session::log_state() const
bool Session::actor_is_enabled(aid_t pid) const
{
- s_mc_message_actor_enabled_t msg{simgrid::mc::MessageType::ACTOR_ENABLED, pid};
+ s_mc_message_actor_enabled_t msg{};
+ msg.type = simgrid::mc::MessageType::ACTOR_ENABLED;
+ msg.aid = pid;
model_checker_->channel().send(msg);
std::array<char, MC_MESSAGE_LENGTH> buff;
ssize_t received = model_checker_->channel().receive(buff.data(), buff.size(), true);