From: Brian Norris Date: Thu, 23 Aug 2012 02:15:04 +0000 (-0700) Subject: action: (assertion) disallow out-of-order synchronization X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=45d8b1a74beaf6a80ce44a1f9aa3d59abc5d0582;p=cdsspec-compiler.git action: (assertion) disallow out-of-order synchronization We build our ModelChecker around the assumption that synchronization never occurs counter to the execution order. This assertion lets us know if that fails. --- diff --git a/action.cc b/action.cc index b9e9c02..5124780 100644 --- 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); }