Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill 2 more functions from mc::api
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Thu, 4 Aug 2022 14:28:55 +0000 (16:28 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Thu, 4 Aug 2022 14:28:55 +0000 (16:28 +0200)
src/mc/api.cpp
src/mc/api.hpp
src/mc/explo/DFSExplorer.cpp

index a49f6e2..b885957 100644 (file)
@@ -81,16 +81,6 @@ std::size_t Api::get_remote_heap_bytes() const
   return heap_bytes_used;
 }
 
-void Api::mc_inc_visited_states() const
-{
-  mc_model_checker->inc_visited_states();
-}
-
-unsigned long Api::mc_get_visited_states() const
-{
-  return mc_model_checker->get_visited_states();
-}
-
 void Api::restore_state(const simgrid::mc::Snapshot* system_state) const
 {
   system_state->restore(&mc_model_checker->get_remote_process());
index b07437a..2a667f7 100644 (file)
@@ -59,10 +59,6 @@ public:
   // REMOTE APIs
   std::size_t get_remote_heap_bytes() const;
 
-  // MODEL CHECKER APIs
-  void mc_inc_visited_states() const;
-  unsigned long mc_get_visited_states() const;
-
   // STATE APIs
   void restore_state(const Snapshot* system_state) const;
 
index 9a61e12..a60383e 100644 (file)
@@ -79,7 +79,7 @@ void DFSExplorer::log_state() // override
   on_log_state_signal();
   XBT_INFO("DFS exploration ended. %ld unique states visited; %ld backtracks (%lu transition replays, %lu states "
            "visited overall)",
-           State::get_expanded_states(), backtrack_count_, Api::get().mc_get_visited_states(),
+           State::get_expanded_states(), backtrack_count_, mc_model_checker->get_visited_states(),
            Transition::get_replayed_transitions());
 }
 
@@ -98,7 +98,7 @@ void DFSExplorer::run()
     XBT_DEBUG("Exploration depth=%zu (state:%ld; %zu interleaves)", stack_.size(), state->get_num(),
               state->count_todo());
 
-    Api::get().mc_inc_visited_states();
+    mc_model_checker->inc_visited_states();
 
     // Backtrack if we reached the maximum depth
     if (stack_.size() > (std::size_t)_sg_mc_max_depth) {
@@ -262,7 +262,7 @@ void DFSExplorer::restore_state()
     state->get_transition()->replay();
     on_transition_replay_signal(state->get_transition());
     /* Update statistics */
-    Api::get().mc_inc_visited_states();
+    mc_model_checker->inc_visited_states();
   }
 }