Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix ODPOR: overapproximate ReversibleRace (to not miss branches) and survive overapprox
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Wed, 8 Nov 2023 15:44:10 +0000 (16:44 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Wed, 8 Nov 2023 15:44:16 +0000 (16:44 +0100)
Optimal DPOR just became sub-optimal :)

src/mc/explo/DFSExplorer.cpp
src/mc/explo/odpor/ReversibleRaceCalculator.cpp

index 978cdfd..0fb95fd 100644 (file)
@@ -136,7 +136,9 @@ void DFSExplorer::run()
     const aid_t next = reduction_mode_ == ReductionMode::odpor ? state->next_odpor_transition()
                                                                : std::get<0>(state->next_transition_guided());
 
-    if (next < 0) { // If there is no more transition in the current state, backtrack.
+    if (next < 0 || not state->is_actor_enabled(next)) {
+      // If there is no more transition in the current state (or if ODPOR picked an actor that is not enabled --
+      // ReversibleRace is an overapproximation), backtrace
       XBT_VERB("%lu actors remain, but none of them need to be interleaved (depth %zu).", state->get_actor_count(),
                stack_.size() + 1);
 
index d671e93..f449d6a 100644 (file)
@@ -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