X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/858298e81941473ad0ea981a85fa57a65da3491f..c6683b41cf9ecda70c1d4d75d1effc61903a894f:/src/mc/explo/udpor/ExtensionSetCalculator.cpp diff --git a/src/mc/explo/udpor/ExtensionSetCalculator.cpp b/src/mc/explo/udpor/ExtensionSetCalculator.cpp index f1e76f4d95..b50a4544f3 100644 --- a/src/mc/explo/udpor/ExtensionSetCalculator.cpp +++ b/src/mc/explo/udpor/ExtensionSetCalculator.cpp @@ -57,16 +57,16 @@ EventSet ExtensionSetCalculator::partially_extend_CommSend(const Configuration& // NOTE: If `preEvt(a, C)` doesn't exist, we're effectively asking // about `config({})` if (pre_event_a_C.has_value()) { - const auto e_prime = U->discover_event(EventSet({pre_event_a_C.value()}), send_action); + const auto* e_prime = U->discover_event(EventSet({pre_event_a_C.value()}), send_action); exC.insert(e_prime); } else { - const auto e_prime = U->discover_event(EventSet(), send_action); + const auto* e_prime = U->discover_event(EventSet(), send_action); exC.insert(e_prime); } // 2. foreach e ∈ C s.t. λ(e) ∈ {AsyncSend(m, _), TestAny(Com)} where // Com contains a matching c' = AsyncReceive(m, _) with a - for (const auto e : C) { + for (const auto* e : C) { const bool transition_type_check = [&]() { if (const auto* async_send = dynamic_cast(e->get_transition()); async_send != nullptr) { @@ -81,7 +81,7 @@ EventSet ExtensionSetCalculator::partially_extend_CommSend(const Configuration& // TODO: Check D_K(a, lambda(e)) if (true) { - const auto e_prime = U->discover_event(std::move(K), send_action); + const auto* e_prime = U->discover_event(std::move(K), send_action); exC.insert(e_prime); } } @@ -104,16 +104,16 @@ EventSet ExtensionSetCalculator::partially_extend_CommRecv(const Configuration& // 1. Create `e' := ` and add `e'` to `ex(C)` if (pre_event_a_C.has_value()) { - const auto e_prime = U->discover_event(EventSet({pre_event_a_C.value()}), recv_action); + const auto* e_prime = U->discover_event(EventSet({pre_event_a_C.value()}), recv_action); exC.insert(e_prime); } else { - const auto e_prime = U->discover_event(EventSet(), recv_action); + const auto* e_prime = U->discover_event(EventSet(), recv_action); exC.insert(e_prime); } // 2. foreach e ∈ C s.t. λ(e) ∈ {AsyncSend(m, _), TestAny(Com)} where // Com contains a matching c' = AsyncReceive(m, _) with a - for (const auto e : C) { + for (const auto* e : C) { const bool transition_type_check = [&]() { if (const auto* async_recv = dynamic_cast(e->get_transition()); async_recv != nullptr && async_recv->get_mailbox() == recv_mailbox) { @@ -128,7 +128,7 @@ EventSet ExtensionSetCalculator::partially_extend_CommRecv(const Configuration& // TODO: Check D_K(a, lambda(e)) if (true) { - const auto e_prime = U->discover_event(std::move(K), recv_action); + const auto* e_prime = U->discover_event(std::move(K), recv_action); exC.insert(e_prime); } } @@ -181,8 +181,7 @@ EventSet ExtensionSetCalculator::partially_extend_CommWait(const Configuration& // First, if `pre_event_a_C == std::nullopt`, then there is nothing to // do: `CommWait` will never be enabled in the empty configuration (at // least two actions must be executed before) - if (pre_event_a_C.has_value(); const auto unwrapped_pre_event = pre_event_a_C.value()) { - + if (pre_event_a_C.has_value(); const auto* unwrapped_pre_event = pre_event_a_C.value()) { // A necessary condition is that the issuer be present in // config({preEvt(a, C)}); otherwise, the `CommWait` could not // be enabled since the communication on which it waits would not @@ -196,7 +195,6 @@ EventSet ExtensionSetCalculator::partially_extend_CommWait(const Configuration& if (const CommRecvTransition* e_issuer_receive = dynamic_cast(e_issuer->get_transition()); e_issuer_receive != nullptr) { - const unsigned issuer_mailbox = e_issuer_receive->get_mailbox(); // Check from the config -> how many sends have there been @@ -226,7 +224,6 @@ EventSet ExtensionSetCalculator::partially_extend_CommWait(const Configuration& } else if (const CommSendTransition* e_issuer_send = dynamic_cast(e_issuer->get_transition()); e_issuer_send != nullptr) { - const unsigned issuer_mailbox = e_issuer_send->get_mailbox(); // Check from e_issuer -> what place is the issuer in? @@ -265,10 +262,9 @@ EventSet ExtensionSetCalculator::partially_extend_CommWait(const Configuration& } // 3. foreach event e in C do - for (const auto e : C) { + for (const auto* e : C) { if (const CommSendTransition* e_issuer_send = dynamic_cast(e_issuer->get_transition()); e_issuer_send != nullptr) { - // If the provider of the communication for `CommWait` is a // `CommSend(m)`, then we only care about `e` if `λ(e) == `CommRecv(m)`. // All other actions would be independent with the wait action (including @@ -321,7 +317,6 @@ EventSet ExtensionSetCalculator::partially_extend_CommWait(const Configuration& } else if (const CommRecvTransition* e_issuer_recv = dynamic_cast(e_issuer->get_transition()); e_issuer_recv != nullptr) { - // If the provider of the communication for `CommWait` is a // `CommRecv(m)`, then we only care about `e` if `λ(e) == `CommSend(m)`. // All other actions would be independent with the wait action (including @@ -381,4 +376,4 @@ EventSet ExtensionSetCalculator::partially_extend_CommTest(const Configuration& return EventSet(); } -} // namespace simgrid::mc::udpor \ No newline at end of file +} // namespace simgrid::mc::udpor