Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Another attempt to fix the printf issue on mac: don't use uint64 :)
[simgrid.git] / src / mc / explo / udpor / UnfoldingEvent.hpp
index 6532824..98f40ad 100644 (file)
@@ -27,6 +27,7 @@ public:
   UnfoldingEvent(UnfoldingEvent&&)                 = default;
 
   EventSet get_history() const;
+  EventSet get_local_config() const;
   bool in_history_of(const UnfoldingEvent* other) const;
 
   /**
@@ -40,17 +41,18 @@ public:
   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;
+  /// any event in the given set
+  bool conflicts_with_any(const EventSet& events) 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;
 
+  unsigned get_id() const { return this->id; }
+  aid_t get_actor() const { return get_transition()->aid_; }
   const EventSet& get_immediate_causes() const { return this->immediate_causes; }
   Transition* get_transition() const { return this->associated_transition.get(); }
-  aid_t get_actor() const { return get_transition()->aid_; }
 
   void set_transition(std::shared_ptr<Transition> t) { this->associated_transition = std::move(t); }
 
@@ -90,6 +92,12 @@ private:
    * so on.
    */
   EventSet immediate_causes;
+
+  /**
+   * @brief An identifier which is used to sort events
+   * deterministically
+   */
+  unsigned long id = 0;
 };
 
 } // namespace simgrid::mc::udpor