Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of framagit.org:simgrid/simgrid
[simgrid.git] / src / mc / api.hpp
index 133107965de9948d60a41da5e6b384908cebd82a..55ecf6eeb9e3993fd370645b710a12c1f1743935 100644 (file)
 namespace simgrid {
 namespace mc {
 
+/**
+ * @brief Maintains the transition's information.
+ */
+struct s_udpor_transition {
+  simgrid::simix::Simcall call_ = simgrid::simix::Simcall::NONE;
+  long issuer_id                = -1;
+  RemotePtr<kernel::activity::MailboxImpl> mbox_remote_addr {}; // used to represent mailbox remote address for isend and ireceive transitions
+  RemotePtr<kernel::activity::ActivityImpl> comm_remote_addr {}; // the communication this transition concerns (to be used only for isend, ireceive, wait and test)
+};
+
+typedef std::unique_ptr<s_udpor_transition> udpor_transition_t;
+
 /*
 ** This class aimes to implement FACADE APIs for simgrid. The FACADE layer sits between the CheckerSide
 ** (Unfolding_Checker, DPOR, ...) layer and the
@@ -92,6 +104,9 @@ public:
   void dump_record_path() const;
   smx_simcall_t mc_state_choose_request(simgrid::mc::State* state) const;
 
+  // UDPOR APIs
+  std::list<udpor_transition_t> get_enabled_transitions(simgrid::mc::State* state);
+
   // SIMCALL APIs
   std::string request_to_string(smx_simcall_t req, int value, RequestType request_type) const;
   std::string request_get_dot_output(smx_simcall_t req, int value) const;