did a little more looking at infeasible executions...
authorBrian Demsky <bdemsky@uci.edu>
Tue, 9 Oct 2012 06:35:21 +0000 (23:35 -0700)
committerBrian Demsky <bdemsky@uci.edu>
Tue, 9 Oct 2012 06:35:21 +0000 (23:35 -0700)
another obvious property we missed...kills about 1/3 of the infeasible executions...

model.cc

index e11dcf716939e1a13f1dd08f6b252ab60fef1b9b..ee3ce992cef8aa816fde0466ce67b42e5f6161c5 100644 (file)
--- a/model.cc
+++ b/model.cc
@@ -1779,6 +1779,11 @@ void ModelChecker::mo_check_promises(thread_id_t tid, const ModelAction *write)
                        //do we have a pwrite for the promise, if not, set it
                        if (promise->get_write() == NULL ) {
                                promise->set_write(write);
+                               //The pwrite cannot happen before the promise
+                               if (write->happens_before(act) && (write != act)) {
+                                       failed_promise = true;
+                                       return;
+                               }
                        }
                        if (mo_graph->checkPromise(write, promise)) {
                                failed_promise = true;