A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[mc] Move mc_stats.expanded_states into the Checkers
[simgrid.git]
/
src
/
mc
/
SafetyChecker.hpp
diff --git
a/src/mc/SafetyChecker.hpp
b/src/mc/SafetyChecker.hpp
index
1435182
..
71b5f67
100644
(file)
--- a/
src/mc/SafetyChecker.hpp
+++ b/
src/mc/SafetyChecker.hpp
@@
-8,6
+8,9
@@
#define SIMGRID_MC_SAFETY_CHECKER_HPP
#include <list>
#define SIMGRID_MC_SAFETY_CHECKER_HPP
#include <list>
+#include <memory>
+#include <string>
+#include <vector>
#include "src/mc/mc_forward.hpp"
#include "src/mc/Checker.hpp"
#include "src/mc/mc_forward.hpp"
#include "src/mc/Checker.hpp"
@@
-16,7
+19,7
@@
namespace simgrid {
namespace mc {
namespace simgrid {
namespace mc {
-class SafetyChecker : public Checker {
+class
XBT_PRIVATE
SafetyChecker : public Checker {
simgrid::mc::ReductionMode reductionMode_ = simgrid::mc::ReductionMode::unset;
public:
SafetyChecker(Session& session);
simgrid::mc::ReductionMode reductionMode_ = simgrid::mc::ReductionMode::unset;
public:
SafetyChecker(Session& session);
@@
-24,14
+27,18
@@
public:
int run() override;
RecordTrace getRecordTrace() override;
std::vector<std::string> getTextualTrace() override;
int run() override;
RecordTrace getRecordTrace() override;
std::vector<std::string> getTextualTrace() override;
+ void logState() override;
private:
// Temp
void init();
private:
// Temp
void init();
- bool checkNonDeterminism(simgrid::mc::State* current_state);
+ bool checkNonTermination(simgrid::mc::State* current_state);
+ int backtrack();
private:
/** Stack representing the position in the exploration graph */
private:
/** Stack representing the position in the exploration graph */
- std::list<s
imgrid::mc::State*
> stack_;
+ std::list<s
td::unique_ptr<simgrid::mc::State>
> stack_;
simgrid::mc::VisitedStates visitedStates_;
simgrid::mc::VisitedStates visitedStates_;
+ std::unique_ptr<simgrid::mc::VisitedState> visitedState_;
+ unsigned long expandedStatesCount_ = 0;
};
}
};
}