+++ /dev/null
-/* Copyright (c) 2016-2020. The SimGrid Team.
- * All rights reserved. */
-
-/* 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. */
-
-#include "src/mc/checker/Checker.hpp"
-#include "src/mc/ModelChecker.hpp"
-#include "xbt/asserts.h"
-
-namespace simgrid {
-namespace mc {
-
-Checker::Checker()
-{
- xbt_assert(mc_model_checker);
- xbt_assert(mc_model_checker->getChecker() == nullptr);
- mc_model_checker->setChecker(this);
-}
-
-} // namespace mc
-} // namespace simgrid
#ifndef SIMGRID_MC_CHECKER_HPP
#define SIMGRID_MC_CHECKER_HPP
-//#include "src/mc/Session.hpp"
-#include "src/mc/mc_forward.hpp"
-#include "src/mc/mc_record.hpp"
+#include "src/mc/mc_api.hpp"
namespace simgrid {
namespace mc {
// abstract
class Checker {
public:
- explicit Checker();
+ inline explicit Checker() { mc_api::get().set_checker(this); }
// No copy:
Checker(Checker const&) = delete;
#include "src/mc/Session.hpp"
#include "src/mc/mc_comm_pattern.hpp"
#include "src/mc/mc_private.hpp"
-#include "src/mc/mc_record.hpp"
#include "src/mc/mc_smx.hpp"
#include "src/mc/remote/RemoteSimulation.hpp"
#include "src/mc/mc_pattern.hpp"
return mc_model_checker->getChecker();
}
+void mc_api::set_checker(Checker* const checker) const
+{
+ xbt_assert(mc_model_checker);
+ xbt_assert(mc_model_checker->getChecker() == nullptr);
+ mc_model_checker->setChecker(checker);
+}
+
RemoteSimulation& mc_api::mc_get_remote_simulation() const
{
return mc_model_checker->get_remote_simulation();
#include "src/mc/mc_forward.hpp"
#include "src/mc/mc_request.hpp"
#include "src/mc/mc_state.hpp"
+#include "src/mc/mc_record.hpp"
#include "xbt/automaton.hpp"
#include "xbt/base.h"
void mc_show_deadlock() const;
bool mc_is_null() const;
Checker* mc_get_checker() const;
+ void set_checker(Checker* const checker) const;
RemoteSimulation& mc_get_remote_simulation() const;
void handle_simcall(Transition const& transition) const;
void mc_wait_for_requests() const;
)
set(MC_SRC
- src/mc/checker/Checker.cpp
src/mc/checker/Checker.hpp
src/mc/checker/CommunicationDeterminismChecker.cpp
src/mc/checker/CommunicationDeterminismChecker.hpp