Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Move the checker_side_ from the ModelChecker to the RemoteApp
[simgrid.git] / src / mc / ModelChecker.hpp
1 /* Copyright (c) 2007-2023. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef SIMGRID_MC_MODEL_CHECKER_HPP
7 #define SIMGRID_MC_MODEL_CHECKER_HPP
8
9 #include "src/mc/remote/CheckerSide.hpp"
10 #include "src/mc/remote/RemotePtr.hpp"
11 #include "src/mc/sosp/PageStore.hpp"
12 #include "xbt/base.h"
13
14 #include <memory>
15
16 namespace simgrid::mc {
17
18 /** State of the model-checker (global variables for the model checker)
19  */
20 class ModelChecker {
21   std::unique_ptr<RemoteProcessMemory> remote_process_memory_;
22   Exploration* exploration_ = nullptr;
23
24 public:
25   ModelChecker(ModelChecker const&) = delete;
26   ModelChecker& operator=(ModelChecker const&) = delete;
27   explicit ModelChecker(std::unique_ptr<RemoteProcessMemory> remote_simulation);
28
29   RemoteProcessMemory& get_remote_process_memory() { return *remote_process_memory_; }
30
31   Exploration* get_exploration() const { return exploration_; }
32   void set_exploration(Exploration* exploration) { exploration_ = exploration; }
33
34   void handle_waitpid();                                 // FIXME move to RemoteApp
35   bool handle_message(const char* buffer, ssize_t size); // FIXME move to RemoteApp
36 };
37
38 } // namespace simgrid::mc
39
40 #endif