Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename SIMGRID_HAVE_MC into SIMGRID_HAVE_STATEFUL_MC (so that MC can be optional...
[simgrid.git] / src / mc / explo / DFSExplorer.hpp
index c709edd..3e8a45b 100644 (file)
@@ -6,9 +6,13 @@
 #ifndef SIMGRID_MC_SAFETY_CHECKER_HPP
 #define SIMGRID_MC_SAFETY_CHECKER_HPP
 
-#include "src/mc/VisitedState.hpp"
+#include "src/mc/api/State.hpp"
 #include "src/mc/explo/Exploration.hpp"
 
+#if SIMGRID_HAVE_STATEFUL_MC
+#include "src/mc/VisitedState.hpp"
+#endif
+
 #include <list>
 #include <memory>
 #include <string>
@@ -100,12 +104,15 @@ private:
 
   /** Stack representing the position in the exploration graph */
   stack_t stack_;
+#if SIMGRID_HAVE_STATEFUL_MC
   VisitedStates visited_states_;
   std::unique_ptr<VisitedState> visited_state_;
+#else
+  void* visited_state_ = nullptr; /* The code uses it to detect whether we are doing stateful MC */
+#endif
 
   /** Opened states are states that still contains todo actors.
    *  When backtracking, we pick a state from it*/
-
   std::priority_queue<std::shared_ptr<State>, std::vector<std::shared_ptr<State>>, OpenedStatesCompare> opened_states_;
 
   /** Change current stack_ value to correspond to the one we would have