A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Make Liveness and CommDet more similar to Safety
[simgrid.git]
/
src
/
mc
/
checker
/
CommunicationDeterminismChecker.cpp
diff --git
a/src/mc/checker/CommunicationDeterminismChecker.cpp
b/src/mc/checker/CommunicationDeterminismChecker.cpp
index e402b1ec3abd8d5adaa882bba8e52c275c8f6fc1..a1a136b39f2d342f6c3adea600c185b65b09687f 100644
(file)
--- a/
src/mc/checker/CommunicationDeterminismChecker.cpp
+++ b/
src/mc/checker/CommunicationDeterminismChecker.cpp
@@
-270,7
+270,7
@@
std::vector<std::string> CommunicationDeterminismChecker::get_textual_trace() //
{
std::vector<std::string> trace;
for (auto const& state : stack_)
- trace.push_back(
api::get().request_to_string(state->transition_.aid_, state->transition_.times_considered_
));
+ trace.push_back(
state->transition_.to_string(
));
return trace;
}
@@
-292,7
+292,7
@@
void CommunicationDeterminismChecker::log_state() // override
}
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_tra
ns());
+ XBT_INFO("Executed transitions = %lu",
Transition::get_executed_transitio
ns());
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");
@@
-369,13
+369,11
@@
void CommunicationDeterminismChecker::restoreState()
/* 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();
}
}
@@
-429,28
+427,23
@@
void CommunicationDeterminismChecker::real_run()
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(aid, 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(aid, req_num);
- api::get().mc_inc_executed_trans();
-
/* TODO : handle test and testany simcalls */
CallType call = CallType::NONE;
if (_sg_mc_comms_determinism || _sg_mc_send_determinism)
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_);