Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't include simgrid/config.h from simgrid/modelchecker.h so that the later is cheap...
[simgrid.git] / src / mc / mc_base.cpp
index 91012ba602c0ab0f1ae1f3a303f95e05d34250af..781a5ee262382aaaabc283fb24ff2a48fa6c1e3d 100644 (file)
@@ -9,32 +9,17 @@
 #include "src/kernel/activity/CommImpl.hpp"
 #include "src/kernel/activity/MutexImpl.hpp"
 #include "src/kernel/actor/SimcallObserver.hpp"
-#include "src/mc/mc_config.hpp"
 #include "src/mc/mc_replay.hpp"
 
-#include "xbt/random.hpp"
-
 #if SIMGRID_HAVE_MC
 #include "src/mc/ModelChecker.hpp"
 #include "src/mc/api/RemoteApp.hpp"
+#include "src/mc/remote/AppSide.hpp"
 #include "src/mc/remote/RemoteProcess.hpp"
 #endif
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(mc, "All MC categories");
 
-int MC_random(int min, int max)
-{
-#if SIMGRID_HAVE_MC
-  xbt_assert(mc_model_checker == nullptr);
-#endif
-  if (not MC_is_active() && not MC_record_replay_is_active()) { // no need to do a simcall in this case
-    static simgrid::xbt::random::XbtRandom prng;
-    return prng.uniform_int(min, max);
-  }
-  simgrid::kernel::actor::RandomSimcall observer{simgrid::kernel::actor::ActorImpl::self(), min, max};
-  return simgrid::kernel::actor::simcall_answered([&observer] { return observer.get_value(); }, &observer);
-}
-
 namespace simgrid::mc {
 
 void execute_actors()