Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Align the behavior of MC and MC_replay in SMPI, so that replay actually works
[simgrid.git] / src / mc / transition / Transition.cpp
index 3fb8ced..b10abd2 100644 (file)
@@ -10,6 +10,7 @@
 
 #if SIMGRID_HAVE_MC
 #include "src/mc/ModelChecker.hpp"
+#include "src/mc/transition/TransitionActorJoin.hpp"
 #include "src/mc/transition/TransitionAny.hpp"
 #include "src/mc/transition/TransitionComm.hpp"
 #include "src/mc/transition/TransitionRandom.hpp"
@@ -58,13 +59,13 @@ Transition* deserialize_transition(aid_t issuer, int times_considered, std::stri
   xbt_assert(stream >> type);
 
   switch (auto simcall = static_cast<Transition::Type>(type)) {
-    case Transition::Type::BARRIER_LOCK:
+    case Transition::Type::BARRIER_ASYNC_LOCK:
     case Transition::Type::BARRIER_WAIT:
       return new BarrierTransition(issuer, times_considered, simcall, stream);
 
-    case Transition::Type::COMM_RECV:
+    case Transition::Type::COMM_ASYNC_RECV:
       return new CommRecvTransition(issuer, times_considered, stream);
-    case Transition::Type::COMM_SEND:
+    case Transition::Type::COMM_ASYNC_SEND:
       return new CommSendTransition(issuer, times_considered, stream);
     case Transition::Type::COMM_TEST:
       return new CommTestTransition(issuer, times_considered, stream);
@@ -80,24 +81,29 @@ Transition* deserialize_transition(aid_t issuer, int times_considered, std::stri
       return new RandomTransition(issuer, times_considered, stream);
 
     case Transition::Type::MUTEX_TRYLOCK:
-    case Transition::Type::MUTEX_LOCK:
+    case Transition::Type::MUTEX_ASYNC_LOCK:
     case Transition::Type::MUTEX_TEST:
     case Transition::Type::MUTEX_WAIT:
     case Transition::Type::MUTEX_UNLOCK:
       return new MutexTransition(issuer, times_considered, simcall, stream);
 
-    case Transition::Type::SEM_LOCK:
+    case Transition::Type::SEM_ASYNC_LOCK:
     case Transition::Type::SEM_UNLOCK:
     case Transition::Type::SEM_WAIT:
       return new SemaphoreTransition(issuer, times_considered, simcall, stream);
 
+    case Transition::Type::ACTOR_JOIN:
+      return new ActorJoinTransition(issuer, times_considered, stream);
+
     case Transition::Type::UNKNOWN:
       return new Transition(Transition::Type::UNKNOWN, issuer, times_considered);
 
     default:
       break;
   }
-  xbt_die("Invalid transition type %d received", type);
+  xbt_die("Invalid transition type %d received. Did you implement a new observer in the app without implementing the "
+          "corresponding transition in the checker?",
+          type);
 #else
   xbt_die("Deserializing transitions is only interesting in MC mode.");
 #endif