Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MC: Further renamings
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Thu, 7 May 2020 17:41:21 +0000 (19:41 +0200)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 9 May 2020 23:56:58 +0000 (01:56 +0200)
30 files changed:
src/mc/AddressSpace.hpp
src/mc/ModelChecker.cpp
src/mc/ModelChecker.hpp
src/mc/Session.cpp
src/mc/VisitedState.cpp
src/mc/checker/CommunicationDeterminismChecker.cpp
src/mc/checker/LivenessChecker.cpp
src/mc/checker/SafetyChecker.cpp
src/mc/compare.cpp
src/mc/inspect/ObjectInformation.hpp
src/mc/inspect/mc_dwarf.cpp
src/mc/inspect/mc_unw.cpp
src/mc/inspect/mc_unw.hpp
src/mc/inspect/mc_unw_vmread.cpp
src/mc/mc_base.cpp
src/mc/mc_comm_pattern.cpp
src/mc/mc_forward.hpp
src/mc/mc_request.cpp
src/mc/mc_smx.cpp
src/mc/mc_smx.hpp
src/mc/mc_state.cpp
src/mc/remote/RemoteSimulation.cpp [moved from src/mc/remote/RemoteClientMemory.cpp with 88% similarity]
src/mc/remote/RemoteSimulation.hpp [moved from src/mc/remote/RemoteClientMemory.hpp with 92% similarity]
src/mc/sosp/Region.cpp
src/mc/sosp/Snapshot.cpp
src/mc/sosp/Snapshot.hpp
src/mc/sosp/Snapshot_test.cpp
teshsuite/mc/dwarf-expression/dwarf-expression.cpp
teshsuite/mc/dwarf/dwarf.cpp
tools/cmake/DefinePackages.cmake

