if (_sg_mc_sleep_set && XBT_LOG_ISENABLED(mc_dfs, xbt_log_priority_verbose)) {
XBT_VERB("Sleep set actually containing:");
for (auto& [aid, transition] : state->get_sleep_set())
XBT_VERB(" <%ld,%s>", aid, transition.to_string().c_str());
}
if (_sg_mc_sleep_set && XBT_LOG_ISENABLED(mc_dfs, xbt_log_priority_verbose)) {
XBT_VERB("Sleep set actually containing:");
for (auto& [aid, transition] : state->get_sleep_set())
XBT_VERB(" <%ld,%s>", aid, transition.to_string().c_str());
}
/* Actually answer the request: let's execute the selected request (MCed does one step) */
state->execute_next(next, get_remote_app());
on_transition_execute_signal(state->get_transition(), get_remote_app());
/* Actually answer the request: let's execute the selected request (MCed does one step) */
state->execute_next(next, get_remote_app());
on_transition_execute_signal(state->get_transition(), get_remote_app());
state->get_transition()->to_string().c_str(), stack_.size(), state->get_num(), state->count_todo());
/* Create the new expanded state (copy the state of MCed into our MCer data) */
state->get_transition()->to_string().c_str(), stack_.size(), state->get_num(), state->count_todo());
/* Create the new expanded state (copy the state of MCed into our MCer data) */
- std::unique_ptr<State> next_state;
- next_state = std::make_unique<State>(get_remote_app(), state);
+ std::shared_ptr<State> next_state;
+ next_state = std::make_shared<State>(get_remote_app(), state);
* If the process is not enabled at this point, then add every enabled process to the interleave */
if (reduction_mode_ == ReductionMode::dpor) {
aid_t issuer_id = state->get_transition()->aid_;
* If the process is not enabled at this point, then add every enabled process to the interleave */
if (reduction_mode_ == ReductionMode::dpor) {
aid_t issuer_id = state->get_transition()->aid_;
while (not tmp_stack.empty()) {
State* prev_state = tmp_stack.back().get();
if (state->get_transition()->aid_ == prev_state->get_transition()->aid_) {
while (not tmp_stack.empty()) {
State* prev_state = tmp_stack.back().get();
if (state->get_transition()->aid_ == prev_state->get_transition()->aid_) {
if (prev_state->is_actor_enabled(issuer_id)) {
if (not prev_state->is_actor_done(issuer_id)) {
prev_state->consider_one(issuer_id);
if (prev_state->is_actor_enabled(issuer_id)) {
if (not prev_state->is_actor_done(issuer_id)) {
prev_state->consider_one(issuer_id);
stack_.back()->consider_best(); // Take only one transition if DPOR: others may be considered later if required
else {
stack_.back()->consider_all();
stack_.back()->consider_best(); // Take only one transition if DPOR: others may be considered later if required
else {
stack_.back()->consider_all();
dot_output("\"%ld\" -> \"%ld\" [%s];\n", state->get_num(), stack_.back()->get_num(),
state->get_transition()->dot_string().c_str());
} else
dot_output("\"%ld\" -> \"%ld\" [%s];\n", state->get_num(), stack_.back()->get_num(),
state->get_transition()->dot_string().c_str());
} else
on_backtracking_signal(get_remote_app());
get_remote_app().check_deadlock();
// if no backtracking point, then set the stack_ to empty so we can end the exploration
on_backtracking_signal(get_remote_app());
get_remote_app().check_deadlock();
// if no backtracking point, then set the stack_ to empty so we can end the exploration
- for (auto& stack : opened_states) {
- auto [aid, dist] = stack.back()->next_transition_guided();
- if (aid == -1)
+ for (auto iter = opened_states_.begin(); iter != opened_states_.end();) {
+ auto [aid, dist] = (*iter).back()->next_transition_guided();
+ if (aid == -1) { // happens if no actors are todo anymore in this transition
+ iter = opened_states_.erase(iter);
/* If asked to rollback on a state that has a snapshot, restore it */
State* last_state = backtrack.back().get();
/* If asked to rollback on a state that has a snapshot, restore it */
State* last_state = backtrack.back().get();