Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
CommDet shall become an extension of the SafetyChecker
[simgrid.git] / src / mc / checker / CommunicationDeterminismChecker.hpp
1 /* Copyright (c) 2016-2022. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #include "src/mc/VisitedState.hpp"
7 #include "src/mc/checker/Checker.hpp"
8
9 #include <string>
10 #include <vector>
11
12 #ifndef SIMGRID_MC_COMMUNICATION_DETERMINISM_CHECKER_HPP
13 #define SIMGRID_MC_COMMUNICATION_DETERMINISM_CHECKER_HPP
14
15 namespace simgrid {
16 namespace mc {
17
18 class XBT_PRIVATE CommunicationDeterminismChecker : public Checker {
19 public:
20   explicit CommunicationDeterminismChecker(Session* session);
21   ~CommunicationDeterminismChecker() override;
22   void run() override;
23   RecordTrace get_record_trace() override;
24   std::vector<std::string> get_textual_trace() override;
25
26 private:
27   void prepare();
28   void real_run();
29   void log_state() override;
30   void restoreState();
31
32   /** Stack representing the position in the exploration graph */
33   std::list<std::unique_ptr<State>> stack_;
34   VisitedStates visited_states_;
35 };
36 } // namespace mc
37 } // namespace simgrid
38
39 #endif
40