X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/61a8bb9423361cde6dfc57a00815e5fc99320ca4..50753d5f8442a47c17c4035724201a18a7ff6146:/src/mc/explo/udpor/UnfoldingEvent.hpp diff --git a/src/mc/explo/udpor/UnfoldingEvent.hpp b/src/mc/explo/udpor/UnfoldingEvent.hpp index edd7eece88..aeb4902e98 100644 --- a/src/mc/explo/udpor/UnfoldingEvent.hpp +++ b/src/mc/explo/udpor/UnfoldingEvent.hpp @@ -18,7 +18,7 @@ namespace simgrid::mc::udpor { class UnfoldingEvent { public: - explicit UnfoldingEvent(std::initializer_list init_list); + explicit UnfoldingEvent(std::initializer_list init_list); UnfoldingEvent(EventSet immediate_causes = EventSet(), std::shared_ptr transition = std::make_unique()); @@ -26,18 +26,30 @@ public: UnfoldingEvent& operator=(UnfoldingEvent const&) = default; UnfoldingEvent(UnfoldingEvent&&) = default; - EventSet get_history(); - bool in_history_of(const UnfoldingEvent* otherEvent) const; + EventSet get_history() const; + bool in_history_of(const UnfoldingEvent* other) const; + bool related_to(const UnfoldingEvent* other) const; - bool conflicts_with(const UnfoldingEvent* otherEvent) 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; - bool immediately_conflicts_with(const UnfoldingEvent* otherEvt) 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; const EventSet& get_immediate_causes() const { return this->immediate_causes; } Transition* get_transition() const { return this->associated_transition.get(); } bool operator==(const UnfoldingEvent&) const; + bool operator!=(const UnfoldingEvent& other) const { return not(*this == other); } +private: /** * @brief The transition that UDPOR "attaches" to this * specific event for later use while computing e.g. extension