}
}
-void ModelChecker::check_promises_thread_disabled() {
+void ModelChecker::check_promises_thread_disabled()
+{
for (unsigned int i = 0; i < promises->size(); i++) {
Promise *promise = (*promises)[i];
- if (promise->check_promise()) {
+ if (promise->has_failed()) {
priv->failed_promise = true;
return;
}
return false;
synced_thread[id] = true;
- return check_promise();
+ return has_failed();
}
-bool Promise::check_promise() const
+/**
+ * Check if this promise has failed. A promise can fail when all threads which
+ * could possibly satisfy the promise have been eliminated.
+ *
+ * @return True, if this promise has failed; false otherwise
+ */
+bool Promise::has_failed() const
{
unsigned int sync_size = synced_thread.size();
int promise_tid = id_to_int(read->get_tid());
return synced_thread[id];
}
- bool check_promise() const;
+ bool has_failed() const;
uint64_t get_value() const { return value; }
void set_write(const ModelAction *act) { write = act; }
const ModelAction * get_write() { return write; }