+void ModelAction::create_cv(const ModelAction *parent)
+{
+ ASSERT(cv == NULL);
+
+ if (parent)
+ cv = new ClockVector(parent->cv, this);
+ else
+ cv = new ClockVector(NULL, this);
+}
+
+void ModelAction::read_from(const ModelAction *act)
+{
+ ASSERT(cv);
+ if (act->is_release() && this->is_acquire())
+ cv->merge(act->cv);
+ reads_from = act;
+ value = act->value;
+}
+
+/**
+ * Check whether 'this' happens before act, according to the memory-model's
+ * happens before relation. This is checked via the ClockVector constructs.
+ * @return true if this action's thread has synchronized with act's thread
+ * since the execution of act, false otherwise.
+ */
+bool ModelAction::happens_before(const ModelAction *act) const
+{
+ return act->cv->synchronized_since(this);
+}
+
+void ModelAction::print(void) const