Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
781c2ba1434d748deed0dbdc5dbb24aad71303b5
[simgrid.git] / src / mc / CommunicationDeterminismChecker.hpp
1 /* Copyright (c) 2016. The SimGrid Team.
2  * All rights reserved.                                                     */
3
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. */
6
7 #include <list>
8 #include <memory>
9 #include <string>
10 #include <vector>
11
12 #include "src/mc/mc_forward.hpp"
13 #include "src/mc/Checker.hpp"
14 #include "src/mc/VisitedState.hpp"
15
16 #ifndef SIMGRID_MC_COMMUNICATION_DETERMINISM_CHECKER_HPP
17 #define SIMGRID_MC_COMMUNICATION_DETERMINISM_CHECKER_HPP
18
19 namespace simgrid {
20 namespace mc {
21
22 class XBT_PRIVATE CommunicationDeterminismChecker : public Checker {
23 public:
24   CommunicationDeterminismChecker(Session& session);
25   ~CommunicationDeterminismChecker();
26   int run() override;
27   RecordTrace getRecordTrace() override;
28   std::vector<std::string> getTextualTrace() override;
29 private:
30   void prepare();
31   int main();
32   void logState() override;
33 private:
34   /** Stack representing the position in the exploration graph */
35   std::list<std::unique_ptr<simgrid::mc::State>> stack_;
36   simgrid::mc::VisitedStates visitedStates_;
37   unsigned long expandedStatesCount_ = 0;
38 };
39
40 #endif
41
42 }
43 }