Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] s/value/req_num/ because 'value' does not convey any meaning
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 7 Apr 2016 11:23:02 +0000 (13:23 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 7 Apr 2016 11:23:49 +0000 (13:23 +0200)
src/mc/LivenessChecker.cpp
src/mc/mc_base.h
src/mc/mc_global.cpp

index 61cf565..f84e892 100644 (file)
@@ -199,7 +199,7 @@ void LivenessChecker::replay()
 
     if (pair->exploration_started) {
 
-      int value = state->req_num;
+      int req_num = state->req_num;
       smx_simcall_t saved_req = &state->executed_req;
 
       smx_simcall_t req = nullptr;
@@ -214,11 +214,11 @@ void LivenessChecker::replay()
         XBT_DEBUG("Replay (depth = %d) : %s (%p)",
           depth,
           simgrid::mc::request_to_string(
-            req, value, simgrid::mc::RequestType::simix).c_str(),
+            req, req_num, simgrid::mc::RequestType::simix).c_str(),
           state.get());
       }
 
-      simgrid::mc::handle_simcall(req, value);
+      simgrid::mc::handle_simcall(req, req_num);
       mc_model_checker->wait_for_requests();
     }
 
@@ -318,11 +318,11 @@ std::vector<std::string> LivenessChecker::getTextualTrace() // override
 {
   std::vector<std::string> trace;
   for (std::shared_ptr<Pair> const& pair : explorationStack_) {
-    int value = pair->graph_state->req_num;
+    int req_num = pair->graph_state->req_num;
     smx_simcall_t req = &pair->graph_state->executed_req;
     if (req && req->call != SIMCALL_NONE)
       trace.push_back(simgrid::mc::request_to_string(
-        req, value, simgrid::mc::RequestType::executed));
+        req, req_num, simgrid::mc::RequestType::executed));
   }
   return trace;
 }
index a37b947..516b0ff 100644 (file)
@@ -35,7 +35,7 @@ XBT_PRIVATE void wait_for_requests(void);
 XBT_PRIVATE extern std::vector<double> processes_time;
 
 /** Execute a given simcall */
-XBT_PRIVATE void handle_simcall(smx_simcall_t req, int value);
+XBT_PRIVATE void handle_simcall(smx_simcall_t req, int req_num);
 
 /** Check if the given simcall is visible
  *
index 0f882a2..766665b 100644 (file)
@@ -115,12 +115,12 @@ void MC_run()
 namespace simgrid {
 namespace mc {
 
-void handle_simcall(smx_simcall_t req, int value)
+void handle_simcall(smx_simcall_t req, int req_num)
 {
   for (auto& pi : mc_model_checker->process().smx_process_infos)
     if (req == &pi.copy.simcall) {
       mc_model_checker->simcall_handle(
-        mc_model_checker->process(), pi.copy.pid, value);
+        mc_model_checker->process(), pi.copy.pid, req_num);
       return;
     }
   xbt_die("Could not find the request");
@@ -171,7 +171,7 @@ void replay(std::list<std::unique_ptr<simgrid::mc::State>> const& stack)
     if (state == stack.back())
       break;
 
-    int value = state->req_num;
+    int req_num = state->req_num;
     smx_simcall_t saved_req = &state->executed_req;
     
     if (saved_req) {
@@ -184,7 +184,7 @@ void replay(std::list<std::unique_ptr<simgrid::mc::State>> const& stack)
       /* Debug information */
       XBT_DEBUG("Replay: %s (%p)",
         simgrid::mc::request_to_string(
-          req, value, simgrid::mc::RequestType::simix).c_str(),
+          req, req_num, simgrid::mc::RequestType::simix).c_str(),
         state.get());
 
       /* TODO : handle test and testany simcalls */
@@ -192,9 +192,9 @@ void replay(std::list<std::unique_ptr<simgrid::mc::State>> const& stack)
       if (_sg_mc_comms_determinism || _sg_mc_send_determinism)
         call = MC_get_call_type(req);
 
-      simgrid::mc::handle_simcall(req, value);
+      simgrid::mc::handle_simcall(req, req_num);
       if (_sg_mc_comms_determinism || _sg_mc_send_determinism)
-        MC_handle_comm_pattern(call, req, value, nullptr, 1);
+        MC_handle_comm_pattern(call, req, req_num, nullptr, 1);
       mc_model_checker->wait_for_requests();
 
       count++;