X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9440a0592a1b3f71b04b90aa1c922b03945dd3ea..2dab73b61a6ad4feb7d2d267bf5621c7b95926b3:/src/mc/ModelChecker.hpp diff --git a/src/mc/ModelChecker.hpp b/src/mc/ModelChecker.hpp index 212c528b0d..cf5c3c6515 100644 --- a/src/mc/ModelChecker.hpp +++ b/src/mc/ModelChecker.hpp @@ -6,7 +6,7 @@ #ifndef SIMGRID_MC_MODEL_CHECKER_HPP #define SIMGRID_MC_MODEL_CHECKER_HPP -#include "src/mc/remote/EventLoop.hpp" +#include "src/mc/remote/CheckerSide.hpp" #include "src/mc/sosp/PageStore.hpp" #include "xbt/base.h" @@ -20,20 +20,21 @@ namespace mc { /** State of the model-checker (global variables for the model checker) */ class ModelChecker { - EventLoop event_loop_; + CheckerSide checker_side_; /** String pool for host names */ std::set hostnames_; // This is the parent snapshot of the current state: PageStore page_store_{500}; - std::unique_ptr process_; + std::unique_ptr remote_simulation_; Checker* checker_ = nullptr; public: ModelChecker(ModelChecker const&) = delete; ModelChecker& operator=(ModelChecker const&) = delete; - explicit ModelChecker(std::unique_ptr process); + explicit ModelChecker(std::unique_ptr remote_simulation, int sockfd); - RemoteClient& process() { return *process_; } + RemoteSimulation& get_remote_simulation() { return *remote_simulation_; } + Channel& channel() { return checker_side_.get_channel(); } PageStore& page_store() { return page_store_; @@ -46,10 +47,11 @@ public: void start(); void shutdown(); - void resume(simgrid::mc::RemoteClient& process); + void resume(simgrid::mc::RemoteSimulation& get_remote_simulation); void handle_events(int fd, short events); void wait_for_requests(); void handle_simcall(Transition const& transition); + XBT_ATTRIB_NORETURN void exit(int status); bool checkDeadlock(); @@ -61,7 +63,6 @@ private: void setup_ignore(); bool handle_message(const char* buffer, ssize_t size); void handle_waitpid(); - void on_signal(int signo); public: unsigned long visited_states = 0;