Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename mc::CheckerAlgorithm to mc::ExplorationAlgorithm, because that's what it is
[simgrid.git] / src / mc / api.cpp
index 0fd826cdca797b82ae93e6b3b051902c0fce09e9..3cd08dc391e7fdce918a024af4ceac3438408a0e 100644 (file)
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(Api, mc, "Logging specific to MC Facade APIs ");
 XBT_LOG_EXTERNAL_CATEGORY(mc_global);
 
-using Simcall = simgrid::simix::Simcall;
-
 namespace simgrid {
 namespace mc {
 
-/** Statically "upcast" a s_smx_actor_t into an ActorInformation
- *
- *  This gets 'actorInfo' from '&actorInfo->copy'. It upcasts in the
- *  sense that we could achieve the same thing by having ActorInformation
- *  inherit from s_smx_actor_t but we don't really want to do that.
- */
-static simgrid::mc::ActorInformation* actor_info_cast(smx_actor_t actor)
-{
-  simgrid::mc::ActorInformation temp;
-  std::size_t offset = (char*)temp.copy.get_buffer() - (char*)&temp;
-
-  auto* process_info = reinterpret_cast<simgrid::mc::ActorInformation*>((char*)actor - offset);
-  return process_info;
-}
-
-simgrid::mc::Exploration* Api::initialize(char** argv, simgrid::mc::CheckerAlgorithm algo)
+simgrid::mc::Exploration* Api::initialize(char** argv, simgrid::mc::ExplorationAlgorithm algo)
 {
   session_ = std::make_unique<simgrid::mc::Session>([argv] {
     int i = 1;
@@ -62,19 +45,19 @@ simgrid::mc::Exploration* Api::initialize(char** argv, simgrid::mc::CheckerAlgor
 
   simgrid::mc::Exploration* explo;
   switch (algo) {
-    case CheckerAlgorithm::CommDeterminism:
+    case ExplorationAlgorithm::CommDeterminism:
       explo = simgrid::mc::create_communication_determinism_checker(session_.get());
       break;
 
-    case CheckerAlgorithm::UDPOR:
+    case ExplorationAlgorithm::UDPOR:
       explo = simgrid::mc::create_udpor_checker(session_.get());
       break;
 
-    case CheckerAlgorithm::Safety:
+    case ExplorationAlgorithm::Safety:
       explo = simgrid::mc::create_safety_checker(session_.get());
       break;
 
-    case CheckerAlgorithm::Liveness:
+    case ExplorationAlgorithm::Liveness:
       explo = simgrid::mc::create_liveness_checker(session_.get());
       break;