X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/26396651a32ba7c1e442c25878860926126911cf..8a29ec178138b36c899833d9f369df06b329cda5:/src/mc/api.cpp diff --git a/src/mc/api.cpp b/src/mc/api.cpp index 71969e1327..48005729fa 100644 --- a/src/mc/api.cpp +++ b/src/mc/api.cpp @@ -28,12 +28,10 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(Api, mc, "Logging specific to MC Facade APIs "); XBT_LOG_EXTERNAL_CATEGORY(mc_global); -using Simcall = simgrid::simix::Simcall; - namespace simgrid { namespace mc { -simgrid::mc::Exploration* Api::initialize(char** argv, simgrid::mc::CheckerAlgorithm algo) +simgrid::mc::Exploration* Api::initialize(char** argv, simgrid::mc::ExplorationAlgorithm algo) { session_ = std::make_unique([argv] { int i = 1; @@ -47,19 +45,19 @@ simgrid::mc::Exploration* Api::initialize(char** argv, simgrid::mc::CheckerAlgor simgrid::mc::Exploration* explo; switch (algo) { - case CheckerAlgorithm::CommDeterminism: + case ExplorationAlgorithm::CommDeterminism: explo = simgrid::mc::create_communication_determinism_checker(session_.get()); break; - case CheckerAlgorithm::UDPOR: + case ExplorationAlgorithm::UDPOR: explo = simgrid::mc::create_udpor_checker(session_.get()); break; - case CheckerAlgorithm::Safety: - explo = simgrid::mc::create_safety_checker(session_.get()); + case ExplorationAlgorithm::Safety: + explo = simgrid::mc::create_dfs_exploration(session_.get()); break; - case CheckerAlgorithm::Liveness: + case ExplorationAlgorithm::Liveness: explo = simgrid::mc::create_liveness_checker(session_.get()); break; @@ -90,12 +88,12 @@ std::size_t Api::get_remote_heap_bytes() const void Api::mc_inc_visited_states() const { - mc_model_checker->visited_states++; + mc_model_checker->inc_visited_states(); } unsigned long Api::mc_get_visited_states() const { - return mc_model_checker->visited_states; + return mc_model_checker->get_visited_states(); } void Api::mc_exit(int status) const @@ -103,7 +101,7 @@ void Api::mc_exit(int status) const mc_model_checker->exit(status); } -void Api::restore_state(std::shared_ptr system_state) const +void Api::restore_state(const simgrid::mc::Snapshot* system_state) const { system_state->restore(&mc_model_checker->get_remote_process()); }