From: Brian Demsky Date: Fri, 27 Jul 2012 08:19:07 +0000 (-0700) Subject: standardize names a little X-Git-Tag: pldi2013~304 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=model-checker.git;a=commitdiff_plain;h=9c24e6ba4e89dfc1a6f0f23908510a3c1224b8d0 standardize names a little --- diff --git a/model.cc b/model.cc index 159dd70..4c67b5a 100644 --- a/model.cc +++ b/model.cc @@ -133,7 +133,7 @@ thread_id_t ModelChecker::get_next_replay_thread() 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); @@ -141,7 +141,7 @@ thread_id_t ModelChecker::get_next_replay_thread() /* 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); @@ -354,7 +354,7 @@ void ModelChecker::check_current_action(void) 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; diff --git a/nodestack.cc b/nodestack.cc index 4a6a26d..4ece182 100644 --- a/nodestack.cc +++ b/nodestack.cc @@ -67,7 +67,7 @@ bool Node::get_promise(uint32_t i) { return (promises[i]==2); } -bool Node::increment_promises() { +bool Node::increment_promise() { for (unsigned int i=0;i=future_values.size()); } @@ -140,7 +140,7 @@ bool Node::backtrack_empty() * 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()); } @@ -240,7 +240,7 @@ bool Node::increment_read_from() { * @return Returns false if we have explored all values. */ -bool Node::increment_future_values() { +bool Node::increment_future_value() { future_index++; return (future_index