/** @brief Prints info about may_read_from set */
void Node::print_may_read_from()
{
- readfrom_set_t::iterator it;
- for (it = may_read_from.begin(); it != may_read_from.end(); it++)
- (*it)->print();
+ for (unsigned int i = 0; i < may_read_from.size(); i++)
+ may_read_from[i]->print();
}
/**
return ((future_index+1)>=future_values.size());
}
-
/**
* Checks if the Thread associated with this thread ID has been explored from
* this Node already.
return (numBacktracks == 0);
}
-
/**
* Checks whether the readsfrom set for this node is empty.
* @return true if the readsfrom set is empty.
return ((read_from_index+1)>=may_read_from.size());
}
-
-
/**
* Mark the appropriate backtracking information for exploring a thread choice.
* @param act The ModelAction to explore
* where this->action is a 'read'.
* @return The first element in future_values
*/
-
uint64_t Node::get_future_value() {
ASSERT(future_index<future_values.size());
return future_values[future_index];
/**
* Gets the next 'may_read_from' action from this Node. Only valid for a node
* where this->action is a 'read'.
- * @todo Perform reads_from backtracking/replay properly, so that this function
- * may remove elements from may_read_from
* @return The first element in may_read_from
*/
const ModelAction * Node::get_read_from() {