if (next == diverge) {
Node *nextnode = next->get_node();
/* Reached divergence point */
- if (nextnode->increment_promises()) {
+ if (nextnode->increment_promise()) {
/* The next node will try to satisfy a different set of promises. */
tid = next->get_tid();
node_stack->pop_restofstack(2);
/* The next node will read from a different value. */
tid = next->get_tid();
node_stack->pop_restofstack(2);
- } else if (nextnode->increment_future_values()) {
+ } else if (nextnode->increment_future_value()) {
/* The next node will try to read from a different future value. */
tid = next->get_tid();
node_stack->pop_restofstack(2);
Node *currnode = curr->get_node();
Node *parnode = currnode->get_parent();
- if (!parnode->backtrack_empty()||!currnode->readsfrom_empty()||!currnode->futurevalues_empty()||!currnode->promises_empty())
+ if (!parnode->backtrack_empty()||!currnode->read_from_empty()||!currnode->future_value_empty()||!currnode->promise_empty())
if (!next_backtrack || *curr > *next_backtrack)
next_backtrack = curr;
return (promises[i]==2);
}
-bool Node::increment_promises() {
+bool Node::increment_promise() {
for (unsigned int i=0;i<promises.size();i++) {
if (promises[i]==1) {
promises[i]=2;
return false;
}
-bool Node::promises_empty() {
+bool Node::promise_empty() {
for (unsigned int i=0;i<promises.size();i++)
if (promises[i]==1)
return false;
* @return true if the future_values set is empty.
*/
-bool Node::futurevalues_empty() {
+bool Node::future_value_empty() {
return ((future_index+1)>=future_values.size());
}
* Checks whether the readsfrom set for this node is empty.
* @return true if the readsfrom set is empty.
*/
-bool Node::readsfrom_empty() {
+bool Node::read_from_empty() {
return ((read_from_index+1)>=may_read_from.size());
}
* @return Returns false if we have explored all values.
*/
-bool Node::increment_future_values() {
+bool Node::increment_future_value() {
future_index++;
return (future_index<future_values.size());
}
bool add_future_value(uint64_t value);
uint64_t get_future_value();
- bool increment_future_values();
- bool futurevalues_empty();
+ bool increment_future_value();
+ bool future_value_empty();
void add_read_from(const ModelAction *act);
const ModelAction * get_read_from();
bool increment_read_from();
- bool readsfrom_empty();
+ bool read_from_empty();
void set_promise(uint32_t i);
bool get_promise(uint32_t i);
- bool increment_promises();
- bool promises_empty();
+ bool increment_promise();
+ bool promise_empty();
void print();
void print_may_read_from();