- {
- v.push_back(get_event_with_handle(e_prime).get_transition());
-
- if (not located_actor_in_initial) {
- // It's possible `proc(e_prime)` is an initial
- E_prime_v.push_transition(get_event_with_handle(e_prime).get_transition());
- const EventHandle e_prime_in_E_prime_v = E_prime_v.get_latest_event_handle().value();
- v_handles.push_back(e_prime_in_E_prime_v);
-
- const aid_t q = E_prime_v.get_actor_with_handle(e_prime_in_E_prime_v);
- located_actor_in_initial = disqualified_actors.count(q) == 0 and
- std::none_of(v_handles.begin(), v_handles.end(), [&](const auto& e_loc) {
- return E_prime_v.happens_before(e_loc, e_prime_in_E_prime_v);
- });
+ // It's possible `proc(e_prime)` is an initial
+ //
+ // Note the form of `v` in the pseudocode:
+ // `v := notdep(e, E).e'^
+ E_prime_v.push_transition(get_event_with_handle(e_prime).get_transition());
+ v.push_back(get_event_with_handle(e_prime).get_transition());
+
+ const EventHandle e_prime_in_E_prime_v = E_prime_v.get_latest_event_handle().value();
+ v_handles.push_back(e_prime_in_E_prime_v);
+
+ const bool is_initial = std::none_of(v_handles.begin(), v_handles.end(), [&](const auto& handle) {
+ return E_prime_v.happens_before(handle, e_prime_in_E_prime_v);
+ });
+ if (is_initial) {
+ if (const aid_t q = E_prime_v.get_actor_with_handle(e_prime_in_E_prime_v); sleep_E_prime.count(q) > 0) {
+ return std::nullopt;
+ } else {
+ WI_E_prime_v.insert(q);