Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / src / mc / ModelChecker.hpp
index fe50841..f8b0982 100644 (file)
@@ -3,18 +3,19 @@
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
+
 #ifndef SIMGRID_MC_MODEL_CHECKER_HPP
 #define SIMGRID_MC_MODEL_CHECKER_HPP
 
 #include <sys/types.h>
 
 #include <simgrid_config.h>
-#include <xbt/dynar.h>
+#include <xbt/dict.h>
+#include <xbt/base.h>
 
-#include "mc_forward.h"
-#include "mc_process.h"
-#include "PageStore.hpp"
+#include "mc_forward.hpp"
+#include "mc/Process.hpp"
+#include "mc/PageStore.hpp"
 #include "mc_protocol.h"
 
 namespace simgrid {
@@ -32,14 +33,17 @@ class ModelChecker {
   // TODO, use std::unordered_set with heterogeneous comparison lookup (C++14)
   xbt_dict_t /* <hostname, NULL> */ hostnames_;
   // This is the parent snapshot of the current state:
-  s_mc_pages_store_t page_store_;
-  s_mc_process_t process_;
+  PageStore page_store_;
+  Process process_;
+public:
+  mc_snapshot_t parent_snapshot_;
+
 public:
   ModelChecker(ModelChecker const&) = delete;
   ModelChecker& operator=(ModelChecker const&) = delete;
   ModelChecker(pid_t pid, int socket);
   ~ModelChecker();
-  s_mc_process_t& process()
+  Process& process()
   {
     return process_;
   }
@@ -48,6 +52,11 @@ public:
     return page_store_;
   }
   const char* get_host_name(const char* name);
+
+  bool is_important_snapshot(Snapshot const& snapshot) const
+  {
+    return &snapshot == mc_model_checker->parent_snapshot_;
+  }
 };
 
 }