MSG_function_register("coordinator", coordinator);
MSG_function_register("client", client);
MSG_launch_application("deploy_bugged1_liveness.xml");
- MSG_main_liveness(automaton, argv[0]);
+ MSG_main_liveness(automaton);
return 0;
}
MSG_function_register("coordinator", coordinator);
MSG_function_register("client", client);
MSG_launch_application("deploy_bugged1_liveness.xml");
- MSG_main_liveness(automaton, argv[0]);
+ MSG_main_liveness(automaton);
return 0;
}
MSG_function_register("consumer", consumer);
MSG_function_register("producer", producer);
MSG_launch_application("deploy_bugged2_liveness.xml");
- MSG_main_liveness(automaton, argv[0]);
+ MSG_main_liveness(automaton);
return 0;
MSG_function_register("coordinator", coordinator);
MSG_function_register("client", client);
MSG_launch_application("deploy_centralized_liveness.xml");
- MSG_main_liveness(automaton, argv[0]);
+ MSG_main_liveness(automaton);
return 0;
MSG_function_register("coordinator", coordinator);
MSG_function_register("client", client);
MSG_launch_application("deploy_centralized_liveness.xml");
- MSG_main_liveness(automaton, argv[0]);
+ MSG_main_liveness(automaton);
return 0;
MSG_function_register("coordinator", coordinator);
MSG_function_register("client", client);
MSG_launch_application("deploy_test_snapshot.xml");
- MSG_main_liveness(automaton, argv[0]);
+ MSG_main_liveness(automaton);
return 0;
}
XBT_PUBLIC(void) MSG_global_init_args(int *argc, char **argv);
XBT_PUBLIC(MSG_error_t) MSG_main(void);
XBT_PUBLIC(MSG_error_t) MSG_main_stateful(void);
-XBT_PUBLIC(MSG_error_t) MSG_main_liveness(xbt_automaton_t a, char *prgm);
+XBT_PUBLIC(MSG_error_t) MSG_main_liveness(xbt_automaton_t a);
XBT_PUBLIC(MSG_error_t) MSG_clean(void);
XBT_PUBLIC(void) MSG_function_register(const char *name,
xbt_main_func_t code);
XBT_PUBLIC(void) MC_exit_liveness(void);
XBT_PUBLIC(void) MC_modelcheck(void);
XBT_PUBLIC(void) MC_modelcheck_stateful(void);
-XBT_PUBLIC(void) MC_modelcheck_liveness(xbt_automaton_t a, char *prgm);
+XBT_PUBLIC(void) MC_modelcheck_liveness(xbt_automaton_t a);
XBT_PUBLIC(void) MC_process_clock_add(smx_process_t, double);
XBT_PUBLIC(double) MC_process_clock_get(smx_process_t);
#include <libgen.h>
#include "mc_private.h"
+#include <xbt/module.h>
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_checkpoint, mc,
if (!memcmp(basename(maps->regions[i].pathname), "libsimgrid", 10)){
MC_snapshot_add_region(snapshot, 1, reg.start_addr, (char*)reg.end_addr - (char*)reg.start_addr);
} else {
- if (!memcmp(basename(maps->regions[i].pathname), basename(prog_name), strlen(basename(prog_name)))){
+ if (!memcmp(basename(maps->regions[i].pathname), basename(xbt_binary_name), strlen(basename(xbt_binary_name)))){
MC_snapshot_add_region(snapshot, 2, reg.start_addr, (char*)reg.end_addr - (char*)reg.start_addr);
}
}
mc_snapshot_t initial_snapshot_liveness = NULL;
xbt_automaton_t automaton;
-char *prog_name;
-static void MC_init_liveness(xbt_automaton_t a, char *prgm);
+static void MC_init_liveness(xbt_automaton_t a);
static void MC_assert_pair(int prop);
}
-static void MC_init_liveness(xbt_automaton_t a, char *prgm){
+static void MC_init_liveness(xbt_automaton_t a){
XBT_DEBUG("Start init mc");
MC_UNSET_RAW_MEM;
automaton = a;
- prog_name = strdup(prgm);
MC_ddfs_init();
}
-void MC_modelcheck_liveness(xbt_automaton_t a, char *prgm){
- MC_init_liveness(a, prgm);
+void MC_modelcheck_liveness(xbt_automaton_t a){
+ MC_init_liveness(a);
MC_exit_liveness();
}
}
-MSG_error_t MSG_main_liveness(xbt_automaton_t a, char *prgm)
+MSG_error_t MSG_main_liveness(xbt_automaton_t a)
{
/* Clean IO before the run */
fflush(stdout);
fflush(stderr);
if (MC_IS_ENABLED) {
- MC_modelcheck_liveness(a, prgm);
+ MC_modelcheck_liveness(a);
}
else {
SIMIX_run();