action_trace(new action_list_t()),
thread_map(new std::map<int, class Thread *>),
obj_thrd_map(new std::map<void *, std::vector<action_list_t> >()),
+ thrd_last_action(new std::vector<ModelAction *>(1)),
node_stack(new NodeStack()),
next_backtrack(NULL)
{
delete obj_thrd_map;
delete action_trace;
+ delete thrd_last_action;
delete node_stack;
delete scheduler;
}
return;
}
- curr = node_stack->explore_action(curr);
+ curr = node_stack->explore_action(curr, NULL);
nextThread = get_next_replay_thread();
currnode = curr->get_node();
if (id_to_int(curr->get_tid()) >= (int)vec->size())
vec->resize(next_thread_id);
(*vec)[id_to_int(curr->get_tid())].push_back(curr);
+
+ (*thrd_last_action)[id_to_int(curr->get_tid())] = curr;
+}
+
+ModelAction * ModelChecker::get_last_action(thread_id_t tid)
+{
+ int nthreads = get_num_threads();
+ if ((int)thrd_last_action->size() < nthreads)
+ thrd_last_action->resize(nthreads);
+ return (*thrd_last_action)[id_to_int(tid)];
}
void ModelChecker::print_summary(void)