X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/068223d8b457b296adeee39403cda89ffc5baf76..75ebde707b0c7b13d67e12e94a03d774ad37ba67:/src/mc/SafetyChecker.hpp diff --git a/src/mc/SafetyChecker.hpp b/src/mc/SafetyChecker.hpp index 48edb7b23e..b2dd2696ae 100644 --- a/src/mc/SafetyChecker.hpp +++ b/src/mc/SafetyChecker.hpp @@ -7,13 +7,19 @@ #ifndef SIMGRID_MC_SAFETY_CHECKER_HPP #define SIMGRID_MC_SAFETY_CHECKER_HPP +#include +#include +#include +#include + #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); @@ -21,9 +27,19 @@ public: int run() override; RecordTrace getRecordTrace() override; std::vector getTextualTrace() override; + void logState() override; private: // Temp void init(); + 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; }; }