Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix ObjectAccess dependency check
authorMaxwell Pirtle <maxwellpirtle@gmail.com>
Fri, 5 May 2023 12:21:17 +0000 (14:21 +0200)
committerMaxwell Pirtle <maxwellpirtle@gmail.com>
Fri, 12 May 2023 13:58:22 +0000 (15:58 +0200)
The ObjectAccess transition should defer
dependency computation to the ActorJoin action.
Previously, it only decided dependency by
simply checking if the `other` transition
were simply another object access on the
same object

src/mc/transition/TransitionObjectAccess.cpp

index 63a7d92..12f315e 100644 (file)
@@ -34,6 +34,9 @@ std::string ObjectAccessTransition::to_string(bool verbose) const
 }
 bool ObjectAccessTransition::depends(const Transition* o) const
 {
+  if (o->type_ < type_)
+    return o->depends(this);
+
   if (const auto* other = dynamic_cast<const ObjectAccessTransition*>(o))
     return objaddr_ == other->objaddr_; // dependent only if it's an access to the same object
   return false;