Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Don't compute the dependencies locally in the checker, but through the observers...
[simgrid.git] / src / mc / api.hpp
index f3df834..500967a 100644 (file)
@@ -1,3 +1,8 @@
+/* Copyright (c) 2020-2022. 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_API_HPP
 #define SIMGRID_MC_API_HPP
 
@@ -50,10 +55,11 @@ private:
   simgrid::kernel::activity::CommImpl* get_comm_or_nullptr(smx_simcall_t const r) const;
   bool request_depend_asymmetric(smx_simcall_t r1, smx_simcall_t r2) const;
   simgrid::mc::ActorInformation* actor_info_cast(smx_actor_t actor) const;
+
+public:
   std::string get_actor_string(smx_actor_t actor) const;
   std::string get_actor_dot_label(smx_actor_t actor) const;
 
-public:
   // No copy:
   Api(Api const&) = delete;
   void operator=(Api const&) = delete;
@@ -78,7 +84,7 @@ public:
   unsigned long get_pattern_comm_src_proc(RemotePtr<kernel::activity::CommImpl> const& addr) const;
   unsigned long get_pattern_comm_dst_proc(RemotePtr<kernel::activity::CommImpl> const& addr) const;
   std::vector<char> get_pattern_comm_data(RemotePtr<kernel::activity::CommImpl> const& addr) const;
-  std::string get_actor_name(smx_actor_t actor) const;
+  xbt::string const& get_actor_name(smx_actor_t actor) const;
   xbt::string const& get_actor_host_name(smx_actor_t actor) const;
 #if HAVE_SMPI
   bool check_send_request_detached(smx_simcall_t const& simcall) const;
@@ -95,8 +101,6 @@ public:
   unsigned long mc_get_visited_states() const;
   unsigned long mc_get_executed_trans() const;
   void mc_check_deadlock() const;
-  bool mc_is_null() const;
-  Checker* mc_get_checker() const;
   void handle_simcall(Transition const& transition) const;
   void mc_wait_for_requests() const;
   XBT_ATTRIB_NORETURN void mc_exit(int status) const;
@@ -107,13 +111,13 @@ public:
   std::list<transition_detail_t> get_enabled_transitions(simgrid::mc::State* state) const;
 
   // SIMCALL APIs
+  bool requests_are_dependent(RemotePtr<kernel::actor::SimcallObserver> obs1,
+                              RemotePtr<kernel::actor::SimcallObserver> obs2) const;
   std::string request_to_string(smx_simcall_t req, int value) const;
   std::string request_get_dot_output(smx_simcall_t req, int value) const;
   smx_actor_t simcall_get_issuer(s_smx_simcall const* req) const;
-  long simcall_get_actor_id(s_smx_simcall const* req) const;
   RemotePtr<kernel::activity::MailboxImpl> get_mbox_remote_addr(smx_simcall_t const req) const;
   RemotePtr<kernel::activity::ActivityImpl> get_comm_remote_addr(smx_simcall_t const req) const;
-  bool simcall_check_dependency(smx_simcall_t const req1, smx_simcall_t const req2) const;
 
 #if HAVE_SMPI
   int get_smpi_request_tag(smx_simcall_t const& simcall, simgrid::simix::Simcall type) const;
@@ -129,7 +133,7 @@ public:
 
   // SESSION APIs
   void s_close() const;
-  void execute(Transition& transition, smx_simcall_t simcall) const;
+  RemotePtr<simgrid::kernel::actor::SimcallObserver> execute(Transition& transition, smx_simcall_t simcall) const;
 
 // AUTOMATION APIs
 #if SIMGRID_HAVE_MC