Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Improve independence detection of transitions (more reduction of state space)
authorcristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 17 May 2010 09:05:26 +0000 (09:05 +0000)
committercristianrosa <cristianrosa@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 17 May 2010 09:05:26 +0000 (09:05 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7749 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/mc/mc_transition.c

index 6108b11..6b9d7f8 100644 (file)
@@ -112,27 +112,30 @@ void MC_transition_delete(mc_transition_t trans)
  */
 int MC_transition_depend(mc_transition_t t1, mc_transition_t t2)
 {
  */
 int MC_transition_depend(mc_transition_t t1, mc_transition_t t2)
 {
-  /* The semantics of SIMIX network operations implies that ONLY transitions 
-     of the same type, in the same rendez-vous point, and from different processes
-     are dependant, except wait transitions that are always independent */
   if(t1->process == t2->process) 
     return FALSE;
 
   if(t1->process == t2->process) 
     return FALSE;
 
-  if(t1->type == mc_isend && t2->type == mc_isend && t1->rdv == t2->rdv)
-    return TRUE;
+  if(t1->type != t2->type)
+    return FALSE;
+  
+  if(t1->type == mc_isend && t2->type == mc_isend && t1->rdv != t2->rdv)
+    return FALSE;
 
 
-  if(t1->type == mc_irecv && t2->type == mc_irecv && t1->rdv == t2->rdv)
-    return TRUE;
+  if(t1->type == mc_irecv && t2->type == mc_irecv && t1->rdv != t2->rdv)
+    return FALSE;
 
 
+  if(t1->type == mc_wait && t2->type == mc_wait && t1->comm == t2->comm)
+    return FALSE;
+  
   if(t1->type == mc_wait && t2->type == mc_wait 
      && t1->comm->src_buff != NULL
      && t1->comm->dst_buff != NULL
      && t2->comm->src_buff != NULL
      && t2->comm->dst_buff != NULL
   if(t1->type == mc_wait && t2->type == mc_wait 
      && t1->comm->src_buff != NULL
      && t1->comm->dst_buff != NULL
      && t2->comm->src_buff != NULL
      && t2->comm->dst_buff != NULL
-     && (   t1->comm->dst_buff == t2->comm->src_buff
-         || t1->comm->dst_buff == t2->comm->dst_buff
-         || t2->comm->dst_buff == t1->comm->src_buff))
-    return TRUE;
+     && t1->comm->dst_buff != t2->comm->src_buff
+     && t1->comm->dst_buff != t2->comm->dst_buff
+     && t2->comm->dst_buff != t1->comm->src_buff)
+    return FALSE;
   
   
-  return FALSE;
+  return TRUE;
 }
\ No newline at end of file
 }
\ No newline at end of file