X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a476c1fc22cde6f6b539e5fa1cbdafe4cd5e6aac..239cd16f4e95031d3a106e487c1485726069f1d7:/src/mc/explo/LivenessChecker.cpp diff --git a/src/mc/explo/LivenessChecker.cpp b/src/mc/explo/LivenessChecker.cpp index 7aef933cc8..370a146d0b 100644 --- a/src/mc/explo/LivenessChecker.cpp +++ b/src/mc/explo/LivenessChecker.cpp @@ -19,13 +19,15 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_liveness, mc, "Logging specific to algorithms namespace simgrid::mc { VisitedPair::VisitedPair(int pair_num, xbt_automaton_state_t prop_state, - std::shared_ptr> atomic_propositions, std::shared_ptr app_state) + std::shared_ptr> atomic_propositions, std::shared_ptr app_state, + RemoteApp& remote_app) : num(pair_num), prop_state_(prop_state) { + auto& memory = mc_model_checker->get_remote_process_memory(); this->app_state_ = std::move(app_state); if (not this->app_state_->get_system_state()) - this->app_state_->set_system_state(std::make_shared(pair_num)); - this->heap_bytes_used = mc_model_checker->get_remote_process().get_remote_heap_bytes(); + this->app_state_->set_system_state(std::make_shared(pair_num, remote_app.get_page_store(), memory)); + this->heap_bytes_used = memory.get_remote_heap_bytes(); this->actor_count_ = app_state_->get_actor_count(); this->other_num = -1; this->atomic_propositions = std::move(atomic_propositions); @@ -59,8 +61,8 @@ std::shared_ptr> LivenessChecker::get_proposition_values( std::shared_ptr LivenessChecker::insert_acceptance_pair(simgrid::mc::Pair* pair) { - auto new_pair = - std::make_shared(pair->num, pair->prop_state_, pair->atomic_propositions, pair->app_state_); + auto new_pair = std::make_shared(pair->num, pair->prop_state_, pair->atomic_propositions, + pair->app_state_, get_remote_app()); auto [res_begin, res_end] = boost::range::equal_range(acceptance_pairs_, new_pair.get(), [](auto const& a, auto const& b) { @@ -101,7 +103,7 @@ void LivenessChecker::replay() if (_sg_mc_checkpoint > 0) { const Pair* pair = exploration_stack_.back().get(); if (const auto* system_state = pair->app_state_->get_system_state()) { - system_state->restore(&get_remote_app().get_remote_process()); + system_state->restore(get_remote_app().get_remote_process_memory()); return; } } @@ -137,8 +139,8 @@ int LivenessChecker::insert_visited_pair(std::shared_ptr visited_pa return -1; if (visited_pair == nullptr) - visited_pair = - std::make_shared(pair->num, pair->prop_state_, pair->atomic_propositions, pair->app_state_); + visited_pair = std::make_shared(pair->num, pair->prop_state_, pair->atomic_propositions, + pair->app_state_, get_remote_app()); auto [range_begin, range_end] = boost::range::equal_range(visited_pairs_, visited_pair.get(), [](auto const& a, auto const& b) { @@ -240,7 +242,7 @@ xbt_automaton_state_t LivenessChecker::get_automaton_transition_dst(xbt_dynar_t const xbt_automaton_transition* transition = xbt_dynar_get_as(dynar, index, xbt_automaton_transition_t); return transition->dst; } -void LivenessChecker::automaton_register_symbol(RemoteProcess const& remote_process, const char* name, +void LivenessChecker::automaton_register_symbol(RemoteProcessMemory const& remote_process, const char* name, RemotePtr address) { if (property_automaton_ == nullptr) @@ -397,7 +399,7 @@ void LivenessChecker::run() } } - current_pair->app_state_->execute_next(current_pair->app_state_->next_transition()); + current_pair->app_state_->execute_next(current_pair->app_state_->next_transition(), get_remote_app()); XBT_DEBUG("Execute: %s", current_pair->app_state_->get_transition()->to_string().c_str()); /* Update the dot output */