delete rootNode;
}
+void ModelChecker::reset_to_initial_state()
+{
+ DEBUG("+++ Resetting to initial state +++\n");
+ std::map<thread_id_t, class Thread *>::iterator it;
+ for (it = thread_map.begin(); it != thread_map.end(); it++) {
+ delete (*it).second;
+ }
+ thread_map.clear();
+ action_trace = new action_list_t();
+ currentNode = rootNode;
+ current_action = NULL;
+ used_thread_id = 1; // ?
+ /* scheduler reset ? */
+}
+
int ModelChecker::get_next_id()
{
return ++used_thread_id;
backtrack_list.push_back(back);
}
+Backtrack * ModelChecker::get_next_backtrack()
+{
+ Backtrack *next;
+ if (backtrack_list.empty())
+ return NULL;
+ next = backtrack_list.back();
+ backtrack_list.pop_back();
+ return next;
+}
+
void ModelChecker::check_current_action(void)
{
ModelAction *next = this->current_action;
void set_backtracking(ModelAction *act);
thread_id_t advance_backtracking_state();
thread_id_t get_next_replay_thread();
+ Backtrack * get_next_backtrack();
+ void reset_to_initial_state();
class ModelAction *current_action;
Backtrack *exploring;