include src/kernel/xml/simgrid_dtd.c
include src/kernel/xml/simgrid_dtd.h
include src/mc/AddressSpace.hpp
-include src/mc/ModelChecker.cpp
-include src/mc/ModelChecker.hpp
include src/mc/VisitedState.cpp
include src/mc/VisitedState.hpp
include src/mc/api/ActorState.hpp
+++ /dev/null
-/* Copyright (c) 2008-2023. 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/ModelChecker.hpp"
-#include "src/mc/explo/Exploration.hpp"
-#include "src/mc/explo/LivenessChecker.hpp"
-#include "src/mc/mc_config.hpp"
-#include "src/mc/mc_exit.hpp"
-#include "src/mc/mc_private.hpp"
-#include "src/mc/sosp/RemoteProcessMemory.hpp"
-#include "src/mc/transition/TransitionComm.hpp"
-#include "xbt/automaton.hpp"
-#include "xbt/system_error.hpp"
-
-#include <array>
-#include <csignal>
-#include <sys/ptrace.h>
-#include <sys/wait.h>
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_ModelChecker, mc, "ModelChecker");
-
-::simgrid::mc::ModelChecker* mc_model_checker = nullptr;
-
-namespace simgrid::mc {
-
-} // namespace simgrid::mc
+++ /dev/null
-/* Copyright (c) 2007-2023. 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. */
-
-#ifndef SIMGRID_MC_MODEL_CHECKER_HPP
-#define SIMGRID_MC_MODEL_CHECKER_HPP
-
-#include "src/mc/remote/CheckerSide.hpp"
-#include "src/mc/remote/RemotePtr.hpp"
-#include "src/mc/sosp/PageStore.hpp"
-#include "xbt/base.h"
-
-#include <memory>
-
-namespace simgrid::mc {
-
-/** State of the model-checker (global variables for the model checker)
- */
-class ModelChecker {
-
-public:
- ModelChecker(ModelChecker const&) = delete;
- ModelChecker& operator=(ModelChecker const&) = delete;
- explicit ModelChecker() = default;
-};
-
-} // namespace simgrid::mc
-
-#endif
// Parent (model-checker):
::close(sockets[0]);
- xbt_assert(mc_model_checker == nullptr, "Did you manage to start the MC twice in this process?");
-
auto memory = std::make_unique<simgrid::mc::RemoteProcessMemory>(pid);
- model_checker_ = std::make_unique<simgrid::mc::ModelChecker>();
- mc_model_checker = model_checker_.get();
- checker_side_ = std::make_unique<simgrid::mc::CheckerSide>(sockets[1], std::move(memory), model_checker_.get());
+ checker_side_ = std::make_unique<simgrid::mc::CheckerSide>(sockets[1], std::move(memory));
start();
RemoteApp::~RemoteApp()
{
initial_snapshot_ = nullptr;
- if (model_checker_) {
- shutdown();
- model_checker_ = nullptr;
- mc_model_checker = nullptr;
- }
+ shutdown();
}
void RemoteApp::start()
{
#define SIMGRID_MC_REMOTE_APP_HPP
#include "simgrid/forward.h"
-#include "src/mc/ModelChecker.hpp"
#include "src/mc/api/ActorState.hpp"
+#include "src/mc/remote/CheckerSide.hpp"
#include "src/mc/remote/RemotePtr.hpp"
+#include "src/mc/sosp/PageStore.hpp"
#include <functional>
class XBT_PUBLIC RemoteApp {
private:
std::unique_ptr<CheckerSide> checker_side_;
- std::unique_ptr<ModelChecker> model_checker_;
PageStore page_store_{500};
std::shared_ptr<simgrid::mc::Snapshot> initial_snapshot_;
{
if (dot_output_ != nullptr)
fclose(dot_output_);
+ instance_ = nullptr;
}
void Exploration::dot_output(const char* fmt, ...)
#include "src/mc/mc_replay.hpp"
#if SIMGRID_HAVE_MC
-#include "src/mc/ModelChecker.hpp"
#include "src/mc/api/RemoteApp.hpp"
#include "src/mc/remote/AppSide.hpp"
#include "src/mc/sosp/RemoteProcessMemory.hpp"
class PageStore;
class ChunkedData;
-class ModelChecker;
class AddressSpace;
class RemoteProcessMemory;
class Snapshot;
class Exploration;
} // namespace simgrid::mc
-// TODO, try to get rid of the global ModelChecker variable
-extern simgrid::mc::ModelChecker* mc_model_checker;
-
#endif
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/mc/remote/CheckerSide.hpp"
-#include "src/mc/ModelChecker.hpp"
#include "src/mc/sosp/RemoteProcessMemory.hpp"
#include "xbt/system_error.hpp"
#include <csignal>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_checkerside, mc, "MC communication with the application");
namespace simgrid::mc {
-CheckerSide::CheckerSide(int sockfd, std::unique_ptr<RemoteProcessMemory> memory, ModelChecker* mc)
+CheckerSide::CheckerSide(int sockfd, std::unique_ptr<RemoteProcessMemory> memory)
: remote_memory_(std::move(memory)), channel_(sockfd)
{
auto* base = event_base_new();
Channel channel_;
public:
- explicit CheckerSide(int sockfd, std::unique_ptr<RemoteProcessMemory> mem, ModelChecker* mc);
+ explicit CheckerSide(int sockfd, std::unique_ptr<RemoteProcessMemory> mem);
// No copy:
CheckerSide(CheckerSide const&) = delete;
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/mc/sosp/Region.hpp"
-#include "src/mc/ModelChecker.hpp"
#include "src/mc/mc_config.hpp"
#include "src/mc/mc_forward.hpp"
#include "src/mc/sosp/RemoteProcessMemory.hpp"
#ifndef SIMGRID_MC_SNAPSHOT_HPP
#define SIMGRID_MC_SNAPSHOT_HPP
-#include "src/mc/ModelChecker.hpp"
#include "src/mc/inspect/mc_unw.hpp"
#include "src/mc/sosp/Region.hpp"
#include "src/mc/sosp/RemoteProcessMemory.hpp"
}
}
+int some_global_variable = 42;
+void* some_global_pointer = &some_global_variable;
void snap_test_helper::read_pointer()
{
prologue_return ret = prologue(1);
- memcpy(ret.src, &mc_model_checker, sizeof(void*));
+ memcpy(ret.src, &some_global_pointer, sizeof(void*));
const simgrid::mc::Region region2(page_store_, *memory_.get(), simgrid::mc::RegionType::Data, ret.src, ret.size);
INFO("Mismtach in MC_region_read_pointer()");
- REQUIRE(MC_region_read_pointer(®ion2, ret.src) == mc_model_checker);
+ REQUIRE(MC_region_read_pointer(®ion2, ret.src) == some_global_pointer);
munmap(ret.dstn, ret.size);
munmap(ret.src, ret.size);
#include <simgrid/config.h>
#if SIMGRID_HAVE_MC
-#include "src/mc/ModelChecker.hpp"
#include "src/mc/explo/Exploration.hpp"
#include "src/mc/transition/TransitionActorJoin.hpp"
#include "src/mc/transition/TransitionAny.hpp"
#include "xbt/asserts.h"
#include "xbt/string.hpp"
#if SIMGRID_HAVE_MC
-#include "src/mc/ModelChecker.hpp"
#include "src/mc/api/RemoteApp.hpp"
#include "src/mc/api/State.hpp"
#endif
#include "xbt/asserts.h"
#include "xbt/string.hpp"
#if SIMGRID_HAVE_MC
-#include "src/mc/ModelChecker.hpp"
#include "src/mc/api/RemoteApp.hpp"
#include "src/mc/api/State.hpp"
#endif
#include "xbt/asserts.h"
#include "xbt/string.hpp"
#if SIMGRID_HAVE_MC
-#include "src/mc/ModelChecker.hpp"
#include "src/mc/api/RemoteApp.hpp"
#include "src/mc/api/State.hpp"
#endif
src/mc/api/RemoteApp.hpp
src/mc/AddressSpace.hpp
- src/mc/ModelChecker.cpp
- src/mc/ModelChecker.hpp
src/mc/VisitedState.cpp
src/mc/VisitedState.hpp
src/mc/compare.cpp