Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Make Checker implementation private
[simgrid.git] / src / mc / Checker.hpp
index cf3e37a..6259678 100644 (file)
@@ -9,8 +9,10 @@
 
 #include <functional>
 #include <memory>
+#include <string>
 
 #include "src/mc/mc_forward.hpp"
+#include "src/mc/mc_record.h"
 
 namespace simgrid {
 namespace mc {
@@ -28,7 +30,7 @@ namespace mc {
 class Checker {
   Session* session_;
 public:
-  Checker(Session& session) : session_(&session) {}
+  Checker(Session& session);
 
   // No copy:
   Checker(Checker const&) = delete;
@@ -37,10 +39,23 @@ public:
   virtual ~Checker();
   virtual int run() = 0;
 
+  // Give me your internal state:
+
+  /** Show the current trace/stack
+   *
+   *  Could this be handled in the Session/ModelChecker instead?
+   */
+  virtual RecordTrace getRecordTrace();
+  virtual std::vector<std::string> getTextualTrace();
+
 protected:
   Session& getSession() { return *session_; }
 };
 
+XBT_PUBLIC() Checker* createLivenessChecker(Session& session);
+XBT_PUBLIC() Checker* createSafetyChecker(Session& session);
+XBT_PUBLIC() Checker* createCommunicationDeterminismChecker(Session& session);
+
 }
 }