#include "action.h"
#include "common.h"
#include "model.h"
+#include "threads.h"
/**
* @brief Node constructor
return thread_id < num_threads && enabled_array[thread_id];
}
+bool Node::has_priority(thread_id_t tid)
+{
+ return fairness[id_to_int(tid)].priority;
+}
+
/**
* Add an action to the may_read_from set.
* @param act is the action to add
explored_children[i] = true;
}
-NodeStack::NodeStack()
- : total_nodes(0)
+NodeStack::NodeStack() :
+ node_list(1, new Node()),
+ iter(0),
+ total_nodes(0)
{
- node_list.push_back(new Node());
total_nodes++;
- iter = 0;
}
NodeStack::~NodeStack()
{
+ for (unsigned int i = 0; i < node_list.size(); i++)
+ delete node_list[i];
}
void NodeStack::print()
{
/* Diverging from previous execution; clear out remainder of list */
unsigned int it=iter+numAhead;
- for(unsigned i=it;i<node_list.size();i++)
+ for(unsigned int i=it;i<node_list.size();i++)
delete node_list[i];
node_list.resize(it);
}