* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/mc/explo/LivenessChecker.hpp"
-#include "src/mc/Session.hpp"
+#include "src/mc/api/RemoteApp.hpp"
#include "src/mc/mc_config.hpp"
#include "src/mc/mc_exit.hpp"
#include "src/mc/mc_private.hpp"
if (not this->app_state_->get_system_state())
this->app_state_->set_system_state(std::make_shared<Snapshot>(pair_num));
this->heap_bytes_used = Api::get().get_remote_heap_bytes();
- this->actor_count_ = mc_model_checker->get_remote_process().actors().size();
+ this->actor_count_ = app_state_->get_actor_count();
this->other_num = -1;
this->atomic_propositions = std::move(atomic_propositions);
}
}
}
- get_session().restore_initial_state();
+ get_remote_app().restore_initial_state();
/* Traverse the stack from the initial state and re-execute the transitions */
int depth = 1;
}
}
-LivenessChecker::LivenessChecker(Session* session) : Exploration(session) {}
+LivenessChecker::LivenessChecker(RemoteApp& remote_app) : Exploration(remote_app) {}
RecordTrace LivenessChecker::get_record_trace() // override
{
XBT_INFO("Expanded pairs = %lu", expanded_pairs_count_);
XBT_INFO("Visited pairs = %lu", visited_pairs_count_);
XBT_INFO("Executed transitions = %lu", Transition::get_executed_transitions());
+ Exploration::log_state();
}
void LivenessChecker::show_acceptance_cycle(std::size_t depth)
++expanded_pairs_count_;
auto next_pair = std::make_shared<Pair>(expanded_pairs_count_);
next_pair->prop_state_ = state;
- next_pair->app_state_ = std::make_shared<State>(get_session());
+ next_pair->app_state_ = std::make_shared<State>(get_remote_app());
next_pair->atomic_propositions = std::move(propositions);
if (current_pair)
next_pair->depth = current_pair->depth + 1;
Api::get().automaton_load(_sg_mc_property_file.get().c_str());
XBT_DEBUG("Starting the liveness algorithm");
- get_session().take_initial_snapshot();
/* Initialize */
this->previous_pair_ = 0;
log_state();
}
-Exploration* create_liveness_checker(Session* session)
+Exploration* create_liveness_checker(RemoteApp& remote_app)
{
- return new LivenessChecker(session);
+ return new LivenessChecker(remote_app);
}
} // namespace simgrid::mc