X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/e91f4e50de913c126b42d09d227eb416bb320dae..f540320e2e4fd4fe5c9cb1bf8a4b1c0a972082e6:/src/mc/SafetyChecker.hpp diff --git a/src/mc/SafetyChecker.hpp b/src/mc/SafetyChecker.hpp index 4f60b792ec..b2dd2696ae 100644 --- a/src/mc/SafetyChecker.hpp +++ b/src/mc/SafetyChecker.hpp @@ -9,6 +9,8 @@ #include #include +#include +#include #include "src/mc/mc_forward.hpp" #include "src/mc/Checker.hpp" @@ -17,7 +19,7 @@ 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); @@ -25,14 +27,19 @@ public: int run() override; RecordTrace getRecordTrace() override; std::vector getTextualTrace() override; + void logState() override; private: // Temp void init(); - bool checkNonDeterminism(simgrid::mc::State* current_state); + bool checkNonTermination(simgrid::mc::State* current_state); + int backtrack(); + void restoreState(); private: /** Stack representing the position in the exploration graph */ std::list> stack_; simgrid::mc::VisitedStates visitedStates_; + std::unique_ptr visitedState_; + unsigned long expandedStatesCount_ = 0; }; }