From: Maxwell Pirtle Date: Mon, 20 Mar 2023 08:41:58 +0000 (+0100) Subject: Address minor comments in MR review X-Git-Tag: v3.34~284^2 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/c00e26f0f6e9dadd7a69eaeae38b52dddcfca6bb Address minor comments in MR review --- diff --git a/src/mc/explo/udpor/Configuration.cpp b/src/mc/explo/udpor/Configuration.cpp index 7edc16ee44..98d004b22d 100644 --- a/src/mc/explo/udpor/Configuration.cpp +++ b/src/mc/explo/udpor/Configuration.cpp @@ -128,10 +128,13 @@ std::optional Configuration::compute_k_partial_alternative_to(con const auto D_hat = [&]() { const size_t size = std::min(k, D.size()); std::vector D_hat(size); - // Potentially select intelligently here (e.g. perhaps pick events - // with transitions that we know are totally independent)... + // TODO: Since any subset suffices for computing `k`-partial alternatives, + // potentially select intelligently here (e.g. perhaps pick events + // with transitions that we know are totally independent). This may be + // especially important if the enumeration is the slowest part of + // UDPOR // - // For now, simply pick the first `k` events (any subset suffices) + // For now, simply pick the first `k` events std::copy_n(D.begin(), size, D_hat.begin()); return D_hat; }(); diff --git a/src/mc/explo/udpor/UnfoldingEvent.cpp b/src/mc/explo/udpor/UnfoldingEvent.cpp index 1470aac51f..c51023b474 100644 --- a/src/mc/explo/udpor/UnfoldingEvent.cpp +++ b/src/mc/explo/udpor/UnfoldingEvent.cpp @@ -86,7 +86,6 @@ bool UnfoldingEvent::conflicts_with(const Configuration& config) const bool UnfoldingEvent::immediately_conflicts_with(const UnfoldingEvent* other) const { - // Computes "this #ⁱ other" // They have to be in conflict at a minimum if (not conflicts_with(other)) { return false; diff --git a/src/mc/explo/udpor/UnfoldingEvent.hpp b/src/mc/explo/udpor/UnfoldingEvent.hpp index c2ab4946fc..aeb4902e98 100644 --- a/src/mc/explo/udpor/UnfoldingEvent.hpp +++ b/src/mc/explo/udpor/UnfoldingEvent.hpp @@ -30,8 +30,15 @@ public: bool in_history_of(const UnfoldingEvent* other) const; bool related_to(const UnfoldingEvent* other) const; + /// @brief Whether or not this event is in conflict with + /// the given one (i.e. whether `this # other`) bool conflicts_with(const UnfoldingEvent* other) const; + + /// @brief Whether or not this event is in conflict with + /// any event in the given configuration bool conflicts_with(const Configuration& config) const; + + /// @brief Computes "this #ⁱ other" bool immediately_conflicts_with(const UnfoldingEvent* other) const; bool is_dependent_with(const Transition*) const; bool is_dependent_with(const UnfoldingEvent* other) const;