Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill a file that was almost empty
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 14 Mar 2021 01:11:18 +0000 (02:11 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sun, 14 Mar 2021 01:25:49 +0000 (02:25 +0100)
MANIFEST.in
src/mc/api.cpp
src/mc/api.hpp
src/mc/checker/CommunicationDeterminismChecker.cpp
src/mc/checker/LivenessChecker.cpp
src/mc/checker/SafetyChecker.cpp
src/mc/mc_global.cpp
src/mc/mc_record.cpp
src/mc/mc_request.cpp [deleted file]
src/mc/mc_request.hpp [deleted file]
tools/cmake/DefinePackages.cmake

index b1bc14f..debcd90 100644 (file)
@@ -2268,8 +2268,6 @@ include src/mc/mc_private.hpp
 include src/mc/mc_record.cpp
 include src/mc/mc_record.hpp
 include src/mc/mc_replay.hpp
-include src/mc/mc_request.cpp
-include src/mc/mc_request.hpp
 include src/mc/mc_safety.hpp
 include src/mc/mc_smx.cpp
 include src/mc/mc_state.cpp
index a521812..825edc5 100644 (file)
@@ -47,6 +47,33 @@ static std::string buff_size_to_string(size_t buff_size)
 static void simcall_translate(smx_simcall_t req,
                               simgrid::mc::Remote<simgrid::kernel::activity::CommImpl>& buffered_comm);
 
+static bool request_is_enabled_by_idx(const RemoteProcess& process, smx_simcall_t req, unsigned int idx)
+{
+  kernel::activity::CommImpl* remote_act = nullptr;
+  switch (req->call_) {
+    case Simcall::COMM_WAIT:
+      /* FIXME: check also that src and dst processes are not suspended */
+      remote_act = simcall_comm_wait__getraw__comm(req);
+      break;
+
+    case Simcall::COMM_WAITANY:
+      remote_act = process.read(remote(simcall_comm_waitany__get__comms(req) + idx));
+      break;
+
+    case Simcall::COMM_TESTANY:
+      remote_act = process.read(remote(simcall_comm_testany__get__comms(req) + idx));
+      break;
+
+    default:
+      return true;
+  }
+
+  Remote<kernel::activity::CommImpl> temp_comm;
+  process.read(temp_comm, remote(remote_act));
+  const kernel::activity::CommImpl* comm = temp_comm.get_buffer();
+  return comm->src_actor_.get() && comm->dst_actor_.get();
+}
+
 /* Search an enabled transition for the given process.
  *
  * This can be seen as an iterator returning the next transition of the process.
index 792af3f..7d05275 100644 (file)
@@ -7,7 +7,6 @@
 #include "simgrid/forward.h"
 #include "src/mc/mc_forward.hpp"
 #include "src/mc/mc_record.hpp"
-#include "src/mc/mc_request.hpp"
 #include "src/mc/mc_state.hpp"
 #include "xbt/automaton.hpp"
 #include "xbt/base.h"
index b0f373a..07db218 100644 (file)
@@ -8,7 +8,6 @@
 #include "src/mc/mc_config.hpp"
 #include "src/mc/mc_exit.hpp"
 #include "src/mc/mc_private.hpp"
-#include "src/mc/mc_request.hpp"
 
 #include <cstdint>
 
index f5b5643..7b3c253 100644 (file)
@@ -7,7 +7,6 @@
 #include "src/mc/mc_config.hpp"
 #include "src/mc/mc_exit.hpp"
 #include "src/mc/mc_private.hpp"
-#include "src/mc/mc_request.hpp"
 
 #include <boost/range/algorithm.hpp>
 #include <cstring>
index cefde1f..4c3c0d2 100644 (file)
@@ -20,7 +20,6 @@
 #include "src/mc/mc_exit.hpp"
 #include "src/mc/mc_private.hpp"
 #include "src/mc/mc_record.hpp"
-#include "src/mc/mc_request.hpp"
 
 #include "src/xbt/mmalloc/mmprivate.h"
 
index 7906df2..70633f9 100644 (file)
@@ -13,7 +13,6 @@
 #include "src/mc/mc_comm_pattern.hpp"
 #include "src/mc/mc_config.hpp"
 #include "src/mc/mc_private.hpp"
-#include "src/mc/mc_request.hpp"
 #include "src/mc/mc_safety.hpp"
 #include "src/mc/remote/AppSide.hpp"
 #include "src/mc/sosp/Snapshot.hpp"
index 2afb21b..6ff4d15 100644 (file)
@@ -13,7 +13,6 @@
 #if SIMGRID_HAVE_MC
 #include "src/mc/checker/Checker.hpp"
 #include "src/mc/mc_private.hpp"
-#include "src/mc/mc_request.hpp"
 #include "src/mc/mc_state.hpp"
 #endif
 
diff --git a/src/mc/mc_request.cpp b/src/mc/mc_request.cpp
deleted file mode 100644 (file)
index 2212e9d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/* Copyright (c) 2008-2021. 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/mc_request.hpp"
-#include "src/include/mc/mc.h"
-#include "src/kernel/activity/CommImpl.hpp"
-#include "src/kernel/activity/MutexImpl.hpp"
-#include "src/mc/ModelChecker.hpp"
-#include "src/mc/checker/SimcallObserver.hpp"
-#include "src/mc/remote/RemoteProcess.hpp"
-
-#include <array>
-
-using simgrid::mc::remote;
-using simgrid::simix::Simcall;
-
-XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_request, mc, "Logging specific to MC (request)");
-
-namespace simgrid {
-namespace mc {
-
-bool request_is_enabled_by_idx(const RemoteProcess& process, smx_simcall_t req, unsigned int idx)
-{
-  kernel::activity::CommImpl* remote_act = nullptr;
-  switch (req->call_) {
-    case Simcall::COMM_WAIT:
-      /* FIXME: check also that src and dst processes are not suspended */
-      remote_act = simcall_comm_wait__getraw__comm(req);
-      break;
-
-    case Simcall::COMM_WAITANY:
-      remote_act = process.read(remote(simcall_comm_waitany__get__comms(req) + idx));
-      break;
-
-    case Simcall::COMM_TESTANY:
-      remote_act = process.read(remote(simcall_comm_testany__get__comms(req) + idx));
-      break;
-
-    default:
-      return true;
-  }
-
-  Remote<kernel::activity::CommImpl> temp_comm;
-  process.read(temp_comm, remote(remote_act));
-  const kernel::activity::CommImpl* comm = temp_comm.get_buffer();
-  return comm->src_actor_.get() && comm->dst_actor_.get();
-}
-
-} // namespace mc
-} // namespace simgrid
diff --git a/src/mc/mc_request.hpp b/src/mc/mc_request.hpp
deleted file mode 100644 (file)
index 39401c9..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Copyright (c) 2007-2021. 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_REQUEST_HPP
-#define SIMGRID_MC_REQUEST_HPP
-
-#include "src/mc/remote/RemoteProcess.hpp"
-#include "src/simix/smx_private.hpp"
-
-namespace simgrid {
-namespace mc {
-
-XBT_PRIVATE bool request_is_enabled_by_idx(const RemoteProcess& process, smx_simcall_t req, unsigned int idx);
-}
-}
-
-#endif
index f3969f4..b4705b3 100644 (file)
@@ -650,8 +650,6 @@ set(MC_SRC
   src/mc/mc_ignore.hpp
   src/mc/mc_record.cpp
   src/mc/mc_private.hpp
-  src/mc/mc_request.hpp
-  src/mc/mc_request.cpp
   src/mc/mc_safety.hpp
   src/mc/mc_state.hpp
   src/mc/mc_state.cpp