X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/90c67c5606b33791cc39883c5061e385a2a3ff33..706dd4584b4002e0d948b81d103dd5c4b70db077:/src/mc/Checker.hpp diff --git a/src/mc/Checker.hpp b/src/mc/Checker.hpp index cf3e37af66..70a9031b86 100644 --- a/src/mc/Checker.hpp +++ b/src/mc/Checker.hpp @@ -9,8 +9,11 @@ #include #include +#include #include "src/mc/mc_forward.hpp" +#include "src/mc/mc_record.h" +#include "src/mc/Session.hpp" namespace simgrid { namespace mc { @@ -18,7 +21,7 @@ namespace mc { /** A model-checking algorithm * * The goal is to move the data/state/configuration of a model-checking - * algorihms in subclasses. Implementing this interface will probably + * algorithms in subclasses. Implementing this interface will probably * not be really mandatory, you might be able to write your * model-checking algorithm as plain imperative code instead. * @@ -28,7 +31,7 @@ namespace mc { class Checker { Session* session_; public: - Checker(Session& session) : session_(&session) {} + Checker(Session& session); // No copy: Checker(Checker const&) = delete; @@ -37,10 +40,24 @@ 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 getTextualTrace(); + virtual void logState(); + protected: Session& getSession() { return *session_; } }; +XBT_PUBLIC() Checker* createLivenessChecker(Session& session); +XBT_PUBLIC() Checker* createSafetyChecker(Session& session); +XBT_PUBLIC() Checker* createCommunicationDeterminismChecker(Session& session); + } }