Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
CommDet shall become an extension of the SafetyChecker
[simgrid.git] / src / mc / checker / LivenessChecker.hpp
index 3ce6200..d2d34df 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2020. The SimGrid Team.
+/* Copyright (c) 2007-2022. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -7,8 +7,8 @@
 #ifndef SIMGRID_MC_LIVENESS_CHECKER_HPP
 #define SIMGRID_MC_LIVENESS_CHECKER_HPP
 
+#include "src/mc/api/State.hpp"
 #include "src/mc/checker/Checker.hpp"
-#include "src/mc/mc_state.hpp"
 #include "xbt/automaton.hpp"
 
 #include <list>
@@ -30,7 +30,6 @@ public:
   bool exploration_started = false;
 
   explicit Pair(unsigned long expanded_pairs);
-  ~Pair() = default;
 
   Pair(Pair const&) = delete;
   Pair& operator=(Pair const&) = delete;
@@ -48,20 +47,18 @@ public:
 
   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;
 };
 
 class XBT_PRIVATE LivenessChecker : public Checker {
 public:
-  explicit LivenessChecker(Session& session);
-  ~LivenessChecker() = default;
+  explicit LivenessChecker(Session* session);
   void run() override;
   RecordTrace get_record_trace() override;
   std::vector<std::string> get_textual_trace() override;
   void log_state() override;
 
 private:
-  std::shared_ptr<const std::vector<int>> get_proposition_values();
+  std::shared_ptr<const std::vector<int>> get_proposition_values() const;
   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);
@@ -78,7 +75,6 @@ private:
   std::list<std::shared_ptr<VisitedPair>> visited_pairs_;
   unsigned long visited_pairs_count_   = 0;
   unsigned long expanded_pairs_count_  = 0;
-  unsigned long expanded_states_count_ = 0;
   int previous_pair_                   = 0;
   std::string previous_request_;
 };