-/* Copyright (c) 2016-2020. The SimGrid Team.
+/* Copyright (c) 2016-2021. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#ifndef SIMGRID_MC_CHECKER_HPP
#define SIMGRID_MC_CHECKER_HPP
-#include "src/mc/mc_api.hpp"
+#include "src/mc/api.hpp"
namespace simgrid {
namespace mc {
* have all the necessary features). */
// abstract
class Checker {
+ Session* session_;
+
public:
- inline explicit Checker() { mc_api::get().set_checker(this); }
+ explicit Checker(Session* session) : session_(session) {}
// No copy:
Checker(Checker const&) = delete;
/** Log additional information about the state of the model-checker */
virtual void log_state() = 0;
+
+ Session& get_session() { return *session_; }
};
// External constructors so that the types (and the types of their content) remain hidden
-XBT_PUBLIC Checker* createLivenessChecker();
-XBT_PUBLIC Checker* createSafetyChecker();
-XBT_PUBLIC Checker* createCommunicationDeterminismChecker();
+XBT_PUBLIC Checker* create_liveness_checker(Session* session);
+XBT_PUBLIC Checker* create_safety_checker(Session* session);
+XBT_PUBLIC Checker* create_communication_determinism_checker(Session* session);
+XBT_PUBLIC Checker* create_udpor_checker(Session* session);
} // namespace mc
} // namespace simgrid