Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make a global singleton of Exploration, to kill ModelChecker
[simgrid.git] / src / mc / explo / Exploration.hpp
index 045c7c5..c027256 100644 (file)
@@ -29,6 +29,7 @@ namespace simgrid::mc {
 // abstract
 class Exploration : public xbt::Extendable<Exploration> {
   std::unique_ptr<RemoteApp> remote_app_;
+  static Exploration* instance_;
 
   FILE* dot_output_ = nullptr;
 
@@ -36,6 +37,7 @@ public:
   explicit Exploration(const std::vector<char*>& args);
   virtual ~Exploration();
 
+  static Exploration* get_instance() { return instance_; }
   // No copy:
   Exploration(Exploration const&) = delete;
   Exploration& operator=(Exploration const&) = delete;
@@ -45,6 +47,8 @@ public:
 
   /** Produce an error message indicating that the application crashed (status was produced by waitpid) */
   void report_crash(int status);
+  /** Produce an error message indicating that a property was violated */
+  void report_assertion_failure();
 
   /** Kill the application and the model-checker (which exits with `status`)*/
   XBT_ATTRIB_NORETURN void system_exit(int status);