Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Address minor comments in MR review
authorMaxwell Pirtle <maxwellpirtle@gmail.com>
Mon, 20 Mar 2023 08:41:58 +0000 (09:41 +0100)
committerMaxwell Pirtle <maxwellpirtle@gmail.com>
Mon, 20 Mar 2023 08:41:58 +0000 (09:41 +0100)
src/mc/explo/udpor/Configuration.cpp
src/mc/explo/udpor/UnfoldingEvent.cpp
src/mc/explo/udpor/UnfoldingEvent.hpp

index 7edc16e..98d004b 100644 (file)
@@ -128,10 +128,13 @@ std::optional<Configuration> Configuration::compute_k_partial_alternative_to(con
   const auto D_hat = [&]() {
     const size_t size = std::min(k, D.size());
     std::vector<const UnfoldingEvent*> 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;
   }();
index 1470aac..c51023b 100644 (file)
@@ -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;
index c2ab494..aeb4902 100644 (file)
@@ -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;