Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : new tesh example for liveness model checking with visited state reduction
[simgrid.git] / examples / msg / mc / bugged1_liveness.c
index 19f8d61..b020037 100644 (file)
@@ -56,6 +56,7 @@ int coordinator(int argc, char *argv[])
           MSG_task_send(MSG_task_create("grant", 0, 1000, NULL), req);
         }else{
           xbt_dynar_push(requests, &req);
+          CS_used = 0;
         }
       }else{
         XBT_INFO("CS release. resource now idle");
@@ -127,14 +128,19 @@ int main(int argc, char *argv[])
 
   MSG_init(&argc, argv);
 
+  char **options = &argv[1];
+
   MSG_config("model-check/property","promela_bugged1_liveness");
   MC_automaton_new_propositional_symbol("r", &predR);
   MC_automaton_new_propositional_symbol("cs", &predCS);
+
+  const char* platform_file = options[0];
+  const char* application_file = options[1];
   
-  MSG_create_environment("../msg_platform.xml");
+  MSG_create_environment(platform_file);
   MSG_function_register("coordinator", coordinator);
   MSG_function_register("client", client);
-  MSG_launch_application("deploy_bugged1_liveness.xml");
+  MSG_launch_application(application_file);
   MSG_main();
 
   return 0;