1 /* Copyright (c) 2008-2022. 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
10 #include "src/mc/VisitedState.hpp"
11 #include "src/mc/checker/Checker.hpp"
12 #include "src/mc/mc_safety.hpp"
22 class XBT_PRIVATE SafetyChecker : public Checker {
23 ReductionMode reductionMode_ = ReductionMode::unset;
24 long backtrack_count_ = 0;
27 explicit SafetyChecker(Session* session);
29 RecordTrace get_record_trace() override;
30 std::vector<std::string> get_textual_trace() override;
31 void log_state() override;
34 void check_non_termination(const State* current_state);
38 /** Stack representing the position in the exploration graph */
39 std::list<std::unique_ptr<State>> stack_;
40 VisitedStates visited_states_;
41 std::unique_ptr<VisitedState> visited_state_;
45 } // namespace simgrid