Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Do not use reduction_mode outside of the safety algorithm
authorGabriel Corona <gabriel.corona@loria.fr>
Mon, 21 Mar 2016 15:45:52 +0000 (16:45 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Wed, 23 Mar 2016 10:19:04 +0000 (11:19 +0100)
src/mc/SafetyChecker.cpp
src/mc/mc_comm_determinism.cpp
src/mc/mc_liveness.cpp
src/mc/mc_request.cpp

index b37bf5f..d6a24e1 100644 (file)
@@ -201,7 +201,8 @@ static int modelcheck_safety(void)
               "use --cfg=model-check/reduction:none");
           const smx_process_t issuer = MC_smx_simcall_get_issuer(req);
           xbt_fifo_foreach(mc_stack, item, prev_state, mc_state_t) {
-            if (simgrid::mc::request_depend(req, MC_state_get_internal_request(prev_state))) {
+            if (simgrid::mc::reduction_mode != simgrid::mc::ReductionMode::none
+                && simgrid::mc::request_depend(req, MC_state_get_internal_request(prev_state))) {
               if (XBT_LOG_ISENABLED(mc_safety, xbt_log_priority_debug)) {
                 XBT_DEBUG("Dependent Transitions:");
                 smx_simcall_t prev_req = MC_state_get_executed_request(prev_state, &value);
index d16cd27..7e7d2b1 100644 (file)
@@ -462,7 +462,6 @@ static int MC_modelcheck_comm_determinism_main(void)
 int MC_modelcheck_comm_determinism(void)
 {
   XBT_INFO("Check communication determinism");
-  simgrid::mc::reduction_mode = simgrid::mc::ReductionMode::none;
   mc_model_checker->wait_for_requests();
 
   if (mc_mode == MC_MODE_CLIENT)
index c9202f5..edf700d 100644 (file)
@@ -373,8 +373,6 @@ static int MC_modelcheck_liveness_main(void)
 
 int modelcheck_liveness(void)
 {
-  if (simgrid::mc::reduction_mode == simgrid::mc::ReductionMode::unset)
-    simgrid::mc::reduction_mode = simgrid::mc::ReductionMode::none;
   XBT_INFO("Check the liveness property %s", _sg_mc_property_file);
   MC_automaton_load(_sg_mc_property_file);
   mc_model_checker->wait_for_requests();
index 91f02cc..1404c21 100644 (file)
@@ -136,9 +136,6 @@ bool request_depend_asymmetric(smx_simcall_t r1, smx_simcall_t r2)
 // Those are MC_state_get_internal_request(state)
 bool request_depend(smx_simcall_t r1, smx_simcall_t r2)
 {
-  if (simgrid::mc::reduction_mode == simgrid::mc::ReductionMode::none)
-    return true;
-
   if (r1->issuer == r2->issuer)
     return false;