Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : separate informations for safety stateful/stateless and liveness...
[simgrid.git] / examples / msg / mc / example_automaton.c
index 8780f17..deb1129 100644 (file)
@@ -14,7 +14,7 @@ extern xbt_automaton_t automaton;
 
 
 int p=1;
-int r=1;
+int r=0;
 int q=1;
 int e=1;
 int d=1;
@@ -55,12 +55,11 @@ int server(int argc, char *argv[])
     }
     MSG_task_receive(&task, "mymailbox");
     count++;
-    r=(r+1)%3;
-    //d=(d+1)%2;
-    XBT_INFO("r (server) = %d", r);
+    //r=(r+1)%2;
+    //XBT_INFO("r (server) = %d", r);
      
   }
-  MC_assert_pair(atoi(MSG_task_get_name(task)) == 3);
+  MC_assert_pair_stateful(atoi(MSG_task_get_name(task)) == 3);
 
   XBT_INFO("OK");
   return 0;
@@ -78,7 +77,7 @@ int client(int argc, char *argv[])
   XBT_INFO("Sent!");
   
   //r=(r+1)%3;
-  XBT_INFO("r (client) = %d", r);
+  //XBT_INFO("r (client) = %d", r);
   
   return 0;
 }
@@ -107,9 +106,9 @@ int main(int argc, char **argv){
 
   MSG_launch_application("deploy_bugged1.xml"); 
   
-  XBT_INFO("r=%d", r);
+  //XBT_INFO("r=%d", r);
   
-  MSG_main_with_automaton(automaton);
+  MSG_main_liveness_stateful(automaton);
 
   MSG_clean();