1 /* Copyright (c) 2008-2016. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
7 #ifndef SIMGRID_MC_SAFETY_CHECKER_HPP
8 #define SIMGRID_MC_SAFETY_CHECKER_HPP
15 #include "src/mc/VisitedState.hpp"
16 #include "src/mc/checker/Checker.hpp"
17 #include "src/mc/mc_forward.hpp"
18 #include "src/mc/mc_safety.h"
23 class XBT_PRIVATE SafetyChecker : public Checker {
24 simgrid::mc::ReductionMode reductionMode_ = simgrid::mc::ReductionMode::unset;
26 explicit SafetyChecker(Session& session);
27 ~SafetyChecker() = default;
29 RecordTrace getRecordTrace() override;
30 std::vector<std::string> getTextualTrace() override;
31 void logState() override;
33 void checkNonTermination(simgrid::mc::State* current_state);
37 /** Stack representing the position in the exploration graph */
38 std::list<std::unique_ptr<simgrid::mc::State>> stack_;
39 simgrid::mc::VisitedStates visitedStates_;
40 std::unique_ptr<simgrid::mc::VisitedState> visitedState_;
41 unsigned long expandedStatesCount_ = 0;