X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/39c935d6d5ee86d153f6f7e6a10d723ae7c57f6f..bc725cdee967b43e83ef32dfb33a8d2d62351d6b:/src/mc/mc_pattern.hpp diff --git a/src/mc/mc_pattern.hpp b/src/mc/mc_pattern.hpp index 1a898bc9bb..bb26c9da9b 100644 --- a/src/mc/mc_pattern.hpp +++ b/src/mc/mc_pattern.hpp @@ -20,19 +20,17 @@ enum class PatternCommunicationType { class PatternCommunication { public: int num = 0; - simgrid::kernel::activity::CommImpl* comm_addr; + RemotePtr comm_addr{nullptr}; PatternCommunicationType type = PatternCommunicationType::send; unsigned long src_proc = 0; unsigned long dst_proc = 0; - const char* src_host = nullptr; - const char* dst_host = nullptr; + const xbt::string* src_host = nullptr; + const xbt::string* dst_host = nullptr; std::string rdv; std::vector data; int tag = 0; int index = 0; - PatternCommunication() { std::memset(&comm_addr, 0, sizeof(comm_addr)); } - PatternCommunication dup() const { simgrid::mc::PatternCommunication res; @@ -69,23 +67,25 @@ class ActorState { }; /** Exploration control information */ - InterleavingType state = InterleavingType::disabled; + InterleavingType state_ = InterleavingType::disabled; -public: /** Number of times that the process was considered to be executed */ - // TODO, make this private - unsigned int times_considered = 0; + unsigned int times_considered_ = 0; + +public: + unsigned int get_times_considered() const { return times_considered_; } + unsigned int get_times_considered_and_inc() { return times_considered_++; } - bool is_disabled() const { return this->state == InterleavingType::disabled; } - bool is_done() const { return this->state == InterleavingType::done; } - bool is_todo() const { return this->state == InterleavingType::todo; } + bool is_disabled() const { return this->state_ == InterleavingType::disabled; } + bool is_done() const { return this->state_ == InterleavingType::done; } + bool is_todo() const { return this->state_ == InterleavingType::todo; } /** Mark that we should try executing this process at some point in the future of the checker algorithm */ - void consider() + void mark_todo() { - this->state = InterleavingType::todo; - this->times_considered = 0; + this->state_ = InterleavingType::todo; + this->times_considered_ = 0; } - void set_done() { this->state = InterleavingType::done; } + void set_done() { this->state_ = InterleavingType::done; } }; } // namespace mc