X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2659419ab673729eb0af805fff60051764b30b04..a49a03122b2def71ff741e78d15b38cd1d171184:/src/mc/VisitedState.hpp diff --git a/src/mc/VisitedState.hpp b/src/mc/VisitedState.hpp index 4e0c4fb9ba..7028f4d644 100644 --- a/src/mc/VisitedState.hpp +++ b/src/mc/VisitedState.hpp @@ -12,6 +12,7 @@ #include #include "src/mc/mc_snapshot.h" +#include "src/mc/mc_state.h" namespace simgrid { namespace mc { @@ -19,16 +20,22 @@ namespace mc { struct XBT_PRIVATE VisitedState { std::shared_ptr system_state = nullptr; std::size_t heap_bytes_used = 0; - int nb_processes = 0; - int num = 0; - int other_num = 0; // dot_output for + int actors_count = 0; + int num = 0; // unique id of that state in the storage of all stored IDs + int original_num = 0; // num field of the VisitedState to which I was declared equal to (used for dot_output) - VisitedState(); - ~VisitedState(); + explicit VisitedState(unsigned long state_number); + ~VisitedState() = default; }; -extern XBT_PRIVATE std::vector> visited_states; -XBT_PRIVATE std::unique_ptr is_visited_state(simgrid::mc::State* graph_state, bool compare_snpashots); +class XBT_PRIVATE VisitedStates { + std::vector> states_; +public: + void clear() { states_.clear(); } + std::unique_ptr addVisitedState(unsigned long state_number, simgrid::mc::State* graph_state, bool compare_snpashots); +private: + void prune(); +}; } }