Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Missing includes (for gcc-14?)
[simgrid.git] / src / mc / transition / TransitionActorJoin.cpp
index cc1bcd6..463bfcb 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2015-2022. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2015-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -7,11 +7,6 @@
 #include "simgrid/config.h"
 #include "xbt/asserts.h"
 #include "xbt/string.hpp"
-#if SIMGRID_HAVE_MC
-#include "src/mc/ModelChecker.hpp"
-#include "src/mc/api/RemoteApp.hpp"
-#include "src/mc/api/State.hpp"
-#endif
 
 #include <sstream>
 
@@ -32,7 +27,17 @@ std::string ActorJoinTransition::to_string(bool verbose) const
 }
 bool ActorJoinTransition::depends(const Transition* other) const
 {
-  // Joining is indep with any other transitions:
+  // Joining is dependent with any transition whose
+  // actor is that of the `other` action. , Join i
+  if (other->aid_ == target_) {
+    return true;
+  }
+
+  // Actions executed by the same actor are always dependent
+  if (other->aid_ == aid_)
+    return true;
+
+  // Otherwise, joining is indep with any other transitions:
   // - It is only enabled once the target ends, and after this point it's enabled no matter what
   // - Other joins don't affect it, and it does not impact on the enabledness of any other transition
   return false;