Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
namespacing cosmetics
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 21 Apr 2020 12:42:58 +0000 (14:42 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Sat, 25 Apr 2020 17:02:59 +0000 (19:02 +0200)
include/simgrid/kernel/routing/NetPoint.hpp
src/mc/checker/Checker.hpp
src/mc/checker/CommunicationDeterminismChecker.hpp
src/mc/checker/LivenessChecker.hpp
src/mc/checker/SafetyChecker.hpp
src/mc/inspect/DwarfExpression.hpp
src/mc/remote/Channel.hpp
src/mc/remote/Client.hpp
src/mc/remote/RemoteClient.hpp
src/mc/remote/RemotePtr.hpp
src/mc/sosp/Snapshot.hpp

index 39b74e3..f73bfd5 100644 (file)
@@ -24,7 +24,7 @@ namespace routing {
  *
  * @details This represents a position in the network. One can send information between two netpoints
  */
-class NetPoint : public simgrid::xbt::Extendable<NetPoint> {
+class NetPoint : public xbt::Extendable<NetPoint> {
 public:
   enum class Type { Host, Router, NetZone };
 
@@ -42,7 +42,7 @@ public:
   bool is_host() const { return component_type_ == Type::Host; }
   bool is_router() const { return component_type_ == Type::Router; }
 
-  static simgrid::xbt::signal<void(NetPoint&)> on_creation;
+  static xbt::signal<void(NetPoint&)> on_creation;
 
   bool operator<(const NetPoint& rhs) const { return name_ < rhs.name_; }
 
index c9ff833..070a779 100644 (file)
@@ -65,7 +65,8 @@ protected:
 XBT_PUBLIC Checker* createLivenessChecker(Session& session);
 XBT_PUBLIC Checker* createSafetyChecker(Session& session);
 XBT_PUBLIC Checker* createCommunicationDeterminismChecker(Session& session);
-}
-}
+
+} // namespace mc
+} // namespace simgrid
 
 #endif
index 1701a28..c692e2c 100644 (file)
@@ -28,19 +28,18 @@ private:
   void prepare();
   void real_run();
   void log_state() override;
-  void deterministic_comm_pattern(int process, const simgrid::mc::PatternCommunication* comm, int backtracking);
+  void deterministic_comm_pattern(int process, const PatternCommunication* comm, int backtracking);
   void restoreState();
 
 public:
   // These are used by functions which should be moved in CommunicationDeterminismChecker:
   void get_comm_pattern(smx_simcall_t request, e_mc_call_type_t call_type, int backtracking);
-  void complete_comm_pattern(simgrid::mc::RemotePtr<simgrid::kernel::activity::CommImpl> comm_addr, unsigned int issuer,
-                             int backtracking);
+  void complete_comm_pattern(RemotePtr<kernel::activity::CommImpl> comm_addr, unsigned int issuer, int backtracking);
 
 private:
   /** Stack representing the position in the exploration graph */
-  std::list<std::unique_ptr<simgrid::mc::State>> stack_;
-  simgrid::mc::VisitedStates visited_states_;
+  std::list<std::unique_ptr<State>> stack_;
+  VisitedStates visited_states_;
   unsigned long expanded_states_count_ = 0;
 
   bool initial_communications_pattern_done = false;
@@ -49,8 +48,8 @@ private:
   char *send_diff = nullptr;
   char *recv_diff = nullptr;
 };
+} // namespace mc
+} // namespace simgrid
 
 #endif
 
-}
-}
index 678e0ee..3ce6200 100644 (file)
@@ -22,7 +22,7 @@ class XBT_PRIVATE Pair {
 public:
   int num = 0;
   bool search_cycle = false;
-  std::shared_ptr<simgrid::mc::State> graph_state = nullptr; /* System state included */
+  std::shared_ptr<State> graph_state    = nullptr; /* System state included */
   xbt_automaton_state_t automaton_state = nullptr;
   std::shared_ptr<const std::vector<int>> atomic_propositions;
   int requests = 0;
@@ -40,16 +40,14 @@ class XBT_PRIVATE VisitedPair {
 public:
   int num;
   int other_num = 0; /* Dot output for */
-  std::shared_ptr<simgrid::mc::State> graph_state = nullptr; /* System state included */
+  std::shared_ptr<State> graph_state = nullptr; /* System state included */
   xbt_automaton_state_t automaton_state;
   std::shared_ptr<const std::vector<int>> atomic_propositions;
   std::size_t heap_bytes_used = 0;
   int actors_count            = 0;
 
-  VisitedPair(
-    int pair_num, xbt_automaton_state_t automaton_state,
-    std::shared_ptr<const std::vector<int>> atomic_propositions,
-    std::shared_ptr<simgrid::mc::State> graph_state);
+  VisitedPair(int pair_num, xbt_automaton_state_t automaton_state,
+              std::shared_ptr<const std::vector<int>> atomic_propositions, std::shared_ptr<State> graph_state);
   ~VisitedPair() = default;
 };
 
@@ -64,8 +62,8 @@ public:
 
 private:
   std::shared_ptr<const std::vector<int>> get_proposition_values();
-  std::shared_ptr<VisitedPair> insert_acceptance_pair(simgrid::mc::Pair* pair);
-  int insert_visited_pair(std::shared_ptr<VisitedPair> visited_pair, simgrid::mc::Pair* pair);
+  std::shared_ptr<VisitedPair> insert_acceptance_pair(Pair* pair);
+  int insert_visited_pair(std::shared_ptr<VisitedPair> visited_pair, Pair* pair);
   void show_acceptance_cycle(std::size_t depth);
   void replay();
   void remove_acceptance_pair(int pair_num);
@@ -85,7 +83,7 @@ private:
   std::string previous_request_;
 };
 
