model(m),
params(params),
scheduler(scheduler),
- action_trace(new action_list_t()),
+ action_trace(),
thread_map(),
obj_map(new HashTable<const void *, action_list_t *, uintptr_t, 4>()),
condvar_waiters_map(),
delete thread_map.get(i);
delete obj_map;
- delete action_trace;
for (unsigned int i = 0; i < promises.size(); i++)
delete promises[i];
return NULL;
/* Skip past the release */
- const action_list_t *list = action_trace;
+ const action_list_t *list = &action_trace;
action_list_t::const_reverse_iterator rit;
for (rit = list->rbegin(); rit != list->rend(); rit++)
if (*rit == last_release)
*/
bool updated = false;
if (curr->is_acquire()) {
- action_list_t *list = action_trace;
+ action_list_t *list = &action_trace;
action_list_t::reverse_iterator rit;
/* Find X : is_read(X) && X --sb-> curr */
for (rit = list->rbegin(); rit != list->rend(); rit++) {
work_queue->push_back(MOEdgeWorkEntry(acquire));
/* propagate synchronization to later actions */
- action_list_t::reverse_iterator rit = action_trace->rbegin();
+ action_list_t::reverse_iterator rit = action_trace.rbegin();
for (; (*rit) != acquire; rit++) {
ModelAction *propagate = *rit;
if (acquire->happens_before(propagate)) {
work_queue->push_back(MOEdgeWorkEntry(acquire));
/* propagate synchronization to later actions */
- action_list_t::reverse_iterator rit = action_trace->rbegin();
+ action_list_t::reverse_iterator rit = action_trace.rbegin();
for (; (*rit) != acquire; rit++) {
ModelAction *propagate = *rit;
if (acquire->happens_before(propagate)) {
}
list->push_back(act);
- action_trace->push_back(act);
+ action_trace.push_back(act);
if (uninit)
- action_trace->push_front(uninit);
+ action_trace.push_front(uninit);
SnapVector<action_list_t> *vec = get_safe_ptr_vect_action(&obj_thrd_map, act->get_location());
if (tid >= (int)vec->size())
mo_graph->dumpNodes(file);
ModelAction **thread_array = (ModelAction **)model_calloc(1, sizeof(ModelAction *) * get_num_threads());
- for (action_list_t::iterator it = action_trace->begin(); it != action_trace->end(); it++) {
+ for (action_list_t::iterator it = action_trace.begin(); it != action_trace.end(); it++) {
ModelAction *act = *it;
if (act->is_read()) {
mo_graph->dot_print_node(file, act);
model_print("\n");
} else
print_infeasibility(" INFEASIBLE");
- print_list(action_trace);
+ print_list(&action_trace);
model_print("\n");
if (!promises.empty()) {
model_print("Pending promises:\n");
ModelAction * get_next_backtrack();
- action_list_t * get_action_trace() const { return action_trace; }
+ action_list_t * get_action_trace() { return &action_trace; }
SNAPSHOTALLOC
private:
ModelAction * get_uninitialized_action(const ModelAction *curr) const;
- action_list_t * const action_trace;
+ action_list_t action_trace;
HashTable<int, Thread *, int> thread_map;
/** Per-object list of actions. Maps an object (i.e., memory location)