X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=nodestack.cc;h=02f5a89ef17fa320a4fed704e95a924fba0b5132;hb=0174d94668ca990b0d8258b1ed5b2611874cffe9;hp=77e24398931a0a2ee3d9e7bb662813ae4f3f7231;hpb=8dcdd425a04e56cb0a41b6fff18c044118ffed62;p=c11tester.git diff --git a/nodestack.cc b/nodestack.cc index 77e24398..02f5a89e 100644 --- a/nodestack.cc +++ b/nodestack.cc @@ -57,33 +57,29 @@ void Node::print_may_read_from() (*it)->print(); } -/** This method sets a promise to explore meeting with the given - * node. - * @param i is the promise index. +/** + * Sets a promise to explore meeting with the given node. + * @param i is the promise index. */ - void Node::set_promise(uint32_t i) { if (i>=promises.size()) promises.resize(i+1,0); promises[i]=1; } -/** This method looks up whether a given promise should be satisfied - * by this node. - * - * @param i is the promise index. +/** + * Looks up whether a given promise should be satisfied by this node. + * @param i The promise index. * @return true if the promise should be satisfied by the given model action. */ - bool Node::get_promise(uint32_t i) { return (i=future_values.size()); } - /** * Checks if the Thread associated with this thread ID has been explored from * this Node already. @@ -157,7 +149,6 @@ bool Node::backtrack_empty() return (numBacktracks == 0); } - /** * Checks whether the readsfrom set for this node is empty. * @return true if the readsfrom set is empty. @@ -166,8 +157,6 @@ bool Node::read_from_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 @@ -228,7 +217,6 @@ void Node::add_read_from(const ModelAction *act) * where this->action is a 'read'. * @return The first element in future_values */ - uint64_t Node::get_future_value() { ASSERT(future_indexaction 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() { @@ -261,7 +247,6 @@ bool Node::increment_read_from() { * Increments the index into the future_values set to explore the next item. * @return Returns false if we have explored all values. */ - bool Node::increment_future_value() { future_index++; return (future_index