rootNode = new TreeNode(NULL);
currentNode = rootNode;
+ action_trace = new std::list<class ModelAction *>();
}
ModelChecker::~ModelChecker()
{
+ delete action_trace;
delete this->scheduler;
delete rootNode;
}
break;
}
std::list<class ModelAction *>::reverse_iterator rit;
- for (rit = action_trace.rbegin(); rit != action_trace.rend(); rit++) {
+ for (rit = action_trace->rbegin(); rit != action_trace->rend(); rit++) {
ModelAction *prev = *rit;
if (prev->get_location() != loc)
continue;
next->set_node(currentNode);
set_backtracking(next);
currentNode = currentNode->exploreChild(next->get_tid());
- this->action_trace.push_back(next);
+ this->action_trace->push_back(next);
}
void ModelChecker::print_trace(void)
printf("---------------------------------------------------------------------\n");
printf("Total nodes created: %d\n\n", TreeNode::getTotalNodes());
- for (it = action_trace.begin(); it != action_trace.end(); it++) {
+ for (it = action_trace->begin(); it != action_trace->end(); it++) {
DBG();
(*it)->print();
}
private:
int used_thread_id;
class ModelAction *current_action;
- std::list<class ModelAction *> action_trace;
+ std::list<class ModelAction *> *action_trace;
std::map<thread_id_t, class Thread *> thread_map;
class TreeNode *rootNode, *currentNode;
};