1 #include "xbt/automaton.h"
2 #include "xbt/automatonparse_promela.h"
3 #include "example_liveness_without_cycle.h"
11 XBT_LOG_NEW_DEFAULT_CATEGORY(example_liveness_without_cycle, "Example liveness without cycle");
13 extern xbt_automaton_t automaton;
33 int server(int argc, char *argv[])
39 MSG_task_destroy(task);
42 MSG_task_receive(&task, "mymailbox");
45 //XBT_INFO("r (server) = %d", r);
48 //MC_assert_pair_stateless(atoi(MSG_task_get_name(task)) == 3);
54 int client(int argc, char *argv[])
58 MSG_task_create(argv[1], 0 /*comp cost */ , 10000 /*comm size */ ,
59 NULL /*arbitrary data */ );
61 MSG_task_send(task, "mymailbox");
66 //XBT_INFO("r (client) = %d", r);
73 int main(int argc, char **argv){
76 automaton = get_automaton();
77 xbt_propositional_symbol_t ps = xbt_new_propositional_symbol(automaton,"r", &predR);
78 ps = xbt_new_propositional_symbol(automaton,"e", &predE);
79 ps = xbt_new_propositional_symbol(automaton,"d", &predD);
81 //display_automaton();
83 MSG_global_init(&argc, argv);
85 MSG_create_environment("platform.xml");
87 MSG_function_register("server", server);
89 MSG_function_register("client", client);
91 MSG_launch_application("deploy_bugged1.xml");
93 //XBT_INFO("r=%d", r);
95 MSG_main_liveness_stateless(automaton);