index 00be2d0..34b47a2 100644 (file)
@@ -84,17 +84,17 @@ public:
  */
 class AddressSpace {
 private:
-  RemoteClientMemory* process_;
+  RemoteSimulation* remote_simulation_;
 
 public:
-  explicit AddressSpace(RemoteClientMemory* process) : process_(process) {}
+  explicit AddressSpace(RemoteSimulation* remote_simulation) : remote_simulation_(remote_simulation) {}
   virtual ~AddressSpace() = default;
 
   /** The process of this address space
    *
    *  This is where we can get debug informations, memory layout, etc.
    */
-  simgrid::mc::RemoteClientMemory* process() const { return process_; }
+  simgrid::mc::RemoteSimulation* get_remote_simulation() const { return remote_simulation_; }
 
   /** Read data from the address space
    *
index 653976b..a715a41 100644 (file)
@@ -10,7 +10,7 @@
 #include "src/mc/mc_config.hpp"
 #include "src/mc/mc_exit.hpp"
 #include "src/mc/mc_private.hpp"
-#include "src/mc/remote/RemoteClientMemory.hpp"
+#include "src/mc/remote/RemoteSimulation.hpp"
 #include "xbt/automaton.hpp"
 #include "xbt/system_error.hpp"
 
@@ -32,27 +32,27 @@ using simgrid::mc::remote;
 namespace simgrid {
 namespace mc {
 
-ModelChecker::ModelChecker(std::unique_ptr<RemoteClientMemory> process, int sockfd)
-    : event_loop_(sockfd), process_(std::move(process))
+ModelChecker::ModelChecker(std::unique_ptr<RemoteSimulation> remote_simulation, int sockfd)
+    : checker_side_(sockfd), remote_simulation_(std::move(remote_simulation))
 {
 }
 
 void ModelChecker::start()
 {
-  event_loop_.start(
+  checker_side_.start(
       [](evutil_socket_t sig, short events, void* arg) { ((ModelChecker*)arg)->handle_events(sig, events); });
 
   XBT_DEBUG("Waiting for the model-checked process");
   int status;
 
   // The model-checked process SIGSTOP itself to signal it's ready:
-  const pid_t pid = process_->pid();
+  const pid_t pid = remote_simulation_->pid();
 
   pid_t res = waitpid(pid, &status, WAITPID_CHECKED_FLAGS);
   if (res < 0 || not WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP)
     xbt_die("Could not wait model-checked process");
 
-  process_->init();
+  remote_simulation_->init();
 
   if (not _sg_mc_dot_output_file.get().empty())
     MC_init_dot_output();
@@ -79,7 +79,7 @@ static const std::pair<const char*, const char*> ignored_local_variables[] = {
 
 void ModelChecker::setup_ignore()
 {
-  RemoteClientMemory& process = this->process();
+  RemoteSimulation& process = this->get_remote_simulation();
   for (std::pair<const char*, const char*> const& var :
       ignored_local_variables)
     process.ignore_local_variable(var.first, var.second);
@@ -92,7 +92,7 @@ void ModelChecker::shutdown()
 {
   XBT_DEBUG("Shuting down model-checker");
 
-  RemoteClientMemory* process = &this->process();
+  RemoteSimulation* process = &this->get_remote_simulation();
   if (process->running()) {
     XBT_DEBUG("Killing process");
     kill(process->pid(), SIGKILL);
@@ -100,9 +100,9 @@ void ModelChecker::shutdown()
   }
 }
 
-void ModelChecker::resume(RemoteClientMemory& process)
+void ModelChecker::resume(RemoteSimulation& process)
 {
-  int res = event_loop_.get_channel().send(MC_MESSAGE_CONTINUE);
+  int res = checker_side_.get_channel().send(MC_MESSAGE_CONTINUE);
   if (res)
     throw xbt::errno_error();
   process.clear_cache();
@@ -128,7 +128,7 @@ static void MC_report_crash(int status)
     XBT_INFO("Stack trace not displayed because you passed --log=no_loc");
   } else {
     XBT_INFO("Stack trace:");
-    mc_model_checker->process().dump_stack();
+    mc_model_checker->get_remote_simulation().dump_stack();
   }
 }
 
@@ -162,7 +162,7 @@ bool ModelChecker::handle_message(const char* buffer, ssize_t size)
     region.fragment = message.fragment;
     region.address  = message.address;
     region.size     = message.size;
-    process().ignore_heap(region);
+    get_remote_simulation().ignore_heap(region);
     break;
     }
 
@@ -171,7 +171,7 @@ bool ModelChecker::handle_message(const char* buffer, ssize_t size)
     s_mc_message_ignore_memory_t message;
     xbt_assert(size == sizeof(message), "Broken messsage");
     memcpy(&message, buffer, sizeof(message));
-    process().unignore_heap((void*)(std::uintptr_t)message.addr, message.size);
+    get_remote_simulation().unignore_heap((void*)(std::uintptr_t)message.addr, message.size);
     break;
     }
 
@@ -180,7 +180,7 @@ bool ModelChecker::handle_message(const char* buffer, ssize_t size)
     s_mc_message_ignore_memory_t message;
     xbt_assert(size == sizeof(message), "Broken messsage");
     memcpy(&message, buffer, sizeof(message));
-    this->process().ignore_region(message.addr, message.size);
+    this->get_remote_simulation().ignore_region(message.addr, message.size);
     break;
     }
 
@@ -189,7 +189,7 @@ bool ModelChecker::handle_message(const char* buffer, ssize_t size)
     s_mc_message_stack_region_t message;
     xbt_assert(size == sizeof(message), "Broken messsage");
     memcpy(&message, buffer, sizeof(message));
-    this->process().stack_areas().push_back(message.stack_region);
+    this->get_remote_simulation().stack_areas().push_back(message.stack_region);
     }
     break;
 
@@ -204,7 +204,7 @@ bool ModelChecker::handle_message(const char* buffer, ssize_t size)
     if (property_automaton == nullptr)
       property_automaton = xbt_automaton_new();
 
-    RemoteClientMemory* process = &this->process();
+    RemoteSimulation* process = &this->get_remote_simulation();
     RemotePtr<int> address = remote((int*)message.data);
     xbt::add_proposition(property_automaton, message.name, [process, address]() { return process->read(address); });
 
@@ -228,8 +228,8 @@ bool ModelChecker::handle_message(const char* buffer, ssize_t size)
 void ModelChecker::exit(int status)
 {
   // TODO, terminate the model checker politely instead of exiting rudely
-  if (process().running())
-    kill(process().pid(), SIGKILL);
+  if (get_remote_simulation().running())
+    kill(get_remote_simulation().pid(), SIGKILL);
   ::exit(status);
 }
 
@@ -237,12 +237,12 @@ void ModelChecker::handle_events(int sig, short events)
 {
   if (events == EV_READ) {
     char buffer[MC_MESSAGE_LENGTH];
-    ssize_t size = event_loop_.get_channel().receive(buffer, sizeof(buffer), false);
+    ssize_t size = checker_side_.get_channel().receive(buffer, sizeof(buffer), false);
     if (size == -1 && errno != EAGAIN)
       throw simgrid::xbt::errno_error();
 
     if (not handle_message(buffer, size))
-      event_loop_.break_loop();
+      checker_side_.break_loop();
   }
   else if (events == EV_SIGNAL) {
     if (sig == SIGCHLD)
@@ -262,7 +262,7 @@ void ModelChecker::handle_waitpid()
     if (pid == -1) {
       if (errno == ECHILD) {
         // No more children:
-        xbt_assert(not this->process().running(), "Inconsistent state");
+        xbt_assert(not this->get_remote_simulation().running(), "Inconsistent state");
         break;
       } else {
         XBT_ERROR("Could not wait for pid");
@@ -270,11 +270,12 @@ void ModelChecker::handle_waitpid()
       }
     }
 
-    if (pid == this->process().pid()) {
+    if (pid == this->get_remote_simulation().pid()) {
       // From PTRACE_O_TRACEEXIT:
 #ifdef __linux__
       if (status>>8 == (SIGTRAP | (PTRACE_EVENT_EXIT<<8))) {
-        xbt_assert(ptrace(PTRACE_GETEVENTMSG, this->process().pid(), 0, &status) != -1, "Could not get exit status");
+        xbt_assert(ptrace(PTRACE_GETEVENTMSG, remote_simulation_->pid(), 0, &status) != -1,
+                   "Could not get exit status");
         if (WIFSIGNALED(status)) {
           MC_report_crash(status);
           mc_model_checker->exit(SIMGRID_MC_EXIT_PROGRAM_CRASH);
@@ -287,9 +288,9 @@ void ModelChecker::handle_waitpid()
         XBT_DEBUG("Stopped with signal %i", (int) WSTOPSIG(status));
         errno = 0;
 #ifdef __linux__
-        ptrace(PTRACE_CONT, this->process().pid(), 0, WSTOPSIG(status));
+        ptrace(PTRACE_CONT, remote_simulation_->pid(), 0, WSTOPSIG(status));
 #elif defined BSD
-        ptrace(PT_CONTINUE, this->process().pid(), (caddr_t)1, WSTOPSIG(status));
+        ptrace(PT_CONTINUE, app_remote_mem_.pid(), (caddr_t)1, WSTOPSIG(status));
 #endif
         xbt_assert(errno == 0, "Could not PTRACE_CONT");
       }
@@ -299,7 +300,7 @@ void ModelChecker::handle_waitpid()
         mc_model_checker->exit(SIMGRID_MC_EXIT_PROGRAM_CRASH);
       } else if (WIFEXITED(status)) {
         XBT_DEBUG("Child process is over");
-        this->process().terminate();
+        this->get_remote_simulation().terminate();
       }
     }
   }
@@ -307,9 +308,9 @@ void ModelChecker::handle_waitpid()
 
 void ModelChecker::wait_for_requests()
 {
-  this->resume(process());
-  if (this->process().running())
-    event_loop_.dispatch();
+  this->resume(get_remote_simulation());
+  if (this->get_remote_simulation().running())
+    checker_side_.dispatch();
 }
 
 void ModelChecker::handle_simcall(Transition const& transition)
@@ -319,18 +320,18 @@ void ModelChecker::handle_simcall(Transition const& transition)
   m.type  = MC_MESSAGE_SIMCALL_HANDLE;
   m.pid   = transition.pid_;
   m.value = transition.argument_;
-  event_loop_.get_channel().send(m);
-  this->process_->clear_cache();
-  if (this->process_->running())
-    event_loop_.dispatch();
+  checker_side_.get_channel().send(m);
+  this->remote_simulation_->clear_cache();
+  if (this->remote_simulation_->running())
+    checker_side_.dispatch();
 }
 
 bool ModelChecker::checkDeadlock()
 {
-  int res = event_loop_.get_channel().send(MC_MESSAGE_DEADLOCK_CHECK);
+  int res = checker_side_.get_channel().send(MC_MESSAGE_DEADLOCK_CHECK);
   xbt_assert(res == 0, "Could not check deadlock state");
   s_mc_message_int_t message;
-  ssize_t s = event_loop_.get_channel().receive(message);
+  ssize_t s = checker_side_.get_channel().receive(message);
   xbt_assert(s != -1, "Could not receive message");
   xbt_assert(s == sizeof(message) && message.type == MC_MESSAGE_DEADLOCK_CHECK_REPLY,
              "Received unexpected message %s (%i, size=%i) "
index d3662ff..cf5c3c6 100644 (file)
@@ -20,21 +20,21 @@ namespace mc {
 /** State of the model-checker (global variables for the model checker)
  */
 class ModelChecker {
-  CheckerSide event_loop_;
+  CheckerSide checker_side_;
   /** String pool for host names */
   std::set<std::string> hostnames_;
   // This is the parent snapshot of the current state:
   PageStore page_store_{500};
-  std::unique_ptr<RemoteClientMemory> process_;
+  std::unique_ptr<RemoteSimulation> remote_simulation_;
   Checker* checker_ = nullptr;
 
 public:
   ModelChecker(ModelChecker const&) = delete;
   ModelChecker& operator=(ModelChecker const&) = delete;
-  explicit ModelChecker(std::unique_ptr<RemoteClientMemory> process, int sockfd);
+  explicit ModelChecker(std::unique_ptr<RemoteSimulation> remote_simulation, int sockfd);
 
-  RemoteClientMemory& process() { return *process_; }
-  Channel& channel() { return event_loop_.get_channel(); }
+  RemoteSimulation& get_remote_simulation() { return *remote_simulation_; }
+  Channel& channel() { return checker_side_.get_channel(); }
   PageStore& page_store()
   {
     return page_store_;
@@ -47,7 +47,7 @@ public:
 
   void start();
   void shutdown();
-  void resume(simgrid::mc::RemoteClientMemory& 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);
index f3f1daf..2ace38c 100644 (file)
@@ -85,7 +85,7 @@ Session::Session(const std::function<void()>& code)
 
   xbt_assert(mc_model_checker == nullptr, "Did you manage to start the MC twice in this process?");
 
-  auto process = std::unique_ptr<simgrid::mc::RemoteClientMemory>(new simgrid::mc::RemoteClientMemory(pid));
+  auto process = std::unique_ptr<simgrid::mc::RemoteSimulation>(new simgrid::mc::RemoteSimulation(pid));
   model_checker_.reset(new simgrid::mc::ModelChecker(std::move(process), sockets[1]));
 
   mc_model_checker = model_checker_.get();
@@ -113,7 +113,7 @@ void Session::execute(Transition const& transition)
 
 void Session::restore_initial_state()
 {
-  this->initial_snapshot_->restore(&model_checker_->process());
+  this->initial_snapshot_->restore(&model_checker_->get_remote_simulation());
 }
 
 void Session::log_state()
index b586034..2216f07 100644 (file)
@@ -19,12 +19,12 @@ namespace mc {
 /** @brief Save the current state */
 VisitedState::VisitedState(unsigned long state_number) : num(state_number)
 {
-  simgrid::mc::RemoteClientMemory* process = &(mc_model_checker->process());
+  simgrid::mc::RemoteSimulation* process = &(mc_model_checker->get_remote_simulation());
   this->heap_bytes_used = mmalloc_get_bytes_used_remote(
     process->get_heap()->heaplimit,
     process->get_malloc_info());
 
-  this->actors_count = mc_model_checker->process().actors().size();
+  this->actors_count = mc_model_checker->get_remote_simulation().actors().size();
 
   this->system_state = std::make_shared<simgrid::mc::Snapshot>(state_number);
 }
index ebd1a91..cf114b1 100644 (file)
@@ -95,21 +95,23 @@ static void update_comm_pattern(simgrid::mc::PatternCommunication* comm_pattern,
 {
   // HACK, type punning
   simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_comm;
-  mc_model_checker->process().read(temp_comm, comm_addr);
+  mc_model_checker->get_remote_simulation().read(temp_comm, comm_addr);
   const simgrid::kernel::activity::CommImpl* comm = temp_comm.get_buffer();
 
-  smx_actor_t src_proc   = mc_model_checker->process().resolve_actor(simgrid::mc::remote(comm->src_actor_.get()));
-  smx_actor_t dst_proc   = mc_model_checker->process().resolve_actor(simgrid::mc::remote(comm->dst_actor_.get()));
+  smx_actor_t src_proc =
+      mc_model_checker->get_remote_simulation().resolve_actor(simgrid::mc::remote(comm->src_actor_.get()));
+  smx_actor_t dst_proc =
+      mc_model_checker->get_remote_simulation().resolve_actor(simgrid::mc::remote(comm->dst_actor_.get()));
   comm_pattern->src_proc = src_proc->get_pid();
   comm_pattern->dst_proc = dst_proc->get_pid();
   comm_pattern->src_host = MC_smx_actor_get_host_name(src_proc);
   comm_pattern->dst_host = MC_smx_actor_get_host_name(dst_proc);
   if (comm_pattern->data.size() == 0 && comm->src_buff_ != nullptr) {
     size_t buff_size;
-    mc_model_checker->process().read(&buff_size, remote(comm->dst_buff_size_));
+    mc_model_checker->get_remote_simulation().read(&buff_size, remote(comm->dst_buff_size_));
     comm_pattern->data.resize(buff_size);
-    mc_model_checker->process().read_bytes(comm_pattern->data.data(), comm_pattern->data.size(),
-                                           remote(comm->src_buff_));
+    mc_model_checker->get_remote_simulation().read_bytes(comm_pattern->data.data(), comm_pattern->data.size(),
+                                                         remote(comm->src_buff_));
   }
 }
 
@@ -183,14 +185,15 @@ void CommunicationDeterminismChecker::get_comm_pattern(smx_simcall_t request, e_
     pattern->comm_addr = static_cast<kernel::activity::CommImpl*>(simcall_comm_isend__getraw__result(request));
 
     Remote<kernel::activity::CommImpl> temp_synchro;
-    mc_model_checker->process().read(temp_synchro,
-                                     remote(static_cast<kernel::activity::CommImpl*>(pattern->comm_addr)));
+    mc_model_checker->get_remote_simulation().read(
+        temp_synchro, remote(static_cast<kernel::activity::CommImpl*>(pattern->comm_addr)));
     const kernel::activity::CommImpl* synchro = static_cast<kernel::activity::CommImpl*>(temp_synchro.get_buffer());
 
-    char* remote_name = mc_model_checker->process().read<char*>(RemotePtr<char*>(
+    char* remote_name = mc_model_checker->get_remote_simulation().read<char*>(RemotePtr<char*>(
         (uint64_t)(synchro->get_mailbox() ? &synchro->get_mailbox()->name_ : &synchro->mbox_cpy->name_)));
-    pattern->rdv      = mc_model_checker->process().read_string(RemotePtr<char>(remote_name));
-    pattern->src_proc = mc_model_checker->process().resolve_actor(mc::remote(synchro->src_actor_.get()))->get_pid();
+    pattern->rdv      = mc_model_checker->get_remote_simulation().read_string(RemotePtr<char>(remote_name));
+    pattern->src_proc =
+        mc_model_checker->get_remote_simulation().resolve_actor(mc::remote(synchro->src_actor_.get()))->get_pid();
     pattern->src_host = MC_smx_actor_get_host_name(issuer);
 
 #if HAVE_SMPI
@@ -202,7 +205,8 @@ void CommunicationDeterminismChecker::get_comm_pattern(smx_simcall_t request, e_
 
     if (synchro->src_buff_ != nullptr) {
       pattern->data.resize(synchro->src_buff_size_);
-      mc_model_checker->process().read_bytes(pattern->data.data(), pattern->data.size(), remote(synchro->src_buff_));
+      mc_model_checker->get_remote_simulation().read_bytes(pattern->data.data(), pattern->data.size(),
+                                                           remote(synchro->src_buff_));
     }
 #if HAVE_SMPI
     if(mpi_request.detached()){
@@ -229,15 +233,17 @@ void CommunicationDeterminismChecker::get_comm_pattern(smx_simcall_t request, e_
 #endif
 
     Remote<kernel::activity::CommImpl> temp_comm;
-    mc_model_checker->process().read(temp_comm, remote(static_cast<kernel::activity::CommImpl*>(pattern->comm_addr)));
+    mc_model_checker->get_remote_simulation().read(
+        temp_comm, remote(static_cast<kernel::activity::CommImpl*>(pattern->comm_addr)));
     const kernel::activity::CommImpl* comm = temp_comm.get_buffer();
 
     char* remote_name;
-    mc_model_checker->process().read(
+    mc_model_checker->get_remote_simulation().read(
         &remote_name, remote(comm->get_mailbox() ? &xbt::string::to_string_data(comm->get_mailbox()->name_).data
                                                  : &xbt::string::to_string_data(comm->mbox_cpy->name_).data));
-    pattern->rdv      = mc_model_checker->process().read_string(RemotePtr<char>(remote_name));
-    pattern->dst_proc = mc_model_checker->process().resolve_actor(mc::remote(comm->dst_actor_.get()))->get_pid();
+    pattern->rdv = mc_model_checker->get_remote_simulation().read_string(RemotePtr<char>(remote_name));
+    pattern->dst_proc =
+        mc_model_checker->get_remote_simulation().resolve_actor(mc::remote(comm->dst_actor_.get()))->get_pid();
     pattern->dst_host = MC_smx_actor_get_host_name(issuer);
   } else
     xbt_die("Unexpected call_type %i", (int) call_type);
@@ -334,7 +340,7 @@ void CommunicationDeterminismChecker::prepare()
   XBT_DEBUG("********* Start communication determinism verification *********");
 
   /* Get an enabled actor and insert it in the interleave set of the initial state */
-  for (auto& actor : mc_model_checker->process().actors())
+  for (auto& actor : mc_model_checker->get_remote_simulation().actors())
     if (mc::actor_is_enabled(actor.copy.get_buffer()))
       initial_state->add_interleaving_set(actor.copy.get_buffer());
 
@@ -357,7 +363,7 @@ void CommunicationDeterminismChecker::restoreState()
   /* Intermediate backtracking */
   State* last_state = stack_.back().get();
   if (last_state->system_state_) {
-    last_state->system_state_->restore(&mc_model_checker->process());
+    last_state->system_state_->restore(&mc_model_checker->get_remote_simulation());
     MC_restore_communications_pattern(last_state);
     return;
   }
@@ -461,7 +467,7 @@ void CommunicationDeterminismChecker::real_run()
 
       if (visited_state == nullptr) {
         /* Get enabled actors and insert them in the interleave set of the next state */
-        for (auto& actor : mc_model_checker->process().actors())
+        for (auto& actor : mc_model_checker->get_remote_simulation().actors())
           if (simgrid::mc::actor_is_enabled(actor.copy.get_buffer()))
             next_state->add_interleaving_set(actor.copy.get_buffer());
 
index 0afe206..e3e7735 100644 (file)
@@ -26,14 +26,14 @@ VisitedPair::VisitedPair(int pair_num, xbt_automaton_state_t automaton_state,
                          std::shared_ptr<State> graph_state)
     : num(pair_num), automaton_state(automaton_state)
 {
-  RemoteClientMemory* process = &(mc_model_checker->process());
+  RemoteSimulation* process = &(mc_model_checker->get_remote_simulation());
 
   this->graph_state = std::move(graph_state);
   if (this->graph_state->system_state_ == nullptr)
     this->graph_state->system_state_ = std::make_shared<Snapshot>(pair_num);
   this->heap_bytes_used = mmalloc_get_bytes_used_remote(process->get_heap()->heaplimit, process->get_malloc_info());
 
-  this->actors_count = mc_model_checker->process().actors().size();
+  this->actors_count = mc_model_checker->get_remote_simulation().actors().size();
 
   this->other_num = -1;
   this->atomic_propositions = std::move(atomic_propositions);
@@ -123,7 +123,7 @@ void LivenessChecker::replay()
   if(_sg_mc_checkpoint > 0) {
     const Pair* pair = exploration_stack_.back().get();
     if (pair->graph_state->system_state_) {
-      pair->graph_state->system_state_->restore(&mc_model_checker->process());
+      pair->graph_state->system_state_->restore(&mc_model_checker->get_remote_simulation());
       return;
     }
   }
@@ -273,7 +273,7 @@ std::shared_ptr<Pair> LivenessChecker::create_pair(const Pair* current_pair, xbt
   else
     next_pair->depth = 1;
   /* Get enabled actors and insert them in the interleave set of the next graph_state */
-  for (auto& actor : mc_model_checker->process().actors())
+  for (auto& actor : mc_model_checker->get_remote_simulation().actors())
     if (mc::actor_is_enabled(actor.copy.get_buffer()))
       next_pair->graph_state->add_interleaving_set(actor.copy.get_buffer());
   next_pair->requests = next_pair->graph_state->interleave_size();
index 70cf398..e4c42d8 100644 (file)
@@ -147,7 +147,7 @@ void SafetyChecker::run()
     /* If this is a new state (or if we don't care about state-equality reduction) */
     if (visited_state_ == nullptr) {
       /* Get an enabled process and insert it in the interleave set of the next state */
-      for (auto& remoteActor : mc_model_checker->process().actors()) {
+      for (auto& remoteActor : mc_model_checker->get_remote_simulation().actors()) {
         auto actor = remoteActor.copy.get_buffer();
         if (actor_is_enabled(actor)) {
           next_state->add_interleaving_set(actor);
@@ -246,7 +246,7 @@ void SafetyChecker::restore_state()
   /* Intermediate backtracking */
   const State* last_state = stack_.back().get();
   if (last_state->system_state_) {
-    last_state->system_state_->restore(&mc_model_checker->process());
+    last_state->system_state_->restore(&mc_model_checker->get_remote_simulation());
     return;
   }
 
@@ -288,7 +288,7 @@ SafetyChecker::SafetyChecker(Session& s) : Checker(s)
   XBT_DEBUG("Initial state");
 
   /* Get an enabled actor and insert it in the interleave set of the initial state */
-  for (auto& actor : mc_model_checker->process().actors())
+  for (auto& actor : mc_model_checker->get_remote_simulation().actors())
     if (actor_is_enabled(actor.copy.get_buffer())) {
       initial_state->add_interleaving_set(actor.copy.get_buffer());
       if (reductionMode_ != ReductionMode::none)
index 1c0d462..dd6b7b9 100644 (file)
@@ -153,7 +153,7 @@ static ssize_t heap_comparison_ignore_size(const std::vector<simgrid::mc::Ignore
 
 static bool is_stack(const void *address)
 {
-  for (auto const& stack : mc_model_checker->process().stack_areas())
+  for (auto const& stack : mc_model_checker->get_remote_simulation().stack_areas())
     if (address == stack.address)
       return true;
   return false;
@@ -162,7 +162,7 @@ static bool is_stack(const void *address)
 // TODO, this should depend on the snapshot?
 static bool is_block_stack(int block)
 {
-  for (auto const& stack : mc_model_checker->process().stack_areas())
+  for (auto const& stack : mc_model_checker->get_remote_simulation().stack_areas())
     if (block == stack.block)
       return true;
   return false;
@@ -200,7 +200,7 @@ int StateComparator::initHeapInformation(const s_xbt_mheap_t* heap1, const s_xbt
   if ((heap1->heaplimit != heap2->heaplimit) || (heap1->heapsize != heap2->heapsize))
     return -1;
   this->heaplimit     = heap1->heaplimit;
-  this->std_heap_copy = *mc_model_checker->process().get_heap();
+  this->std_heap_copy = *mc_model_checker->get_remote_simulation().get_heap();
   this->processStates[0].initHeapInformation(heap1, i1);
   this->processStates[1].initHeapInformation(heap2, i2);
   return 0;
@@ -220,7 +220,7 @@ static bool heap_area_differ(StateComparator& state, const void* area1, const vo
 
 static bool mmalloc_heap_differ(StateComparator& state, const Snapshot& snapshot1, const Snapshot& snapshot2)
 {
-  const RemoteClientMemory& process = mc_model_checker->process();
+  const RemoteSimulation& process = mc_model_checker->get_remote_simulation();
 
   /* Check busy blocks */
   size_t i1 = 1;
@@ -448,7 +448,7 @@ static bool heap_area_differ_without_type(StateComparator& state, const void* re
                                           const Snapshot& snapshot1, const Snapshot& snapshot2,
                                           HeapLocationPairs* previous, int size, int check_ignore)
 {
-  const RemoteClientMemory& process = mc_model_checker->process();
+  const RemoteSimulation& process = mc_model_checker->get_remote_simulation();
   const Region* heap_region1  = MC_get_heap_region(snapshot1);
   const Region* heap_region2  = MC_get_heap_region(snapshot2);
 
@@ -734,7 +734,7 @@ static Type* get_offset_type(void* real_base_address, Type* type, int offset, in
 static bool heap_area_differ(StateComparator& state, const void* area1, const void* area2, const Snapshot& snapshot1,
                              const Snapshot& snapshot2, HeapLocationPairs* previous, Type* type, int pointer_level)
 {
-  const simgrid::mc::RemoteClientMemory& process = mc_model_checker->process();
+  const simgrid::mc::RemoteSimulation& process = mc_model_checker->get_remote_simulation();
 
   ssize_t block1;
   ssize_t block2;
@@ -1202,7 +1202,7 @@ bool snapshot_equal(const Snapshot* s1, const Snapshot* s2)
   // TODO, make this a field of ModelChecker or something similar
   static StateComparator state_comparator;
 
-  const RemoteClientMemory& process = mc_model_checker->process();
+  const RemoteSimulation& process = mc_model_checker->get_remote_simulation();
 
   if (s1->hash_ != s2->hash_) {
     XBT_VERB("(%d - %d) Different hash: 0x%" PRIx64 "--0x%" PRIx64, s1->num_state_, s2->num_state_, s1->hash_,
index 93fe918..9903b53 100644 (file)
@@ -157,7 +157,7 @@ XBT_PRIVATE std::shared_ptr<ObjectInformation> createObjectInformation(std::vect
                                                                        const char* name);
 
 /** Augment the current module with informations about the other ones */
-XBT_PRIVATE void postProcessObjectInformation(const simgrid::mc::RemoteClientMemory* process,
+XBT_PRIVATE void postProcessObjectInformation(const simgrid::mc::RemoteSimulation* process,
                                               simgrid::mc::ObjectInformation* info);
 } // namespace mc
 } // namespace simgrid
index 814449b..22c8d6b 100644 (file)
@@ -13,7 +13,7 @@
 #include "src/mc/inspect/Variable.hpp"
 #include "src/mc/inspect/mc_dwarf.hpp"
 #include "src/mc/mc_private.hpp"
-#include "src/mc/remote/RemoteClientMemory.hpp"
+#include "src/mc/remote/RemoteSimulation.hpp"
 
 #include <cinttypes>
 #include <cstdint>
@@ -1207,7 +1207,7 @@ std::shared_ptr<ObjectInformation> createObjectInformation(std::vector<xbt::VmMa
 
 /*************************************************************************/
 
-void postProcessObjectInformation(const RemoteClientMemory* process, ObjectInformation* info)
+void postProcessObjectInformation(const RemoteSimulation* process, ObjectInformation* info)
 {
   for (auto& t : info->types) {
     Type* type    = &(t.second);
index f2403ec..f11170b 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "src/mc/inspect/mc_unw.hpp"
 #include "src/mc/inspect/Frame.hpp"
-#include "src/mc/remote/RemoteClientMemory.hpp"
+#include "src/mc/remote/RemoteSimulation.hpp"
 
 #include <cstring>
 
@@ -223,7 +223,7 @@ unw_addr_space_t UnwindContext::createUnwindAddressSpace()
   return unw_create_addr_space(&UnwindContext::accessors, BYTE_ORDER);
 }
 
-void UnwindContext::initialize(simgrid::mc::RemoteClientMemory* process, unw_context_t* c)
+void UnwindContext::initialize(simgrid::mc::RemoteSimulation* process, unw_context_t* c)
 {
   this->address_space_ = process;
   this->process_      = process;
index 2f0bd18..d94c171 100644 (file)
@@ -44,11 +44,11 @@ namespace mc {
 
 class UnwindContext {
   simgrid::mc::AddressSpace* address_space_ = nullptr;
-  simgrid::mc::RemoteClientMemory* process_ = nullptr;
+  simgrid::mc::RemoteSimulation* process_   = nullptr;
   unw_context_t unwind_context_;
 
 public:
-  void initialize(simgrid::mc::RemoteClientMemory* process, unw_context_t* c);
+  void initialize(simgrid::mc::RemoteSimulation* process, unw_context_t* c);
   unw_cursor_t cursor();
 
 private: // Methods and virtual table for libunwind
index 83048b3..08e6bfa 100644 (file)
@@ -4,7 +4,7 @@
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 #include "src/mc/inspect/mc_unw.hpp"
-#include "src/mc/remote/RemoteClientMemory.hpp"
+#include "src/mc/remote/RemoteSimulation.hpp"
 
 #include <sys/types.h>
 #include <sys/uio.h>
index 2d7942e..b8300db 100644 (file)
@@ -16,7 +16,7 @@
 #if SIMGRID_HAVE_MC
 #include "src/mc/ModelChecker.hpp"
 #include "src/mc/Session.hpp"
-#include "src/mc/remote/RemoteClientMemory.hpp"
+#include "src/mc/remote/RemoteSimulation.hpp"
 
 using simgrid::mc::remote;
 #endif
index 9a3d3b5..bdbf88b 100644 (file)
@@ -69,7 +69,7 @@ void MC_handle_comm_pattern(e_mc_call_type_t call_type, smx_simcall_t req, int v
 
     else {
       simgrid::kernel::activity::ActivityImpl* addr;
-      addr      = mc_model_checker->process().read(remote(simcall_comm_waitany__getraw__comms(req) + value));
+      addr = mc_model_checker->get_remote_simulation().read(remote(simcall_comm_waitany__getraw__comms(req) + value));
       comm_addr = remote(static_cast<simgrid::kernel::activity::CommImpl*>(addr));
       }
       checker->complete_comm_pattern(comm_addr, MC_smx_simcall_get_issuer(req)->get_pid(), backtracking);
index 680e3e3..472c862 100644 (file)
@@ -18,7 +18,7 @@ class PageStore;
 class ChunkedData;
 class ModelChecker;
 class AddressSpace;
-class RemoteClientMemory;
+class RemoteSimulation;
 class Snapshot;
 class ObjectInformation;
 class Member;
index 3c663e4..565aeec 100644 (file)
@@ -209,7 +209,7 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
       size_t* remote_size = simcall_comm_irecv__get__dst_buff_size(req);
       size_t size         = 0;
       if (remote_size)
-        mc_model_checker->process().read_bytes(&size, sizeof(size), remote(remote_size));
+        mc_model_checker->get_remote_simulation().read_bytes(&size, sizeof(size), remote(remote_size));
 
       type     = "iRecv";
       char* p  = pointer_to_string(simcall_comm_irecv__get__dst_buff(req));
@@ -239,14 +239,16 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
         simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
         const simgrid::kernel::activity::CommImpl* act;
         if (use_remote_comm) {
-          mc_model_checker->process().read(temp_synchro,
-                                           remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
+          mc_model_checker->get_remote_simulation().read(
+              temp_synchro, remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
           act = temp_synchro.get_buffer();
         } else
           act = remote_act;
 
-        smx_actor_t src_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(act->src_actor_.get()));
-        smx_actor_t dst_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(act->dst_actor_.get()));
+        smx_actor_t src_proc =
+            mc_model_checker->get_remote_simulation().resolve_actor(simgrid::mc::remote(act->src_actor_.get()));
+        smx_actor_t dst_proc =
+            mc_model_checker->get_remote_simulation().resolve_actor(simgrid::mc::remote(act->dst_actor_.get()));
         args                 = bprintf("comm=%s [(%ld)%s (%s)-> (%ld)%s (%s)]", p, src_proc ? src_proc->get_pid() : 0,
                        src_proc ? MC_smx_actor_get_host_name(src_proc) : "",
                        src_proc ? MC_smx_actor_get_name(src_proc) : "", dst_proc ? dst_proc->get_pid() : 0,
@@ -263,8 +265,8 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
       simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_synchro;
       const simgrid::kernel::activity::CommImpl* act;
       if (use_remote_comm) {
-        mc_model_checker->process().read(temp_synchro,
-                                         remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
+        mc_model_checker->get_remote_simulation().read(
+            temp_synchro, remote(static_cast<simgrid::kernel::activity::CommImpl*>(remote_act)));
         act = temp_synchro.get_buffer();
       } else
         act = remote_act;
@@ -278,8 +280,10 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
         type = "Test TRUE";
         p    = pointer_to_string(remote_act);
 
-        smx_actor_t src_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(act->src_actor_.get()));
-        smx_actor_t dst_proc = mc_model_checker->process().resolve_actor(simgrid::mc::remote(act->dst_actor_.get()));
+        smx_actor_t src_proc =
+            mc_model_checker->get_remote_simulation().resolve_actor(simgrid::mc::remote(act->src_actor_.get()));
+        smx_actor_t dst_proc =
+            mc_model_checker->get_remote_simulation().resolve_actor(simgrid::mc::remote(act->dst_actor_.get()));
         args                 = bprintf("comm=%s [(%ld)%s (%s) -> (%ld)%s (%s)]", p, src_proc->get_pid(),
                        MC_smx_actor_get_name(src_proc), MC_smx_actor_get_host_name(src_proc), dst_proc->get_pid(),
                        MC_smx_actor_get_name(dst_proc), MC_smx_actor_get_host_name(dst_proc));
@@ -293,7 +297,8 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
       size_t count = simcall_comm_waitany__get__count(req);
       if (count > 0) {
         simgrid::kernel::activity::CommImpl* remote_sync;
-        remote_sync = mc_model_checker->process().read(remote(simcall_comm_waitany__get__comms(req) + value));
+        remote_sync =
+            mc_model_checker->get_remote_simulation().read(remote(simcall_comm_waitany__get__comms(req) + value));
         char* p     = pointer_to_string(remote_sync);
         args        = bprintf("comm=%s (%d of %zu)", p, value + 1, count);
         xbt_free(p);
@@ -320,13 +325,13 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
         type = "Mutex TRYLOCK";
 
       simgrid::mc::Remote<simgrid::kernel::activity::MutexImpl> mutex;
-      mc_model_checker->process().read_bytes(mutex.get_buffer(), sizeof(mutex),
-                                             remote(req->call_ == SIMCALL_MUTEX_LOCK
-                                                        ? simcall_mutex_lock__get__mutex(req)
-                                                        : simcall_mutex_trylock__get__mutex(req)));
+      mc_model_checker->get_remote_simulation().read_bytes(mutex.get_buffer(), sizeof(mutex),
+                                                           remote(req->call_ == SIMCALL_MUTEX_LOCK
+                                                                      ? simcall_mutex_lock__get__mutex(req)
+                                                                      : simcall_mutex_trylock__get__mutex(req)));
       args = bprintf("locked = %d, owner = %d, sleeping = n/a", mutex.get_buffer()->is_locked(),
                      mutex.get_buffer()->get_owner() != nullptr
-                         ? (int)mc_model_checker->process()
+                         ? (int)mc_model_checker->get_remote_simulation()
                                .resolve_actor(simgrid::mc::remote(mutex.get_buffer()->get_owner()))
                                ->get_pid()
                          : -1);
@@ -368,11 +373,11 @@ bool request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx)
       break;
 
     case SIMCALL_COMM_WAITANY:
-      remote_act = mc_model_checker->process().read(remote(simcall_comm_testany__get__comms(req) + idx));
+      remote_act = mc_model_checker->get_remote_simulation().read(remote(simcall_comm_testany__get__comms(req) + idx));
       break;
 
     case SIMCALL_COMM_TESTANY:
-      remote_act = mc_model_checker->process().read(remote(simcall_comm_testany__get__comms(req) + idx));
+      remote_act = mc_model_checker->get_remote_simulation().read(remote(simcall_comm_testany__get__comms(req) + idx));
       break;
 
     default:
@@ -380,7 +385,7 @@ bool request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx)
   }
 
   Remote<kernel::activity::CommImpl> temp_comm;
-  mc_model_checker->process().read(temp_comm, remote(remote_act));
+  mc_model_checker->get_remote_simulation().read(temp_comm, remote(remote_act));
   const kernel::activity::CommImpl* comm = temp_comm.get_buffer();
   return comm->src_actor_.get() && comm->dst_actor_.get();
 }
@@ -430,13 +435,14 @@ std::string request_get_dot_output(smx_simcall_t req, int value)
       } else {
         kernel::activity::ActivityImpl* remote_act = simcall_comm_wait__getraw__comm(req);
         Remote<kernel::activity::CommImpl> temp_comm;
-        mc_model_checker->process().read(temp_comm, remote(static_cast<kernel::activity::CommImpl*>(remote_act)));
+        mc_model_checker->get_remote_simulation().read(temp_comm,
+                                                       remote(static_cast<kernel::activity::CommImpl*>(remote_act)));
         const kernel::activity::CommImpl* comm = temp_comm.get_buffer();
 
         const kernel::actor::ActorImpl* src_proc =
-            mc_model_checker->process().resolve_actor(mc::remote(comm->src_actor_.get()));
+            mc_model_checker->get_remote_simulation().resolve_actor(mc::remote(comm->src_actor_.get()));
         const kernel::actor::ActorImpl* dst_proc =
-            mc_model_checker->process().resolve_actor(mc::remote(comm->dst_actor_.get()));
+            mc_model_checker->get_remote_simulation().resolve_actor(mc::remote(comm->dst_actor_.get()));
         if (issuer->get_host())
           label =
               xbt::string_printf("[(%ld)%s] Wait [(%ld)->(%ld)]", issuer->get_pid(), MC_smx_actor_get_host_name(issuer),
@@ -450,7 +456,8 @@ std::string request_get_dot_output(smx_simcall_t req, int value)
     case SIMCALL_COMM_TEST: {
       kernel::activity::ActivityImpl* remote_act = simcall_comm_test__getraw__comm(req);
       Remote<simgrid::kernel::activity::CommImpl> temp_comm;
-      mc_model_checker->process().read(temp_comm, remote(static_cast<kernel::activity::CommImpl*>(remote_act)));
+      mc_model_checker->get_remote_simulation().read(temp_comm,
+                                                     remote(static_cast<kernel::activity::CommImpl*>(remote_act)));
       const kernel::activity::CommImpl* comm = temp_comm.get_buffer();
       if (comm->src_actor_.get() == nullptr || comm->dst_actor_.get() == nullptr) {
         if (issuer->get_host())
index f86501d..d9ba8b9 100644 (file)
@@ -31,7 +31,7 @@ static inline simgrid::mc::ActorInformation* actor_info_cast(smx_actor_t actor)
  *  @param target       Local vector (to be filled with copies of `s_smx_actor_t`)
  *  @param remote_dynar Address of the process dynar in the remote list
  */
-static void MC_process_refresh_simix_actor_dynar(const simgrid::mc::RemoteClientMemory* process,
+static void MC_process_refresh_simix_actor_dynar(const simgrid::mc::RemoteSimulation* process,
                                                  std::vector<simgrid::mc::ActorInformation>& target,
                                                  simgrid::mc::RemotePtr<s_xbt_dynar_t> remote_dynar)
 {
@@ -57,9 +57,9 @@ static void MC_process_refresh_simix_actor_dynar(const simgrid::mc::RemoteClient
 namespace simgrid {
 namespace mc {
 
-void RemoteClientMemory::refresh_simix()
+void RemoteSimulation::refresh_simix()
 {
-  if (this->cache_flags_ & RemoteClientMemory::cache_simix_processes)
+  if (this->cache_flags_ & RemoteSimulation::cache_simix_processes)
     return;
 
   // TODO, avoid to reload `&simix_global`, `simix_global`, `*simix_global`
@@ -81,7 +81,7 @@ void RemoteClientMemory::refresh_simix()
   MC_process_refresh_simix_actor_dynar(this, this->smx_dead_actors_infos,
                                        remote(simix_global.get_buffer()->dead_actors_vector));
 
-  this->cache_flags_ |= RemoteClientMemory::cache_simix_processes;
+  this->cache_flags_ |= RemoteSimulation::cache_simix_processes;
 }
 
 }
@@ -104,10 +104,10 @@ smx_actor_t MC_smx_simcall_get_issuer(s_smx_simcall const* req)
   auto address = simgrid::mc::remote(req->issuer_);
 
   // Lookup by address:
-  for (auto& actor : mc_model_checker->process().actors())
+  for (auto& actor : mc_model_checker->get_remote_simulation().actors())
     if (actor.address == address)
       return actor.copy.get_buffer();
-  for (auto& actor : mc_model_checker->process().dead_actors())
+  for (auto& actor : mc_model_checker->get_remote_simulation().dead_actors())
     if (actor.address == address)
       return actor.copy.get_buffer();
 
@@ -119,7 +119,7 @@ const char* MC_smx_actor_get_host_name(smx_actor_t actor)
   if (mc_model_checker == nullptr)
     return actor->get_host()->get_cname();
 
-  const simgrid::mc::RemoteClientMemory* process = &mc_model_checker->process();
+  const simgrid::mc::RemoteSimulation* process = &mc_model_checker->get_remote_simulation();
 
   // Read the simgrid::xbt::string in the MCed process:
   simgrid::mc::ActorInformation* info     = actor_info_cast(actor);
@@ -134,7 +134,7 @@ const char* MC_smx_actor_get_host_name(smx_actor_t actor)
 
 const char* MC_smx_actor_get_name(smx_actor_t actor)
 {
-  const simgrid::mc::RemoteClientMemory* process = &mc_model_checker->process();
+  const simgrid::mc::RemoteSimulation* process = &mc_model_checker->get_remote_simulation();
   if (mc_model_checker == nullptr)
     return actor->get_cname();
 
@@ -150,8 +150,8 @@ unsigned long MC_smx_get_maxpid()
 {
   unsigned long maxpid;
   const char* name = "simgrid::kernel::actor::maxpid";
-  if (mc_model_checker->process().find_variable(name) == nullptr)
+  if (mc_model_checker->get_remote_simulation().find_variable(name) == nullptr)
     name = "maxpid"; // We seem to miss the namespaces when compiling with GCC
-  mc_model_checker->process().read_variable(name, &maxpid, sizeof(maxpid));
+  mc_model_checker->get_remote_simulation().read_variable(name, &maxpid, sizeof(maxpid));
   return maxpid;
 }
index 2fd8146..524c581 100644 (file)
@@ -6,7 +6,7 @@
 #ifndef SIMGRID_MC_SMX_HPP
 #define SIMGRID_MC_SMX_HPP
 
-#include "src/mc/remote/RemoteClientMemory.hpp"
+#include "src/mc/remote/RemoteSimulation.hpp"
 
 /** @file
  *  @brief (Cross-process, MCer/MCed) Access to SMX structures
index 6f5e47b..7a3c5c7 100644 (file)
@@ -111,7 +111,7 @@ static inline smx_simcall_t MC_state_choose_request_for_process(simgrid::mc::Sta
       simgrid::mc::RemotePtr<simgrid::kernel::activity::CommImpl> remote_act =
           remote(static_cast<simgrid::kernel::activity::CommImpl*>(simcall_comm_wait__getraw__comm(&actor->simcall)));
       simgrid::mc::Remote<simgrid::kernel::activity::CommImpl> temp_act;
-      mc_model_checker->process().read(temp_act, remote_act);
+      mc_model_checker->get_remote_simulation().read(temp_act, remote_act);
       const simgrid::kernel::activity::CommImpl* act = temp_act.get_buffer();
       if (act->src_actor_.get() && act->dst_actor_.get())
         state->transition_.argument_ = 0; // OK
@@ -155,9 +155,9 @@ static inline smx_simcall_t MC_state_choose_request_for_process(simgrid::mc::Sta
     case SIMCALL_COMM_WAITANY: {
       state->internal_req_.call_ = SIMCALL_COMM_WAIT;
       simgrid::kernel::activity::CommImpl* remote_comm;
-      remote_comm = mc_model_checker->process().read(
+      remote_comm = mc_model_checker->get_remote_simulation().read(
           remote(simcall_comm_waitany__get__comms(req) + state->transition_.argument_));
-      mc_model_checker->process().read(state->internal_comm_, remote(remote_comm));
+      mc_model_checker->get_remote_simulation().read(state->internal_comm_, remote(remote_comm));
       simcall_comm_wait__set__comm(&state->internal_req_, state->internal_comm_.get_buffer());
       simcall_comm_wait__set__timeout(&state->internal_req_, 0);
       break;
@@ -167,9 +167,9 @@ static inline smx_simcall_t MC_state_choose_request_for_process(simgrid::mc::Sta
       state->internal_req_.call_ = SIMCALL_COMM_TEST;
 
       if (state->transition_.argument_ > 0) {
-        simgrid::kernel::activity::CommImpl* remote_comm = mc_model_checker->process().read(
+        simgrid::kernel::activity::CommImpl* remote_comm = mc_model_checker->get_remote_simulation().read(
             remote(simcall_comm_testany__get__comms(req) + state->transition_.argument_));
-        mc_model_checker->process().read(state->internal_comm_, remote(remote_comm));
+        mc_model_checker->get_remote_simulation().read(state->internal_comm_, remote(remote_comm));
       }
 
       simcall_comm_test__set__comm(&state->internal_req_, state->internal_comm_.get_buffer());
@@ -177,15 +177,15 @@ static inline smx_simcall_t MC_state_choose_request_for_process(simgrid::mc::Sta
       break;
 
     case SIMCALL_COMM_WAIT:
-      mc_model_checker->process().read_bytes(&state->internal_comm_, sizeof(state->internal_comm_),
-                                             remote(simcall_comm_wait__getraw__comm(req)));
+      mc_model_checker->get_remote_simulation().read_bytes(&state->internal_comm_, sizeof(state->internal_comm_),
+                                                           remote(simcall_comm_wait__getraw__comm(req)));
       simcall_comm_wait__set__comm(&state->executed_req_, state->internal_comm_.get_buffer());
       simcall_comm_wait__set__comm(&state->internal_req_, state->internal_comm_.get_buffer());
       break;
 
     case SIMCALL_COMM_TEST:
-      mc_model_checker->process().read_bytes(&state->internal_comm_, sizeof(state->internal_comm_),
-                                             remote(simcall_comm_test__getraw__comm(req)));
+      mc_model_checker->get_remote_simulation().read_bytes(&state->internal_comm_, sizeof(state->internal_comm_),
+                                                           remote(simcall_comm_test__getraw__comm(req)));
       simcall_comm_test__set__comm(&state->executed_req_, state->internal_comm_.get_buffer());
       simcall_comm_test__set__comm(&state->internal_req_, state->internal_comm_.get_buffer());
       break;
@@ -200,7 +200,7 @@ static inline smx_simcall_t MC_state_choose_request_for_process(simgrid::mc::Sta
 
 smx_simcall_t MC_state_choose_request(simgrid::mc::State* state)
 {
-  for (auto& actor : mc_model_checker->process().actors()) {
+  for (auto& actor : mc_model_checker->get_remote_simulation().actors()) {
     /* Only consider the actors that were marked as interleaving by the checker algorithm */
     if (not state->actor_states_[actor.copy.get_buffer()->get_pid()].is_todo())
       continue;
similarity index 88%
rename from src/mc/remote/RemoteClientMemory.cpp
rename to src/mc/remote/RemoteSimulation.cpp
index a2558e9..290c765 100644 (file)
@@ -5,7 +5,7 @@
 
 #define _FILE_OFFSET_BITS 64 /* needed for pread_whole to work as expected on 32bits */
 
-#include "src/mc/remote/RemoteClientMemory.hpp"
+#include "src/mc/remote/RemoteSimulation.hpp"
 
 #include "src/mc/mc_smx.hpp"
 #include "src/mc/sosp/Snapshot.hpp"
@@ -208,11 +208,11 @@ int open_vm(pid_t pid, int flags)
   return open(buffer, flags);
 }
 
-// ***** Process
+// ***** RemoteSimulation
 
-RemoteClientMemory::RemoteClientMemory(pid_t pid) : AddressSpace(this), pid_(pid), running_(true) {}
+RemoteSimulation::RemoteSimulation(pid_t pid) : AddressSpace(this), pid_(pid), running_(true) {}
 
-void RemoteClientMemory::init()
+void RemoteSimulation::init()
 {
   this->memory_map_ = simgrid::xbt::get_memory_map(this->pid_);
   this->init_memory_map_info();
@@ -234,7 +234,7 @@ void RemoteClientMemory::init()
   this->unw_underlying_context    = simgrid::unw::create_context(this->unw_underlying_addr_space, this->pid_);
 }
 
-RemoteClientMemory::~RemoteClientMemory()
+RemoteSimulation::~RemoteSimulation()
 {
   if (this->memory_file >= 0)
     close(this->memory_file);
@@ -254,13 +254,13 @@ RemoteClientMemory::~RemoteClientMemory()
  *  Do not use directly, this is used by the getters when appropriate
  *  in order to have fresh data.
  */
-void RemoteClientMemory::refresh_heap()
+void RemoteSimulation::refresh_heap()
 {
   // Read/dereference/refresh the std_heap pointer:
   if (not this->heap)
     this->heap.reset(new s_xbt_mheap_t());
   this->read_bytes(this->heap.get(), sizeof(mdesc), remote(this->heap_address));
-  this->cache_flags_ |= RemoteClientMemory::cache_heap;
+  this->cache_flags_ |= RemoteSimulation::cache_heap;
 }
 
 /** Refresh the information about the process
@@ -268,20 +268,20 @@ void RemoteClientMemory::refresh_heap()
  *  Do not use directly, this is used by the getters when appropriate
  *  in order to have fresh data.
  * */
-void RemoteClientMemory::refresh_malloc_info()
+void RemoteSimulation::refresh_malloc_info()
 {
   // Refresh process->heapinfo:
-  if (this->cache_flags_ & RemoteClientMemory::cache_malloc)
+  if (this->cache_flags_ & RemoteSimulation::cache_malloc)
     return;
   size_t count = this->heap->heaplimit + 1;
   if (this->heap_info.size() < count)
     this->heap_info.resize(count);
   this->read_bytes(this->heap_info.data(), count * sizeof(malloc_info), remote(this->heap->heapinfo));
-  this->cache_flags_ |= RemoteClientMemory::cache_malloc;
+  this->cache_flags_ |= RemoteSimulation::cache_malloc;
 }
 
 /** @brief Finds the range of the different memory segments and binary paths */
-void RemoteClientMemory::init_memory_map_info()
+void RemoteSimulation::init_memory_map_info()
 {
   XBT_DEBUG("Get debug information ...");
   this->maestro_stack_start_ = nullptr;
@@ -351,7 +351,7 @@ void RemoteClientMemory::init_memory_map_info()
   XBT_DEBUG("Get debug information done !");
 }
 
-std::shared_ptr<simgrid::mc::ObjectInformation> RemoteClientMemory::find_object_info(RemotePtr<void> addr) const
+std::shared_ptr<simgrid::mc::ObjectInformation> RemoteSimulation::find_object_info(RemotePtr<void> addr) const
 {
   for (auto const& object_info : this->object_infos)
     if (addr.address() >= (std::uint64_t)object_info->start && addr.address() <= (std::uint64_t)object_info->end)
@@ -359,7 +359,7 @@ std::shared_ptr<simgrid::mc::ObjectInformation> RemoteClientMemory::find_object_
   return nullptr;
 }
 
-std::shared_ptr<ObjectInformation> RemoteClientMemory::find_object_info_exec(RemotePtr<void> addr) const
+std::shared_ptr<ObjectInformation> RemoteSimulation::find_object_info_exec(RemotePtr<void> addr) const
 {
   for (std::shared_ptr<ObjectInformation> const& info : this->object_infos)
     if (addr.address() >= (std::uint64_t)info->start_exec && addr.address() <= (std::uint64_t)info->end_exec)
@@ -367,7 +367,7 @@ std::shared_ptr<ObjectInformation> RemoteClientMemory::find_object_info_exec(Rem
   return nullptr;
 }
 
-std::shared_ptr<ObjectInformation> RemoteClientMemory::find_object_info_rw(RemotePtr<void> addr) const
+std::shared_ptr<ObjectInformation> RemoteSimulation::find_object_info_rw(RemotePtr<void> addr) const
 {
   for (std::shared_ptr<ObjectInformation> const& info : this->object_infos)
     if (addr.address() >= (std::uint64_t)info->start_rw && addr.address() <= (std::uint64_t)info->end_rw)
@@ -375,7 +375,7 @@ std::shared_ptr<ObjectInformation> RemoteClientMemory::find_object_info_rw(Remot
   return nullptr;
 }
 
-simgrid::mc::Frame* RemoteClientMemory::find_function(RemotePtr<void> ip) const
+simgrid::mc::Frame* RemoteSimulation::find_function(RemotePtr<void> ip) const
 {
   std::shared_ptr<simgrid::mc::ObjectInformation> info = this->find_object_info_exec(ip);
   return info ? info->find_function((void*)ip.address()) : nullptr;
@@ -383,7 +383,7 @@ simgrid::mc::Frame* RemoteClientMemory::find_function(RemotePtr<void> ip) const
 
 /** Find (one occurrence of) the named variable definition
  */
-const simgrid::mc::Variable* RemoteClientMemory::find_variable(const char* name) const
+const simgrid::mc::Variable* RemoteSimulation::find_variable(const char* name) const
 {
   // First lookup the variable in the executable shared object.
   // A global variable used directly by the executable code from a library
@@ -405,7 +405,7 @@ const simgrid::mc::Variable* RemoteClientMemory::find_variable(const char* name)
   return nullptr;
 }
 
-void RemoteClientMemory::read_variable(const char* name, void* target, size_t size) const
+void RemoteSimulation::read_variable(const char* name, void* target, size_t size) const
 {
   const simgrid::mc::Variable* var = this->find_variable(name);
   xbt_assert(var, "Variable %s not found", name);
@@ -416,7 +416,7 @@ void RemoteClientMemory::read_variable(const char* name, void* target, size_t si
   this->read_bytes(target, size, remote(var->address));
 }
 
-std::string RemoteClientMemory::read_string(RemotePtr<char> address) const
+std::string RemoteSimulation::read_string(RemotePtr<char> address) const
 {
   if (not address)
     return {};
@@ -440,8 +440,8 @@ std::string RemoteClientMemory::read_string(RemotePtr<char> address) const
   }
 }
 
-void* RemoteClientMemory::read_bytes(void* buffer, std::size_t size, RemotePtr<void> address,
-                                     ReadOptions /*options*/) const
+void* RemoteSimulation::read_bytes(void* buffer, std::size_t size, RemotePtr<void> address,
+                                   ReadOptions /*options*/) const
 {
   if (pread_whole(this->memory_file, buffer, size, (size_t)address.address()) < 0)
     xbt_die("Read at %p from process %lli failed", (void*)address.address(), (long long)this->pid_);
@@ -454,13 +454,13 @@ void* RemoteClientMemory::read_bytes(void* buffer, std::size_t size, RemotePtr<v
  *  @param len      data size
  *  @param address  target process memory address (target)
  */
-void RemoteClientMemory::write_bytes(const void* buffer, size_t len, RemotePtr<void> address)
+void RemoteSimulation::write_bytes(const void* buffer, size_t len, RemotePtr<void> address)
 {
   if (pwrite_whole(this->memory_file, buffer, len, (size_t)address.address()) < 0)
     xbt_die("Write to process %lli failed", (long long)this->pid_);
 }
 
-void RemoteClientMemory::clear_bytes(RemotePtr<void> address, size_t len)
+void RemoteSimulation::clear_bytes(RemotePtr<void> address, size_t len)
 {
   pthread_once(&zero_buffer_flag, zero_buffer_init);
   while (len) {
@@ -471,7 +471,7 @@ void RemoteClientMemory::clear_bytes(RemotePtr<void> address, size_t len)
   }
 }
 
-void RemoteClientMemory::ignore_region(std::uint64_t addr, std::size_t size)
+void RemoteSimulation::ignore_region(std::uint64_t addr, std::size_t size)
 {
   IgnoredRegion region;
   region.addr = addr;
@@ -516,7 +516,7 @@ void RemoteClientMemory::ignore_region(std::uint64_t addr, std::size_t size)
   ignored_regions_.insert(ignored_regions_.begin() + position, region);
 }
 
-void RemoteClientMemory::ignore_heap(IgnoredHeapRegion const& region)
+void RemoteSimulation::ignore_heap(IgnoredHeapRegion const& region)
 {
   if (ignored_heap_.empty()) {
     ignored_heap_.push_back(std::move(region));
@@ -550,7 +550,7 @@ void RemoteClientMemory::ignore_heap(IgnoredHeapRegion const& region)
   ignored_heap_.insert(ignored_heap_.begin() + cursor, region);
 }
 
-void RemoteClientMemory::unignore_heap(void* address, size_t size)
+void RemoteSimulation::unignore_heap(void* address, size_t size)
 {
   typedef std::vector<IgnoredHeapRegion>::size_type size_type;
 
@@ -575,7 +575,7 @@ void RemoteClientMemory::unignore_heap(void* address, size_t size)
   }
 }
 
-void RemoteClientMemory::ignore_local_variable(const char* var_name, const char* frame_name)
+void RemoteSimulation::ignore_local_variable(const char* var_name, const char* frame_name)
 {
   if (frame_name != nullptr && strcmp(frame_name, "*") == 0)
     frame_name = nullptr;
@@ -583,19 +583,19 @@ void RemoteClientMemory::ignore_local_variable(const char* var_name, const char*
     info->remove_local_variable(var_name, frame_name);
 }
 
-std::vector<simgrid::mc::ActorInformation>& RemoteClientMemory::actors()
+std::vector<simgrid::mc::ActorInformation>& RemoteSimulation::actors()
 {
   this->refresh_simix();
   return smx_actors_infos;
 }
 
-std::vector<simgrid::mc::ActorInformation>& RemoteClientMemory::dead_actors()
+std::vector<simgrid::mc::ActorInformation>& RemoteSimulation::dead_actors()
 {
   this->refresh_simix();
   return smx_dead_actors_infos;
 }
 
-void RemoteClientMemory::dump_stack()
+void RemoteSimulation::dump_stack()
 {
   unw_addr_space_t as = unw_create_addr_space(&_UPT_accessors, BYTE_ORDER);
   if (as == nullptr) {
similarity index 92%
rename from src/mc/remote/RemoteClientMemory.hpp
rename to src/mc/remote/RemoteSimulation.hpp
index 6216dd1..4d2ce16 100644 (file)
@@ -63,7 +63,7 @@ struct IgnoredHeapRegion {
  *  - stack unwinding;
  *  - etc.
  */
-class RemoteClientMemory final : public AddressSpace {
+class RemoteSimulation final : public AddressSpace {
 private:
   // Those flags are used to track down which cached information
   // is still up to date and which information needs to be updated.
@@ -73,14 +73,14 @@ private:
   static constexpr int cache_simix_processes = 4;
 
 public:
-  RemoteClientMemory(pid_t pid);
-  ~RemoteClientMemory();
+  RemoteSimulation(pid_t pid);
+  ~RemoteSimulation();
   void init();
 
-  RemoteClientMemory(RemoteClientMemory const&) = delete;
-  RemoteClientMemory(RemoteClientMemory&&)      = delete;
-  RemoteClientMemory& operator=(RemoteClientMemory const&) = delete;
-  RemoteClientMemory& operator=(RemoteClientMemory&&) = delete;
+  RemoteSimulation(RemoteSimulation const&) = delete;
+  RemoteSimulation(RemoteSimulation&&)      = delete;
+  RemoteSimulation& operator=(RemoteSimulation const&) = delete;
+  RemoteSimulation& operator=(RemoteSimulation&&) = delete;
 
   // Read memory:
   void* read_bytes(void* buffer, std::size_t size, RemotePtr<void> address,
@@ -115,18 +115,18 @@ public:
   // Heap access:
   xbt_mheap_t get_heap()
   {
-    if (not(this->cache_flags_ & RemoteClientMemory::cache_heap))
+    if (not(this->cache_flags_ & RemoteSimulation::cache_heap))
       this->refresh_heap();
     return this->heap.get();
   }
   const malloc_info* get_malloc_info()
   {
-    if (not(this->cache_flags_ & RemoteClientMemory::cache_malloc))
+    if (not(this->cache_flags_ & RemoteSimulation::cache_malloc))
       this->refresh_malloc_info();
     return this->heap_info.data();
   }
 
-  void clear_cache() { this->cache_flags_ = RemoteClientMemory::cache_none; }
+  void clear_cache() { this->cache_flags_ = RemoteSimulation::cache_none; }
 
   std::vector<IgnoredRegion> const& ignored_regions() const { return ignored_regions_; }
   void ignore_region(std::uint64_t address, std::size_t size);
@@ -193,7 +193,7 @@ private:
   void refresh_malloc_info();
   void refresh_simix();
 
-  pid_t pid_ = -1;
+  pid_t pid_    = -1;
   bool running_ = false;
   std::vector<xbt::VmMap> memory_map_;
   RemotePtr<void> maestro_stack_start_;
@@ -225,7 +225,7 @@ public:
 
 private:
   /** State of the cache (which variables are up to date) */
-  int cache_flags_ = RemoteClientMemory::cache_none;
+  int cache_flags_ = RemoteSimulation::cache_none;
 
 public:
   /** Address of the heap structure in the MCed process. */
index dd9541e..a770cd3 100644 (file)
@@ -24,8 +24,8 @@ Region::Region(RegionType region_type, void* start_addr, size_t size)
 {
   xbt_assert((((uintptr_t)start_addr) & (xbt_pagesize - 1)) == 0, "Start address not at the beginning of a page");
 
-  chunks_ = ChunkedData(mc_model_checker->page_store(), mc_model_checker->process(), RemotePtr<void>(start_addr),
-                        mmu::chunk_count(size));
+  chunks_ = ChunkedData(mc_model_checker->page_store(), mc_model_checker->get_remote_simulation(),
+                        RemotePtr<void>(start_addr), mmu::chunk_count(size));
 }
 
 /** @brief Restore a region from a snapshot
@@ -40,7 +40,7 @@ void Region::restore()
   for (size_t i = 0; i != get_chunks().page_count(); ++i) {
     void* target_page       = (void*)simgrid::mc::mmu::join(i, (std::uintptr_t)(void*)start().address());
     const void* source_page = get_chunks().page(i);
-    mc_model_checker->process().write_bytes(source_page, xbt_pagesize, remote(target_page));
+    mc_model_checker->get_remote_simulation().write_bytes(source_page, xbt_pagesize, remote(target_page));
   }
 }
 
index 62bc70d..6646082 100644 (file)
@@ -16,7 +16,7 @@ namespace mc {
 /************************************* Take Snapshot ************************************/
 /****************************************************************************************/
 
-void Snapshot::snapshot_regions(RemoteClientMemory* process)
+void Snapshot::snapshot_regions(RemoteSimulation* process)
 {
   snapshot_regions_.clear();
 
@@ -71,7 +71,7 @@ static void fill_local_variables_values(mc_stack_frame_t stack_frame, Frame* sco
     else if (not current_variable.location_list.empty()) {
       dwarf::Location location = simgrid::dwarf::resolve(current_variable.location_list, current_variable.object_info,
                                                          &(stack_frame->unw_cursor), (void*)stack_frame->frame_base,
-                                                         &mc_model_checker->process());
+                                                         &mc_model_checker->get_remote_simulation());
 
       if (not location.in_memory())
         xbt_die("Cannot handle non-address variable");
@@ -97,7 +97,7 @@ static std::vector<s_local_variable_t> get_local_variables_values(std::vector<s_
 
 static std::vector<s_mc_stack_frame_t> unwind_stack_frames(UnwindContext* stack_context)
 {
-  const RemoteClientMemory* process = &mc_model_checker->process();
+  const RemoteSimulation* process = &mc_model_checker->get_remote_simulation();
   std::vector<s_mc_stack_frame_t> result;
 
   unw_cursor_t c = stack_context->cursor();
@@ -149,7 +149,7 @@ static std::vector<s_mc_stack_frame_t> unwind_stack_frames(UnwindContext* stack_
   return result;
 }
 
-void Snapshot::snapshot_stacks(RemoteClientMemory* process)
+void Snapshot::snapshot_stacks(RemoteSimulation* process)
 {
   for (auto const& stack : process->stack_areas()) {
     s_mc_snapshot_stack_t st;
@@ -174,30 +174,31 @@ void Snapshot::snapshot_stacks(RemoteClientMemory* process)
 
 static void snapshot_handle_ignore(Snapshot* snapshot)
 {
-  xbt_assert(snapshot->process());
+  xbt_assert(snapshot->get_remote_simulation());
 
   // Copy the memory:
-  for (auto const& region : snapshot->process()->ignored_regions()) {
+  for (auto const& region : snapshot->get_remote_simulation()->ignored_regions()) {
     s_mc_snapshot_ignored_data_t ignored_data;
     ignored_data.start = (void*)region.addr;
     ignored_data.data.resize(region.size);
     // TODO, we should do this once per privatization segment:
-    snapshot->process()->read_bytes(ignored_data.data.data(), region.size, remote(region.addr));
+    snapshot->get_remote_simulation()->read_bytes(ignored_data.data.data(), region.size, remote(region.addr));
     snapshot->ignored_data_.push_back(std::move(ignored_data));
   }
 
   // Zero the memory:
-  for (auto const& region : snapshot->process()->ignored_regions())
-    snapshot->process()->clear_bytes(remote(region.addr), region.size);
+  for (auto const& region : snapshot->get_remote_simulation()->ignored_regions())
+    snapshot->get_remote_simulation()->clear_bytes(remote(region.addr), region.size);
 }
 
 static void snapshot_ignore_restore(const simgrid::mc::Snapshot* snapshot)
 {
   for (auto const& ignored_data : snapshot->ignored_data_)
-    snapshot->process()->write_bytes(ignored_data.data.data(), ignored_data.data.size(), remote(ignored_data.start));
+    snapshot->get_remote_simulation()->write_bytes(ignored_data.data.data(), ignored_data.data.size(),
+                                                   remote(ignored_data.start));
 }
 
-Snapshot::Snapshot(int num_state, RemoteClientMemory* process) : AddressSpace(process), num_state_(num_state)
+Snapshot::Snapshot(int num_state, RemoteSimulation* process) : AddressSpace(process), num_state_(num_state)
 {
   XBT_DEBUG("Taking snapshot %i", num_state);
 
@@ -243,7 +244,7 @@ void* Snapshot::read_bytes(void* buffer, std::size_t size, RemotePtr<void> addre
       return buffer;
     }
   } else
-    return this->process()->read_bytes(buffer, size, address, options);
+    return this->get_remote_simulation()->read_bytes(buffer, size, address, options);
 }
 /** @brief Find the snapshotted region from a pointer
  *
@@ -272,7 +273,7 @@ Region* Snapshot::get_region(const void* addr, Region* hinted_region) const
     return get_region(addr);
 }
 
-void Snapshot::restore(RemoteClientMemory* process)
+void Snapshot::restore(RemoteSimulation* process)
 {
   XBT_DEBUG("Restore snapshot %i", num_state_);
 
index a6a099b..d232d0b 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "src/mc/ModelChecker.hpp"
 #include "src/mc/inspect/mc_unw.hpp"
-#include "src/mc/remote/RemoteClientMemory.hpp"
+#include "src/mc/remote/RemoteSimulation.hpp"
 #include "src/mc/sosp/Region.hpp"
 
 // ***** MC Snapshot
@@ -60,13 +60,13 @@ namespace mc {
 class XBT_PRIVATE Snapshot final : public AddressSpace {
 public:
   /* Initialization */
-  Snapshot(int num_state, RemoteClientMemory* process = &mc_model_checker->process());
+  Snapshot(int num_state, RemoteSimulation* get_remote_simulation = &mc_model_checker->get_remote_simulation());
   ~Snapshot() = default;
 
   /* Regular use */
   bool on_heap(const void* address) const
   {
-    const s_xbt_mheap_t* heap = process()->get_heap();
+    const s_xbt_mheap_t* heap = get_remote_simulation()->get_heap();
     return address >= heap->heapbase && address < heap->breakval;
   }
 
@@ -74,7 +74,7 @@ public:
                    ReadOptions options = ReadOptions::none()) const override;
   Region* get_region(const void* addr) const;
   Region* get_region(const void* addr, Region* hinted_region) const;
-  void restore(RemoteClientMemory* process);
+  void restore(RemoteSimulation* get_remote_simulation);
 
   // To be private
   int num_state_;
@@ -89,8 +89,8 @@ public:
 
 private:
   void add_region(RegionType type, ObjectInformation* object_info, void* start_addr, std::size_t size);
-  void snapshot_regions(RemoteClientMemory* process);
-  void snapshot_stacks(RemoteClientMemory* process);
+  void snapshot_regions(RemoteSimulation* get_remote_simulation);
+  void snapshot_stacks(RemoteSimulation* get_remote_simulation);
 };
 } // namespace mc
 } // namespace simgrid
index 88f7d9a..c961a37 100644 (file)
@@ -37,11 +37,11 @@ public:
     mc_model_checker = nullptr;
   }
 
-  static std::unique_ptr<simgrid::mc::RemoteClientMemory> process;
+  static std::unique_ptr<simgrid::mc::RemoteSimulation> process;
 };
 
 // static member variables init.
-std::unique_ptr<simgrid::mc::RemoteClientMemory> snap_test_helper::process = nullptr;
+std::unique_ptr<simgrid::mc::RemoteSimulation> snap_test_helper::process = nullptr;
 
 void snap_test_helper::init_memory(void* mem, size_t size)
 {
@@ -56,7 +56,7 @@ void snap_test_helper::Init()
   REQUIRE(xbt_pagesize == getpagesize());
   REQUIRE(1 << xbt_pagebits == xbt_pagesize);
 
-  process.reset(new simgrid::mc::RemoteClientMemory(getpid()));
+  process.reset(new simgrid::mc::RemoteSimulation(getpid()));
   process->init();
   mc_model_checker = new ::simgrid::mc::ModelChecker(std::move(process), -1);
 }
index b8d08dc..32f8ecf 100644 (file)
@@ -12,7 +12,7 @@
 #include "src/mc/inspect/ObjectInformation.hpp"
 #include "src/mc/inspect/Type.hpp"
 #include "src/mc/inspect/Variable.hpp"
-#include "src/mc/remote/RemoteClientMemory.hpp"
+#include "src/mc/remote/RemoteSimulation.hpp"
 
 #include <cassert>
 #include <cstdlib>
@@ -21,7 +21,7 @@
 
 static std::default_random_engine rnd_engine;
 
-static simgrid::mc::RemoteClientMemory* process;
+static simgrid::mc::RemoteSimulation* process;
 
 static uintptr_t eval_binary_operation(simgrid::dwarf::ExpressionContext const& state, int op, uintptr_t a, uintptr_t b)
 {
@@ -145,7 +145,7 @@ static void test_deref(simgrid::dwarf::ExpressionContext const& state)
 
 int main()
 {
-  process = new simgrid::mc::RemoteClientMemory(getpid());
+  process = new simgrid::mc::RemoteSimulation(getpid());
   process->init();
 
   simgrid::dwarf::ExpressionContext state;
index f6a7148..6602fc9 100644 (file)
@@ -15,7 +15,7 @@
 #include "src/mc/inspect/ObjectInformation.hpp"
 #include "src/mc/inspect/Type.hpp"
 #include "src/mc/inspect/Variable.hpp"
-#include "src/mc/remote/RemoteClientMemory.hpp"
+#include "src/mc/remote/RemoteSimulation.hpp"
 
 #include <cassert>
 #include <cstring>
@@ -72,7 +72,7 @@ static void test_local_variable(simgrid::mc::ObjectInformation* info, const char
   xbt_assert(location.address() == address, "Bad resolution of local variable %s of %s", variable, function);
 }
 
-static const simgrid::mc::Variable* test_global_variable(const simgrid::mc::RemoteClientMemory& process,
+static const simgrid::mc::Variable* test_global_variable(const simgrid::mc::RemoteSimulation& process,
                                                          const simgrid::mc::ObjectInformation* info, const char* name,
                                                          void* address, long byte_size)
 {
@@ -104,7 +104,7 @@ struct s_foo {
   int i;
 };
 
-static void test_type_by_name(const simgrid::mc::RemoteClientMemory& process, s_foo /*my_foo*/)
+static void test_type_by_name(const simgrid::mc::RemoteSimulation& process, s_foo /*my_foo*/)
 {
   assert(process.binary_info->full_types_by_name.find("struct s_foo") != process.binary_info->full_types_by_name.end());
 }
@@ -116,7 +116,7 @@ int main(int argc, char** argv)
   const simgrid::mc::Variable* var;
   simgrid::mc::Type* type;
 
-  simgrid::mc::RemoteClientMemory process(getpid());
+  simgrid::mc::RemoteSimulation process(getpid());
   process.init();
 
   test_global_variable(process, process.binary_info.get(), "some_local_variable", &some_local_variable, sizeof(int));
index 00d134e..6d6fe24 100644 (file)
@@ -630,8 +630,8 @@ set(MC_SRC
   src/mc/remote/Channel.hpp
   src/mc/remote/CheckerSide.cpp
   src/mc/remote/CheckerSide.hpp
-  src/mc/remote/RemoteClientMemory.hpp
-  src/mc/remote/RemoteClientMemory.cpp
+  src/mc/remote/RemoteSimulation.hpp
+  src/mc/remote/RemoteSimulation.cpp
   src/mc/remote/RemotePtr.hpp
   src/mc/remote/mc_protocol.h
   src/mc/remote/mc_protocol.cpp