std::unique_ptr<RemoteProcess> remote_process_;
Exploration* exploration_ = nullptr;
- unsigned long visited_states_ = 0;
-
public:
ModelChecker(ModelChecker const&) = delete;
ModelChecker& operator=(ModelChecker const&) = delete;
Exploration* get_exploration() const { return exploration_; }
void set_exploration(Exploration* exploration) { exploration_ = exploration; }
- unsigned long get_visited_states() const { return visited_states_; }
- void inc_visited_states() { visited_states_++; }
-
private:
void setup_ignore();
bool handle_message(const char* buffer, ssize_t size);
on_log_state_signal(get_remote_app());
XBT_INFO("DFS exploration ended. %ld unique states visited; %ld backtracks (%lu transition replays, %lu states "
"visited overall)",
- State::get_expanded_states(), backtrack_count_, mc_model_checker->get_visited_states(),
+ State::get_expanded_states(), backtrack_count_, visited_states_count_,
Transition::get_replayed_transitions());
+ Exploration::log_state();
}
void DFSExplorer::run()
XBT_DEBUG("Exploration depth=%zu (state:#%ld; %zu interleaves todo)", stack_.size(), state->get_num(),
state->count_todo());
- mc_model_checker->inc_visited_states();
+ visited_states_count_++;
// Backtrack if we reached the maximum depth
if (stack_.size() > (std::size_t)_sg_mc_max_depth) {
break;
state->get_transition()->replay();
on_transition_replay_signal(state->get_transition(), get_remote_app());
- /* Update statistics */
- mc_model_checker->inc_visited_states();
+ visited_states_count_++;
}
} // If no backtracing point, then the stack is empty and the exploration is over
}
XBT_DECLARE_ENUM_CLASS(ReductionMode, none, dpor);
ReductionMode reduction_mode_;
- long backtrack_count_ = 0;
+ unsigned long backtrack_count_ = 0; // for statistics
+ unsigned long visited_states_count_ = 0; // for statistics
static xbt::signal<void(RemoteApp&)> on_exploration_start_signal;
static xbt::signal<void(RemoteApp&)> on_backtracking_signal;