1 /* Copyright (c) 2008-2023. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
6 #include "src/mc/explo/udpor/UnfoldingEvent.hpp"
8 namespace simgrid::mc::udpor {
10 UnfoldingEvent::UnfoldingEvent(std::shared_ptr<Transition> transition, EventSet immediate_causes,
11 unsigned long event_id)
12 : associated_transition(std::move(transition)), immediate_causes(std::move(immediate_causes)), event_id(event_id)
16 bool UnfoldingEvent::operator==(const UnfoldingEvent& other) const
18 const bool same_actor = associated_transition->aid_ == other.associated_transition->aid_;
22 // TODO: Add in information to determine which step in the sequence this actor was executed
24 // All unfolding event objects are created in reference to
25 // an Unfolding object which owns them. Hence, the references
26 // they contain to other events in the unvolding can
27 // be used as intrinsic identities (i.e. we don't need to
28 // recursively check if each of our causes has a `==` in
29 // the other event's causes)
30 return this->immediate_causes == other.immediate_causes;
33 } // namespace simgrid::mc::udpor