-}
-}
+} // namespace mc
+} // namespace simgrid
 
 #endif
index ec6ba66..0167dda 100644 (file)
@@ -20,7 +20,8 @@ namespace simgrid {
 namespace mc {
 
 class XBT_PRIVATE SafetyChecker : public Checker {
-  simgrid::mc::ReductionMode reductionMode_ = simgrid::mc::ReductionMode::unset;
+  ReductionMode reductionMode_ = ReductionMode::unset;
+
 public:
   explicit SafetyChecker(Session& session);
   ~SafetyChecker() = default;
@@ -35,13 +36,13 @@ private:
   void restore_state();
 
   /** Stack representing the position in the exploration graph */
-  std::list<std::unique_ptr<simgrid::mc::State>> stack_;
-  simgrid::mc::VisitedStates visited_states_;
-  std::unique_ptr<simgrid::mc::VisitedState> visited_state_;
+  std::list<std::unique_ptr<State>> stack_;
+  VisitedStates visited_states_;
+  std::unique_ptr<VisitedState> visited_state_;
   unsigned long expanded_states_count_ = 0;
 };
 
-}
-}
+} // namespace mc
+} // namespace simgrid
 
 #endif
index 811bbb0..c2058a9 100644 (file)
@@ -44,10 +44,10 @@ typedef std::vector<Dwarf_Op> DwarfExpression;
  */
 struct ExpressionContext {
   /** CPU state (registers) */
-  unw_cursor_t* cursor                           = nullptr;
-  void* frame_base                               = nullptr;
-  const simgrid::mc::AddressSpace* address_space = nullptr; /** Address space used to read memory */
-  simgrid::mc::ObjectInformation* object_info    = nullptr;
+  unw_cursor_t* cursor                  = nullptr;
+  void* frame_base                      = nullptr;
+  const mc::AddressSpace* address_space = nullptr; /** Address space used to read memory */
+  mc::ObjectInformation* object_info    = nullptr;
 };
 
 /** When an error happens in the execution of a DWARF expression */
index 5494f33..30161b5 100644 (file)
@@ -55,7 +55,7 @@ public:
 
   int get_socket() const { return socket_; }
 };
-}
-}
+} // namespace mc
+} // namespace simgrid
 
 #endif
index d6b7fd6..11cf82a 100644 (file)
@@ -51,7 +51,7 @@ public:
   static Client* initialize();
   static Client* get() { return instance_.get(); }
 };
-}
-}
+} // namespace mc
+} // namespace simgrid
 
 #endif
