+void DFSExplorer::restore_stack(std::shared_ptr<State> state)
+{
+
+ stack_ = std::list<std::shared_ptr<State>>();
+ std::shared_ptr<State> current_state(state);
+ stack_.push_front(std::shared_ptr<State>(current_state));
+ // condition corresponds to reaching initial state
+ while (current_state->get_parent_state() != nullptr) {
+ current_state = current_state->get_parent_state();
+ stack_.push_front(std::shared_ptr<State>(current_state));
+ }
+ XBT_DEBUG("Replaced stack by %s", get_record_trace().to_string().c_str());
+}
+