X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/c6c7e9aaac3b743f24a2be104fa027645a20217a..6db44d40a0cb94c4ad8fac6861e349057bf932e7:/src/mc/checker/LivenessChecker.cpp diff --git a/src/mc/checker/LivenessChecker.cpp b/src/mc/checker/LivenessChecker.cpp index 98e3c78c76..0b0aa17d0f 100644 --- a/src/mc/checker/LivenessChecker.cpp +++ b/src/mc/checker/LivenessChecker.cpp @@ -85,9 +85,9 @@ std::shared_ptr LivenessChecker::insert_acceptance_pair(simgrid::mc if (pair->search_cycle) for (auto i = res.first; i != res.second; ++i) { std::shared_ptr const& pair_test = *i; - if (xbt_automaton_state_compare(pair_test->automaton_state, new_pair->automaton_state) != 0 || + if (mcapi::get().automaton_state_compare(pair_test->automaton_state, new_pair->automaton_state) != 0 || *(pair_test->atomic_propositions) != *(new_pair->atomic_propositions) || - not snapshot_equal(pair_test->graph_state->system_state_.get(), new_pair->graph_state->system_state_.get())) + not mcapi::get().snapshot_equal(pair_test->graph_state->system_state_.get(), new_pair->graph_state->system_state_.get())) continue; XBT_INFO("Pair %d already reached (equal to pair %d) !", new_pair->num, pair_test->num); exploration_stack_.pop_back(); @@ -177,9 +177,9 @@ int LivenessChecker::insert_visited_pair(std::shared_ptr visited_pa for (auto i = range.first; i != range.second; ++i) { const VisitedPair* pair_test = i->get(); - if (xbt_automaton_state_compare(pair_test->automaton_state, visited_pair->automaton_state) != 0 || + if (mcapi::get().automaton_state_compare(pair_test->automaton_state, visited_pair->automaton_state) != 0 || *(pair_test->atomic_propositions) != *(visited_pair->atomic_propositions) || - not snapshot_equal(pair_test->graph_state->system_state_.get(), visited_pair->graph_state->system_state_.get())) + not mcapi::get().snapshot_equal(pair_test->graph_state->system_state_.get(), visited_pair->graph_state->system_state_.get())) continue; if (pair_test->other_num == -1) visited_pair->other_num = pair_test->num; @@ -375,7 +375,7 @@ void LivenessChecker::run() this->previous_request_.clear(); } this->previous_pair_ = current_pair->num; - this->previous_request_ = request_get_dot_output(req, req_num); + this->previous_request_ = mcapi::get().request_get_dot_output(req, req_num); if (current_pair->search_cycle) fprintf(dot_output, "%d [shape=doublecircle];\n", current_pair->num); fflush(dot_output); @@ -384,15 +384,16 @@ void LivenessChecker::run() XBT_DEBUG("Execute: %s", mcapi::get().request_to_string(req, req_num, RequestType::simix).c_str()); /* Update stats */ - mc_model_checker->executed_transitions++; + mcapi::get().mc_inc_executed_trans(); + if (not current_pair->exploration_started) visited_pairs_count_++; /* Answer the request */ - mc_model_checker->handle_simcall(current_pair->graph_state->transition_); + mcapi::get().handle_simcall(current_pair->graph_state->transition_); /* Wait for requests (schedules processes) */ - mc_model_checker->wait_for_requests(); + mcapi::get().mc_wait_for_requests(); current_pair->requests--; current_pair->exploration_started = true; @@ -411,7 +412,7 @@ void LivenessChecker::run() } XBT_INFO("No property violation found."); - mc::session->log_state(); + mcapi::get().log_state(); } Checker* createLivenessChecker(Session& s)