Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : wait with timeout is always dependant with another transition
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Tue, 18 Feb 2014 13:26:28 +0000 (14:26 +0100)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Tue, 18 Feb 2014 13:26:28 +0000 (14:26 +0100)
src/mc/mc_request.c

index 5b7ce40..98565b0 100644 (file)
@@ -17,7 +17,11 @@ int MC_request_depend(smx_simcall_t r1, smx_simcall_t r2) {
     return TRUE;
 
   if (r1->issuer == r2->issuer)
     return TRUE;
 
   if (r1->issuer == r2->issuer)
-      return FALSE;
+    return FALSE;
+
+  /* Wait with timeout transitions are not considered by the independance theorem, thus we consider them as dependant with all other transitions */
+  if((r1->call == SIMCALL_COMM_WAIT && simcall_comm_wait__get__timeout(r1) > 0) || (r2->call == SIMCALL_COMM_WAIT && simcall_comm_wait__get__timeout(r2) > 0))
+    return TRUE;
 
   if(r1->call == SIMCALL_COMM_ISEND && r2->call == SIMCALL_COMM_IRECV)
     return FALSE;
 
   if(r1->call == SIMCALL_COMM_ISEND && r2->call == SIMCALL_COMM_IRECV)
     return FALSE;