Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill another function of mc::api
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 2 Aug 2022 12:06:47 +0000 (14:06 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Tue, 2 Aug 2022 21:29:53 +0000 (23:29 +0200)
src/mc/api.cpp
src/mc/api.hpp
src/mc/explo/CommunicationDeterminismChecker.cpp

index f670433..80101e4 100644 (file)
@@ -91,11 +91,6 @@ unsigned long Api::mc_get_visited_states() const
   return mc_model_checker->get_visited_states();
 }
 
-void Api::mc_exit(int status) const
-{
-  mc_model_checker->exit(status);
-}
-
 void Api::restore_state(const simgrid::mc::Snapshot* system_state) const
 {
   system_state->restore(&mc_model_checker->get_remote_process());
index 3631479..346ed7e 100644 (file)
@@ -62,7 +62,6 @@ public:
   // MODEL CHECKER APIs
   void mc_inc_visited_states() const;
   unsigned long mc_get_visited_states() const;
-  XBT_ATTRIB_NORETURN void mc_exit(int status) const;
 
   // STATE APIs
   void restore_state(const Snapshot* system_state) const;
index 1f3c1ed..1099126 100644 (file)
@@ -203,7 +203,7 @@ void CommDetExtension::enforce_deterministic_pattern(aid_t actor, const PatternC
       XBT_INFO("*********************************************************");
       XBT_INFO("%s", send_diff.c_str());
       Api::get().get_remote_app().log_state();
-      Api::get().mc_exit(SIMGRID_MC_EXIT_NON_DETERMINISM);
+      mc_model_checker->exit(SIMGRID_MC_EXIT_NON_DETERMINISM);
     } else if (_sg_mc_comms_determinism && (not send_deterministic && not recv_deterministic)) {
       XBT_INFO("****************************************************");
       XBT_INFO("***** Non-deterministic communications pattern *****");
@@ -213,7 +213,7 @@ void CommDetExtension::enforce_deterministic_pattern(aid_t actor, const PatternC
       if (not recv_diff.empty())
         XBT_INFO("%s", recv_diff.c_str());
       Api::get().get_remote_app().log_state();
-      Api::get().mc_exit(SIMGRID_MC_EXIT_NON_DETERMINISM);
+      mc_model_checker->exit(SIMGRID_MC_EXIT_NON_DETERMINISM);
     }
   }
 }