action: (assertion) disallow out-of-order synchronization
authorBrian Norris <banorris@uci.edu>
Thu, 23 Aug 2012 02:15:04 +0000 (19:15 -0700)
committerBrian Norris <banorris@uci.edu>
Fri, 24 Aug 2012 00:31:40 +0000 (17:31 -0700)
We build our ModelChecker around the assumption that synchronization never
occurs counter to the execution order. This assertion lets us know if that
fails.

action.cc

index b9e9c02c533a0eb9850c9a77a142cd9b549ce3db..5124780cec727982621a8c7e698f753bf7371e31 100644 (file)
--- a/action.cc
+++ b/action.cc
@@ -177,6 +177,7 @@ void ModelAction::read_from(const ModelAction *act)
  * @param act The ModelAction to synchronize with
  */
 void ModelAction::synchronize_with(const ModelAction *act) {
+       ASSERT(*act < *this);
        model->check_promises(cv, act->cv);
        cv->merge(act->cv);
 }