long State::expended_states_ = 0;
-State::State(const RemoteApp& remote_app) : default_transition(std::make_unique<Transition>()), num_(++expended_states_)
+State::State(const RemoteApp& remote_app) : num_(++expended_states_)
{
remote_app.get_actors_status(actors_to_run_);
- transition_ = default_transition.get();
-
/* Stateful model checking */
if ((_sg_mc_checkpoint > 0 && (num_ % _sg_mc_checkpoint == 0)) || _sg_mc_termination) {
system_state_ = std::make_shared<simgrid::mc::Snapshot>(num_);
return boost::range::count_if(this->actors_to_run_, [](auto& pair) { return pair.second.is_todo(); });
}
-Transition* State::get_transition() const
+void State::mark_all_enabled_todo()
{
- if (transition_ == nullptr) {
- return default_transition.get();
+ for (auto const& [aid, _] : this->get_actors_list()) {
+ if (this->is_actor_enabled(aid)) {
+ this->mark_todo(aid);
+ }
}
+}
+
+Transition* State::get_transition() const
+{
return transition_;
}