- /* reset the outgoing transition */
- simgrid::mc::ActorState* procstate = &state->actor_states_[actor->get_pid()];
- state->transition_.pid_ = -1;
- state->transition_.argument_ = -1;
- state->executed_req_.call_ = SIMCALL_NONE;
-
- if (not simgrid::mc::actor_is_enabled(actor))
- return nullptr; // Not executable in the application
-
- smx_simcall_t req = nullptr;
- switch (actor->simcall_.call_) {
- case SIMCALL_COMM_WAITANY:
- state->transition_.argument_ = -1;
- while (procstate->times_considered < simcall_comm_waitany__get__count(&actor->simcall_)) {
- if (simgrid::mc::request_is_enabled_by_idx(&actor->simcall_, procstate->times_considered)) {
- state->transition_.argument_ = procstate->times_considered;
- ++procstate->times_considered;
- break;
- }
- ++procstate->times_considered;
- }
-
- if (procstate->times_considered >= simcall_comm_waitany__get__count(&actor->simcall_))
- procstate->set_done();
- if (state->transition_.argument_ != -1)
- req = &actor->simcall_;
- break;
-
- case SIMCALL_COMM_TESTANY: {
- unsigned start_count = procstate->times_considered;
- state->transition_.argument_ = -1;
- while (procstate->times_considered < simcall_comm_testany__get__count(&actor->simcall_)) {
- if (simgrid::mc::request_is_enabled_by_idx(&actor->simcall_, procstate->times_considered)) {
- state->transition_.argument_ = procstate->times_considered;
- ++procstate->times_considered;
- break;
- }
- ++procstate->times_considered;
- }
-
- if (procstate->times_considered >= simcall_comm_testany__get__count(&actor->simcall_))
- procstate->set_done();
-
- if (state->transition_.argument_ != -1 || start_count == 0)
- req = &actor->simcall_;
-
- break;
- }
+ std::vector<ActorInformation>& actors = mc_model_checker->get_remote_process().actors();
+
+ kernel::actor::ActorImpl* actor = actors[next].copy.get_buffer();
+ aid_t aid = actor->get_pid();
+ int times_considered;
+
+ simgrid::mc::ActorState* actor_state = &actor_states_[aid];
+ /* This actor is ready to be executed. Prepare its execution when simcall_handle will be called on it */
+ if (actor->simcall_.observer_ != nullptr) {
+ times_considered = actor_state->get_times_considered_and_inc();
+ if (actor->simcall_.mc_max_consider_ <= actor_state->get_times_considered())
+ actor_state->set_done();
+ } else {
+ times_considered = 0;
+ actor_state->set_done();
+ }