index 6f0a1bd..6a2349b 100644 (file)
@@ -20,8 +20,8 @@ namespace mc {
 class ActorInformation {
 public:
   /** MCed address of the process */
-  RemotePtr<simgrid::kernel::actor::ActorImpl> address{nullptr};
-  Remote<simgrid::kernel::actor::ActorImpl> copy;
+  RemotePtr<kernel::actor::ActorImpl> address{nullptr};
+  Remote<kernel::actor::ActorImpl> copy;
 
   /** Hostname (owned by `mc_modelchecker->hostnames`) */
   const char* hostname = nullptr;
@@ -105,11 +105,11 @@ public:
   void clear_bytes(RemotePtr<void> address, size_t len);
 
   // Debug information:
-  std::shared_ptr<simgrid::mc::ObjectInformation> find_object_info(RemotePtr<void> addr) const;
-  std::shared_ptr<simgrid::mc::ObjectInformation> find_object_info_exec(RemotePtr<void> addr) const;
-  std::shared_ptr<simgrid::mc::ObjectInformation> find_object_info_rw(RemotePtr<void> addr) const;
-  simgrid::mc::Frame* find_function(RemotePtr<void> ip) const;
-  const simgrid::mc::Variable* find_variable(const char* name) const;
+  std::shared_ptr<ObjectInformation> find_object_info(RemotePtr<void> addr) const;
+  std::shared_ptr<ObjectInformation> find_object_info_exec(RemotePtr<void> addr) const;
+  std::shared_ptr<ObjectInformation> find_object_info_rw(RemotePtr<void> addr) const;
+  Frame* find_function(RemotePtr<void> ip) const;
+  const Variable* find_variable(const char* name) const;
 
   // Heap access:
   xbt_mheap_t get_heap()
@@ -146,7 +146,7 @@ public:
 
   void ignore_global_variable(const char* name)
   {
-    for (std::shared_ptr<simgrid::mc::ObjectInformation> const& info : this->object_infos)
+    for (std::shared_ptr<ObjectInformation> const& info : this->object_infos)
       info->remove_global_variable(name);
   }
 
@@ -158,11 +158,11 @@ public:
   void unignore_heap(void* address, size_t size);
 
   void ignore_local_variable(const char* var_name, const char* frame_name);
-  std::vector<simgrid::mc::ActorInformation>& actors();
-  std::vector<simgrid::mc::ActorInformation>& dead_actors();
+  std::vector<ActorInformation>& actors();
+  std::vector<ActorInformation>& dead_actors();
 
   /** Get a local description of a remote SIMIX actor */
-  simgrid::mc::ActorInformation* resolve_actor_info(simgrid::mc::RemotePtr<simgrid::kernel::actor::ActorImpl> actor)
+  ActorInformation* resolve_actor_info(RemotePtr<kernel::actor::ActorImpl> actor)
   {
     xbt_assert(mc_model_checker != nullptr);
     if (not actor)
@@ -178,9 +178,9 @@ public:
   }
 
   /** Get a local copy of the SIMIX actor structure */
-  simgrid::kernel::actor::ActorImpl* resolve_actor(simgrid::mc::RemotePtr<simgrid::kernel::actor::ActorImpl> process)
+  kernel::actor::ActorImpl* resolve_actor(RemotePtr<kernel::actor::ActorImpl> process)
   {
-    simgrid::mc::ActorInformation* actor_info = this->resolve_actor_info(process);
+    ActorInformation* actor_info = this->resolve_actor_info(process);
     if (actor_info)
       return actor_info->copy.get_buffer();
     else
@@ -198,7 +198,7 @@ private:
   pid_t pid_ = -1;
   Channel channel_;
   bool running_ = false;
-  std::vector<simgrid::xbt::VmMap> memory_map_;
+  std::vector<xbt::VmMap> memory_map_;
   RemotePtr<void> maestro_stack_start_;
   RemotePtr<void> maestro_stack_end_;
   int memory_file = -1;
@@ -209,9 +209,9 @@ private:
 public:
   // object info
   // TODO, make private (first, objectify simgrid::mc::ObjectInformation*)
-  std::vector<std::shared_ptr<simgrid::mc::ObjectInformation>> object_infos;
-  std::shared_ptr<simgrid::mc::ObjectInformation> libsimgrid_info;
-  std::shared_ptr<simgrid::mc::ObjectInformation> binary_info;
+  std::vector<std::shared_ptr<ObjectInformation>> object_infos;
+  std::shared_ptr<ObjectInformation> libsimgrid_info;
+  std::shared_ptr<ObjectInformation> binary_info;
 
   // Copies of MCed SMX data structures
   /** Copy of `simix_global->process_list`
@@ -278,7 +278,7 @@ public:
 /** Open a FD to a remote process memory (`/dev/$pid/mem`)
  */
 XBT_PRIVATE int open_vm(pid_t pid, int flags);
-}
-}
+} // namespace mc
+} // namespace simgrid
 
 #endif
index e3f0371..d4c7bca 100644 (file)
@@ -135,7 +135,7 @@ template <class T = void> inline RemotePtr<T> remote(uint64_t p)
 {
   return RemotePtr<T>(p);
 }
-}
-}
+} // namespace mc
+} // namespace simgrid
 
 #endif
index 5b8bb66..233297d 100644 (file)
@@ -89,8 +89,8 @@ public:
 
 private:
   void add_region(RegionType type, ObjectInformation* object_info, void* start_addr, std::size_t size);
-  void snapshot_regions(simgrid::mc::RemoteClient* process);
-  void snapshot_stacks(simgrid::mc::RemoteClient* process);
+  void snapshot_regions(RemoteClient* process);
+  void snapshot_stacks(RemoteClient* process);
 };
 } // namespace mc
 } // namespace simgrid