Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix ODPOR: overapproximate ReversibleRace (to not miss branches) and survive overapprox
[simgrid.git] / src / mc / explo / odpor / ReversibleRaceCalculator.cpp
index b20ebaa..f449d6a 100644 (file)
@@ -168,7 +168,7 @@ bool ReversibleRaceCalculator::is_race_reversible_SemWait(const Execution& E, Ex
   // Reversible with everynbody but unlock which creates a free token
   const auto e1_transition = E.get_transition_for_handle(e1);
   if (e1_transition->type_ == Transition::Type::SEM_UNLOCK &&
-      static_cast<const SemaphoreTransition*>(e1_transition)->get_capacity() == 0)
+      static_cast<const SemaphoreTransition*>(e1_transition)->get_capacity() <= 1)
     return false;
   return true;
 }
@@ -199,7 +199,7 @@ bool ReversibleRaceCalculator::is_race_reversible_WaitAny(const Execution&, Exec
 {
   // TODO: We need to check if any of the transitions
   // waited on occurred before `e1`
-  return false;
+  return true; // Let's overapproximate to not miss branches
 }
 
 } // namespace simgrid::mc::odpor