1 /* Copyright (c) 2007-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_VISITED_STATE_HPP
8 #define SIMGRID_MC_VISITED_STATE_HPP
14 #include "src/mc/mc_snapshot.h"
15 #include "src/mc/mc_state.h"
20 struct XBT_PRIVATE VisitedState {
21 std::shared_ptr<simgrid::mc::Snapshot> system_state = nullptr;
22 std::size_t heap_bytes_used = 0;
24 int num = 0; // unique id of that state in the storage of all stored IDs
25 int original_num = 0; // num field of the VisitedState to which I was declared equal to (used for dot_output)
27 VisitedState(unsigned long state_number);
31 class XBT_PRIVATE VisitedStates {
32 std::vector<std::unique_ptr<simgrid::mc::VisitedState>> states_;
34 void clear() { states_.clear(); }
35 std::unique_ptr<simgrid::mc::VisitedState> addVisitedState(unsigned long state_number, simgrid::mc::State* graph_state, bool compare_snpashots);