return true;
}
+ // Actions executed by the same actor are always dependent
+ if (other->aid_ == aid_)
+ return true;
+
// Otherwise, joining is indep with any other transitions:
// - It is only enabled once the target ends, and after this point it's enabled no matter what
// - Other joins don't affect it, and it does not impact on the enabledness of any other transition
}
bool TestAnyTransition::depends(const Transition* other) const
{
+ // Actions executed by the same actor are always dependent
+ if (other->aid_ == aid_)
+ return true;
+
return transitions_[times_considered_]->depends(other);
}
WaitAnyTransition::WaitAnyTransition(aid_t issuer, int times_considered, std::stringstream& stream)
}
bool WaitAnyTransition::depends(const Transition* other) const
{
+ // Actions executed by the same actor are always dependent
+ if (other->aid_ == aid_)
+ return true;
return transitions_[times_considered_]->depends(other);
}
if (other->type_ < type_)
return other->depends(this);
+ // Actions executed by the same actor are always dependent
+ if (other->aid_ == aid_)
+ return true;
+
if (const auto* wait = dynamic_cast<const CommWaitTransition*>(other)) {
if (timeout_ || wait->timeout_)
return true; // Timeouts are not considered by the independence theorem, thus assumed dependent
if (other->type_ < type_)
return other->depends(this);
+ // Actions executed by the same actor are always dependent
+ if (other->aid_ == aid_)
+ return true;
+
if (dynamic_cast<const CommTestTransition*>(other) != nullptr)
return false; // Test & Test are independent
if (other->type_ < type_)
return other->depends(this);
+ // Actions executed by the same actor are always dependent
+ if (other->aid_ == aid_)
+ return true;
+
if (const auto* recv = dynamic_cast<const CommRecvTransition*>(other))
return mbox_ == recv->mbox_;
if (other->type_ < type_)
return other->depends(this);
+ // Actions executed by the same actor are always dependent
+ if (other->aid_ == aid_)
+ return true;
+
if (const auto* other_isend = dynamic_cast<const CommSendTransition*>(other))
return mbox_ == other_isend->mbox_;
if (o->type_ < type_)
return o->depends(this);
+ // Actions executed by the same actor are always dependent
+ if (o->aid_ == aid_)
+ return true;
+
// type_ <= other->type_ in MUTEX_LOCK, MUTEX_TEST, MUTEX_TRYLOCK, MUTEX_UNLOCK, MUTEX_WAIT,
if (auto* other = dynamic_cast<const MutexTransition*>(o)) {