X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ef93ada6480099151585ece90d8f4aaf0be41cd5..874aec87c7ce1894a9f017d2adf07ce7b8abe71d:/src/mc/compare.cpp diff --git a/src/mc/compare.cpp b/src/mc/compare.cpp index 71fac79d7b..9fe80723b7 100644 --- a/src/mc/compare.cpp +++ b/src/mc/compare.cpp @@ -1206,13 +1206,19 @@ static bool local_variables_differ(const simgrid::mc::RemoteProcessMemory& proce } namespace simgrid::mc { - -bool Snapshot::operator==(const Snapshot& other) +bool Snapshot::equals_to(const Snapshot& other, RemoteProcessMemory& memory) { - // TODO, make this a field of ModelChecker or something similar - static StateComparator state_comparator; + /* TODO: the memory parameter should be eventually removed. It seems to be there because each snapshot lacks some sort + of metadata. That's OK for now (letting appart the fact that we cannot have a nice operator== because we need that + extra parameter), but it will fall short when we want to have parallel explorations, with more than one + RemoteProcess. At the very least, snapshots will need to know the remote process they are corresponding to, and more + probably they will need to embeed all their metadata to let the remoteprocesses die before the end of the + exploration. */ + + /* TODO: This method should moved to Snapshot.cpp, but it needs the StateComparator that is declared locally to this + * file only. */ - RemoteProcessMemory& memory = mc_model_checker->get_remote_process_memory(); + static StateComparator state_comparator; // TODO, make this a field of a persistant state object if (hash_ != other.hash_) { XBT_VERB("(%ld - %ld) Different hash: 0x%" PRIx64 "--0x%" PRIx64, this->num_state_, other.num_state_, this->hash_,