- /* If comm determinism verification, we cannot stop the exploration if some communications are not finished (at
- * least, data are transferred). These communications are incomplete and they cannot be analyzed and compared
- * with the initial pattern. */
- bool compare_snapshots = extension->initial_communications_pattern_done && all_communications_are_finished;
-
- if (_sg_mc_max_visited_states != 0)
- visited_state = visited_states_.addVisitedState(next_state->num_, next_state.get(), compare_snapshots);
- else
- visited_state = nullptr;
-
- if (visited_state == nullptr) {
- /* Add all enabled actors to the interleave set of the next state */
- for (auto& act : api::get().get_actors()) {
- auto actor = act.copy.get_buffer();
- if (get_session().actor_is_enabled(actor->get_pid()))
- next_state->mark_todo(actor->get_pid());
- }
-
- if (dot_output != nullptr)
- fprintf(dot_output, "\"%ld\" -> \"%ld\" [%s];\n", cur_state->num_, next_state->num_, req_str.c_str());
-
- } else if (dot_output != nullptr)
- fprintf(dot_output, "\"%ld\" -> \"%ld\" [%s];\n", cur_state->num_,
- visited_state->original_num == -1 ? visited_state->num : visited_state->original_num, req_str.c_str());
-
- stack_.push_back(std::move(next_state));
- } else {
- if (stack_.size() > (std::size_t)_sg_mc_max_depth)
- XBT_WARN("/!\\ Max depth reached! /!\\ ");
- else if (visited_state != nullptr)
- XBT_DEBUG("State already visited (equal to state %ld), exploration stopped on this path.",
- visited_state->original_num == -1 ? visited_state->num : visited_state->original_num);
- else
- XBT_DEBUG("There are no more processes to interleave. (depth %zu)", stack_.size());
-
- extension->initial_communications_pattern_done = true;
-
- /* Trash the current state, no longer needed */
- XBT_DEBUG("Delete state %ld at depth %zu", cur_state->num_, stack_.size());
- stack_.pop_back();
-
- visited_state = nullptr;