X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/013cc5dde33ce5933fc957121ee9098ff9019c9d..992bc1ec57d376cf14b124ea21b58b30f1e162f9:/src/mc/api.hpp diff --git a/src/mc/api.hpp b/src/mc/api.hpp index 0e6ee9ab4e..2a9d2500ce 100644 --- a/src/mc/api.hpp +++ b/src/mc/api.hpp @@ -17,10 +17,9 @@ #include "xbt/automaton.hpp" #include "xbt/base.h" -namespace simgrid { -namespace mc { +namespace simgrid::mc { -XBT_DECLARE_ENUM_CLASS(CheckerAlgorithm, Safety, UDPOR, Liveness, CommDeterminism); +XBT_DECLARE_ENUM_CLASS(ExplorationAlgorithm, Safety, UDPOR, Liveness, CommDeterminism); /* ** This class aimes to implement FACADE APIs for simgrid. The FACADE layer sits between the CheckerSide @@ -37,7 +36,7 @@ private: struct DerefAndCompareByActorsCountAndUsedHeap { template bool operator()(X const& a, Y const& b) const { - return std::make_pair(a->actors_count, a->heap_bytes_used) < std::make_pair(b->actors_count, b->heap_bytes_used); + return std::make_pair(a->actor_count_, a->heap_bytes_used) < std::make_pair(b->actor_count_, b->heap_bytes_used); } }; @@ -54,10 +53,10 @@ public: return api; } - simgrid::mc::Exploration* initialize(char** argv, simgrid::mc::CheckerAlgorithm algo); + simgrid::mc::Exploration* initialize(char** argv, const std::unordered_map& env, + simgrid::mc::ExplorationAlgorithm algo); // ACTOR APIs - std::vector& get_actors() const; unsigned long get_maxpid() const; // REMOTE APIs @@ -69,7 +68,7 @@ public: XBT_ATTRIB_NORETURN void mc_exit(int status) const; // STATE APIs - void restore_state(std::shared_ptr system_state) const; + void restore_state(const Snapshot* system_state) const; // SNAPSHOT APIs bool snapshot_equal(const Snapshot* s1, const Snapshot* s2) const; @@ -93,7 +92,6 @@ public: xbt_automaton_state_t get_automaton_transition_dst(xbt_dynar_t const& dynar, int index) const; }; -} // namespace mc -} // namespace simgrid +} // namespace simgrid::mc #endif