Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Use std::shared_ptr for State in LivenessChecker
[simgrid.git] / src / mc / LivenessChecker.hpp
index d5cd324f064db162649f1b6e920c7edad7fc3282..6b2fcbbef654adf2dd9a43295c8d7abbe4d58f6f 100644 (file)
@@ -32,13 +32,12 @@ extern XBT_PRIVATE xbt_automaton_t property_automaton;
 struct XBT_PRIVATE Pair {
   int num = 0;
   int search_cycle = 0;
-  simgrid::mc::State* graph_state = nullptr; /* System state included */
+  std::shared_ptr<simgrid::mc::State> graph_state = nullptr; /* System state included */
   xbt_automaton_state_t automaton_state = nullptr;
   simgrid::xbt::unique_ptr<s_xbt_dynar_t> atomic_propositions;
   int requests = 0;
   int depth = 0;
   int exploration_started = 0;
-  int visited_pair_removed = 0;
 
   Pair();
   ~Pair();
@@ -51,7 +50,7 @@ struct XBT_PRIVATE VisitedPair {
   int num = 0;
   int other_num = 0; /* Dot output for */
   int acceptance_pair = 0;
-  simgrid::mc::State* graph_state = nullptr; /* System state included */
+  std::shared_ptr<simgrid::mc::State> graph_state = nullptr; /* System state included */
   xbt_automaton_state_t automaton_state = nullptr;
   simgrid::xbt::unique_ptr<s_xbt_dynar_t> atomic_propositions;
   std::size_t heap_bytes_used = 0;
@@ -59,7 +58,10 @@ struct XBT_PRIVATE VisitedPair {
   int acceptance_removed = 0;
   int visited_removed = 0;
 
-  VisitedPair(int pair_num, xbt_automaton_state_t automaton_state, xbt_dynar_t atomic_propositions, simgrid::mc::State* graph_state);
+  VisitedPair(
+    int pair_num, xbt_automaton_state_t automaton_state,
+    xbt_dynar_t atomic_propositions,
+    std::shared_ptr<simgrid::mc::State> graph_state);
   ~VisitedPair();
 };