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;
set_backtracking(curr);
}
-/** @returns whether the current trace is feasible. */
+/** @returns whether the current partial trace is feasible. */
bool ModelChecker::isfeasible() {
return !cyclegraph->checkForCycles() && !failed_promise;
}
-/** Returns whether the current trace is feasible. */
+/** Returns whether the current completed trace is feasible. */
bool ModelChecker::isfinalfeasible() {
return isfeasible() && promises->size()==0;
}
}
-/** Resolve promises. */
+/** Resolve the given promises. */
void ModelChecker::resolve_promises(ModelAction *write) {
for(unsigned int i=0, promise_index=0;promise_index<promises->size(); i++) {
}
}
+/** Compute the set of promises that could potentially be satisfied by
+ * this action. */
+
void ModelChecker::compute_promises(ModelAction *curr) {
for(unsigned int i=0;i<promises->size();i++) {
Promise * promise=(*promises)[i];