#include "src/mc/explo/Exploration.hpp"
#include "src/mc/mc_config.hpp"
+#include <algorithm>
#include <boost/range/algorithm.hpp>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_state, mc, "Logging specific to MC states");
return count;
}
-std::deque<Transition*>& State::get_recipe()
-{
- if (recipe_.empty()) {
- for (const auto* s = this; s != nullptr; s = s->get_parent_state().get())
- if (s->get_transition_in() != nullptr)
- recipe_.push_front(s->get_transition_in().get());
- }
- return recipe_;
-}
-
aid_t State::next_transition() const
{
XBT_DEBUG("Search for an actor to run. %zu actors to consider", strategy_->actors_to_run_.size());
return outgoing_transition_;
}
+
+std::unordered_set<aid_t> State::get_backtrack_set() const
+{
+ std::unordered_set<aid_t> actors;
+ for (const auto& [aid, state] : get_actors_list()) {
+ if (state.is_todo() or state.is_done()) {
+ actors.insert(aid);
+ }
+ }
+ return actors;
+}
+
} // namespace simgrid::mc