Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Move visitedState as a field of SafetyChecker
[simgrid.git] / src / mc / SafetyChecker.hpp
index 3c559a7..39b0834 100644 (file)
@@ -7,22 +7,35 @@
 #ifndef SIMGRID_MC_SAFETY_CHECKER_HPP
 #define SIMGRID_MC_SAFETY_CHECKER_HPP
 
+#include <list>
+#include <memory>
+#include <string>
+#include <vector>
+
 #include "src/mc/mc_forward.hpp"
 #include "src/mc/Checker.hpp"
+#include "src/mc/VisitedState.hpp"
 
 namespace simgrid {
 namespace mc {
 
-class SafetyChecker : public Checker {
+class XBT_PRIVATE SafetyChecker : public Checker {
   simgrid::mc::ReductionMode reductionMode_ = simgrid::mc::ReductionMode::unset;
 public:
   SafetyChecker(Session& session);
   ~SafetyChecker();
   int run() override;
+  RecordTrace getRecordTrace() override;
+  std::vector<std::string> getTextualTrace() override;
 private:
   // Temp
   void init();
-  void pre();
+  bool checkNonTermination(simgrid::mc::State* current_state);
+private:
+  /** Stack representing the position in the exploration graph */
+  std::list<std::unique_ptr<simgrid::mc::State>> stack_;
+  simgrid::mc::VisitedStates visitedStates_;
+  std::unique_ptr<simgrid::mc::VisitedState> visitedState_;
 };
 
 }