X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ebadbf7894190d4c66238842db5f8931adb7df5b..5f2e051a9bb2b088d3b3543982d3a244b7b7b1c4:/src/mc/ModelChecker.hpp diff --git a/src/mc/ModelChecker.hpp b/src/mc/ModelChecker.hpp index 8bf67d31d1..8f80eae797 100644 --- a/src/mc/ModelChecker.hpp +++ b/src/mc/ModelChecker.hpp @@ -15,8 +15,7 @@ #include #include -namespace simgrid { -namespace mc { +namespace simgrid::mc { /** State of the model-checker (global variables for the model checker) */ @@ -29,8 +28,9 @@ class ModelChecker { std::unique_ptr remote_process_; Exploration* exploration_ = nullptr; - // Expect MessageType::SIMCALL_TO_STRING or MessageType::SIMCALL_DOT_LABEL - std::string simcall_to_string(MessageType type, aid_t aid, int times_considered); + FILE* dot_output_ = nullptr; + + unsigned long visited_states_ = 0; public: ModelChecker(ModelChecker const&) = delete; @@ -62,16 +62,27 @@ public: Exploration* get_exploration() const { return exploration_; } void set_exploration(Exploration* exploration) { exploration_ = exploration; } + unsigned long get_visited_states() const { return visited_states_; } + void inc_visited_states() { visited_states_++; } + + void dot_output(const char* fmt, ...); + void dot_output_flush() + { + if (dot_output_ != nullptr) + fflush(dot_output_); + } + void dot_output_close() + { + if (dot_output_ != nullptr) + fclose(dot_output_); + } + private: void setup_ignore(); bool handle_message(const char* buffer, ssize_t size); void handle_waitpid(); - -public: - unsigned long visited_states = 0; }; -} -} +} // namespace simgrid::mc #endif