std::vector<std::string> CommunicationDeterminismChecker::get_textual_trace() // override
{
std::vector<std::string> trace;
- for (auto const& state : stack_) {
- smx_simcall_t req = &state->executed_req_;
- trace.push_back(api::get().request_to_string(req, state->transition_.times_considered_));
- }
+ for (auto const& state : stack_)
+ trace.push_back(state->transition_.to_string());
return trace;
}
}
XBT_INFO("Expanded states = %lu", expanded_states_count_);
XBT_INFO("Visited states = %lu", api::get().mc_get_visited_states());
- XBT_INFO("Executed transitions = %lu", api::get().mc_get_executed_trans());
+ XBT_INFO("Executed transitions = %lu", Transition::get_executed_transitions());
XBT_INFO("Send-deterministic : %s", this->send_deterministic ? "Yes" : "No");
if (_sg_mc_comms_determinism)
XBT_INFO("Recv-deterministic : %s", this->recv_deterministic ? "Yes" : "No");
/* TODO : handle test and testany simcalls */
CallType call = MC_get_call_type(req);
- api::get().handle_simcall(state->transition_);
+ state->transition_.execute();
handle_comm_pattern(call, req, req_num, 1);
- api::get().mc_wait_for_requests();
/* Update statistics */
api::get().mc_inc_visited_states();
- api::get().mc_inc_executed_trans();
}
}
found_transition = api::get().mc_state_choose_request(cur_state);
if (found_transition && visited_state == nullptr) {
+ aid_t aid = cur_state->transition_.aid_;
int req_num = cur_state->transition_.times_considered_;
smx_simcall_t req = &cur_state->executed_req_;
- XBT_DEBUG("Execute: %s", api::get().request_to_string(req, req_num).c_str());
+ XBT_DEBUG("Execute: %s", cur_state->transition_.to_string().c_str());
std::string req_str;
if (dot_output != nullptr)
- req_str = api::get().request_get_dot_output(req, req_num);
-
- api::get().mc_inc_executed_trans();
+ req_str = api::get().request_get_dot_output(aid, req_num);
/* TODO : handle test and testany simcalls */
CallType call = CallType::NONE;
call = MC_get_call_type(req);
/* Answer the request */
- api::get().handle_simcall(cur_state->transition_);
+ cur_state->transition_.execute();
/* After this call req is no longer useful */
handle_comm_pattern(call, req, req_num, 0);
- /* Wait for requests (schedules processes) */
- api::get().mc_wait_for_requests();
-
/* Create the new expanded state */
++expanded_states_count_;
auto next_state = std::make_unique<State>(expanded_states_count_);