#include "src/mc/mc_record.h"
#include "src/mc/mc_protocol.h"
#include "src/mc/Client.hpp"
+#include "src/mc/Transition.hpp"
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc, "Logging specific to MC (global)");
namespace simgrid {
namespace mc {
-void handle_simcall(smx_simcall_t req, int value)
-{
- for (auto& pi : mc_model_checker->process().smx_process_infos)
- if (req == &pi.copy.simcall) {
- mc_model_checker->simcall_handle(
- mc_model_checker->process(), pi.copy.pid, value);
- return;
- }
- xbt_die("Could not find the request");
-}
-
/**
* \brief Re-executes from the state at position start all the transitions indicated by
* a given model-checker stack.
if (state == stack.back())
break;
- int value = state->req_num;
+ int req_num = state->transition.argument;
smx_simcall_t saved_req = &state->executed_req;
if (saved_req) {
/* Debug information */
XBT_DEBUG("Replay: %s (%p)",
simgrid::mc::request_to_string(
- req, value, simgrid::mc::RequestType::simix).c_str(),
+ req, req_num, simgrid::mc::RequestType::simix).c_str(),
state.get());
/* TODO : handle test and testany simcalls */
if (_sg_mc_comms_determinism || _sg_mc_send_determinism)
call = MC_get_call_type(req);
- simgrid::mc::handle_simcall(req, value);
+ mc_model_checker->handle_simcall(state->transition);
if (_sg_mc_comms_determinism || _sg_mc_send_determinism)
- MC_handle_comm_pattern(call, req, value, nullptr, 1);
+ MC_handle_comm_pattern(call, req, req_num, nullptr, 1);
mc_model_checker->wait_for_requests();
count++;