Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill a now unused parameter
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 6 Feb 2022 23:56:06 +0000 (00:56 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Mon, 7 Feb 2022 15:44:30 +0000 (16:44 +0100)
src/mc/api.cpp
src/mc/api.hpp
src/mc/checker/LivenessChecker.cpp
src/mc/checker/SafetyChecker.cpp

index 93a729e..0a45d97 100644 (file)
@@ -479,7 +479,7 @@ void Api::s_close() const
   session_singleton->close();
 }
 
-RemotePtr<simgrid::kernel::actor::SimcallObserver> Api::execute(Transition& transition, smx_simcall_t simcall) const
+RemotePtr<simgrid::kernel::actor::SimcallObserver> Api::execute(Transition& transition) const
 {
   /* FIXME: once all simcalls have observers, kill the simcall parameter and use mc_model_checker->simcall_to_string() */
   transition.textual = request_to_string(transition.aid_, transition.times_considered_);
index 4ca81f0..ed944ee 100644 (file)
@@ -129,7 +129,7 @@ public:
 
   // SESSION APIs
   void s_close() const;
-  RemotePtr<simgrid::kernel::actor::SimcallObserver> execute(Transition& transition, smx_simcall_t simcall) const;
+  RemotePtr<simgrid::kernel::actor::SimcallObserver> execute(Transition& transition) const;
 
 // AUTOMATION APIs
 #if SIMGRID_HAVE_MC
index d1dac4b..c11d63a 100644 (file)
@@ -122,21 +122,12 @@ void LivenessChecker::replay()
     std::shared_ptr<State> state = pair->graph_state;
 
     if (pair->exploration_started) {
-      const s_smx_simcall* saved_req = &state->executed_req_;
-
-      smx_simcall_t req = nullptr;
-
-      /* because we got a copy of the executed request, we have to fetch the
-         real one, pointed by the request field of the issuer process */
-      const smx_actor_t issuer = api::get().simcall_get_issuer(saved_req);
-      req                      = &issuer->simcall_;
-
       /* Debug information */
       XBT_DEBUG("Replay (depth = %d) : %s (%p)", depth,
                 api::get().request_to_string(state->transition_.aid_, state->transition_.times_considered_).c_str(),
                 state.get());
 
-      api::get().execute(state->transition_, req);
+      api::get().execute(state->transition_);
     }
 
     /* Update statistics */
index 5d2208f..8b8dcb8 100644 (file)
@@ -124,7 +124,7 @@ void SafetyChecker::run()
     }
 
     /* Actually answer the request: let execute the selected request (MCed does one step) */
-    auto remote_observer = api::get().execute(state->transition_, &state->executed_req_);
+    auto remote_observer = api::get().execute(state->transition_);
 
     // If there are processes to interleave and the maximum depth has not been
     // reached then perform one step of the exploration algorithm.
@@ -248,7 +248,7 @@ void SafetyChecker::restore_state()
   for (std::unique_ptr<State> const& state : stack_) {
     if (state == stack_.back())
       break;
-    api::get().execute(state->transition_, &state->executed_req_);
+    api::get().execute(state->transition_);
     /* Update statistics */
     api::get().mc_inc_visited_states();
     api::get().mc_inc_executed_trans();