4 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_liveness, mc,
5 "Logging specific to algorithms for liveness properties verification");
7 xbt_dynar_t initial_pairs = NULL;
9 xbt_dynar_t reached_pairs;
10 extern mc_snapshot_t initial_snapshot;
12 mc_pair_t new_pair(mc_snapshot_t sn, mc_state_t sg, xbt_state_t st){
14 p = xbt_new0(s_mc_pair_t, 1);
16 p->automaton_state = st;
20 mc_stats_pair->expanded_pairs++;
25 int reached(mc_pair_t pair){
27 char* hash_reached = malloc(sizeof(char)*160);
31 char *hash = malloc(sizeof(char)*160);
32 xbt_sha((char *)&pair, hash);
33 xbt_dynar_foreach(reached_pairs, c, hash_reached){
34 if(strcmp(hash, hash_reached) == 0){
44 void set_pair_reached(mc_pair_t pair){
46 if(reached(pair) == 0){
48 char *hash = malloc(sizeof(char)*160) ;
49 xbt_sha((char *)&pair, hash);
50 xbt_dynar_push(reached_pairs, &hash);
56 void MC_pair_delete(mc_pair_t pair){
57 xbt_free(pair->graph_state->proc_status);
58 xbt_free(pair->graph_state);
59 //xbt_free(pair->automaton_state); -> FIXME : à implémenter
64 int MC_automaton_evaluate_label(xbt_automaton_t a, xbt_exp_label_t l){
68 int left_res = MC_automaton_evaluate_label(a, l->u.or_and.left_exp);
69 int right_res = MC_automaton_evaluate_label(a, l->u.or_and.right_exp);
70 return (left_res || right_res);
74 int left_res = MC_automaton_evaluate_label(a, l->u.or_and.left_exp);
75 int right_res = MC_automaton_evaluate_label(a, l->u.or_and.right_exp);
76 return (left_res && right_res);
80 int res = MC_automaton_evaluate_label(a, l->u.exp_not);
85 unsigned int cursor = 0;
86 xbt_propositional_symbol_t p = NULL;
87 xbt_dynar_foreach(a->propositional_symbols, cursor, p){
88 if(strcmp(p->pred, l->u.predicat) == 0){
89 int (*f)() = p->function;
107 /******************************* DFS with visited state *******************************/
109 xbt_dynar_t visited_pairs;
111 void set_pair_visited(mc_pair_t pair, int sc){
114 mc_visited_pair_t p = NULL;
115 p = xbt_new0(s_mc_visited_pair_t, 1);
117 p->search_cycle = sc;
118 char *hash = malloc(sizeof(char)*160);
119 xbt_sha((char *)&p, hash);
120 xbt_dynar_push(visited_pairs, &hash);
125 int visited(mc_pair_t pair, int sc){
127 char* hash_visited = malloc(sizeof(char)*160);
131 mc_visited_pair_t p = NULL;
132 p = xbt_new0(s_mc_visited_pair_t, 1);
134 p->search_cycle = sc;
135 char *hash = malloc(sizeof(char)*160);
136 xbt_sha((char *)&p, hash);
137 xbt_dynar_foreach(visited_pairs, c, hash_visited){
138 if(strcmp(hash, hash_visited) == 0){
150 void MC_vddfs_stateful_init(xbt_automaton_t a){
152 XBT_DEBUG("**************************************************");
153 XBT_DEBUG("Double-DFS stateful with visited state init");
154 XBT_DEBUG("**************************************************");
156 mc_pair_t mc_initial_pair;
157 mc_state_t initial_graph_state;
158 smx_process_t process;
159 mc_snapshot_t init_snapshot;
161 MC_wait_for_requests();
165 init_snapshot = xbt_new0(s_mc_snapshot_t, 1);
167 initial_graph_state = MC_state_pair_new();
168 xbt_swag_foreach(process, simix_global->process_list){
169 if(MC_process_is_enabled(process)){
170 MC_state_interleave_process(initial_graph_state, process);
174 visited_pairs = xbt_dynar_new(sizeof(char *), NULL);
175 reached_pairs = xbt_dynar_new(sizeof(char *), NULL);
177 MC_take_snapshot(init_snapshot);
181 /* regarder dans l'automate toutes les transitions activables grâce à l'état initial du système
182 -> donnera les états initiaux de la propriété consistants avec l'état initial du système */
184 unsigned int cursor = 0;
185 unsigned int cursor2 = 0;
186 xbt_state_t state = NULL;
188 xbt_transition_t transition_succ;
189 xbt_dynar_t successors = xbt_dynar_new(sizeof(mc_pair_t), NULL);
192 xbt_dynar_foreach(a->states, cursor, state){
193 if(state->type == -1){
194 xbt_dynar_foreach(state->out, cursor2, transition_succ){
195 res = MC_automaton_evaluate_label(a, transition_succ->label);
197 if((res == 1) || (res == 2)){
201 mc_initial_pair = new_pair(init_snapshot, initial_graph_state, transition_succ->dst);
202 xbt_dynar_push(successors, &mc_initial_pair);
213 if(xbt_dynar_length(successors) == 0){
214 xbt_dynar_foreach(a->states, cursor, state){
215 if(state->type == -1){
218 mc_initial_pair = new_pair(init_snapshot, initial_graph_state, transition_succ->dst);
219 xbt_dynar_push(successors, &mc_initial_pair);
227 xbt_dynar_foreach(successors, cursor, pair_succ){
230 xbt_fifo_unshift(mc_stack_liveness_stateful, pair_succ);
231 set_pair_visited(pair_succ, 0);
236 MC_vddfs_stateful(a, 0, 0);
238 MC_vddfs_stateful(a, 0, 1);
244 void MC_vddfs_stateful(xbt_automaton_t a, int search_cycle, int restore){
246 smx_process_t process = NULL;
249 if(xbt_fifo_size(mc_stack_liveness_stateful) == 0)
253 MC_restore_snapshot(((mc_pair_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_stack_liveness_stateful)))->system_state);
258 /* Get current state */
259 mc_pair_t current_pair = (mc_pair_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_stack_liveness_stateful));
262 xbt_swag_foreach(process, simix_global->process_list){
263 if(MC_process_is_enabled(process)){
264 MC_state_interleave_process(current_pair->graph_state, process);
269 XBT_DEBUG("************************************************** ( search_cycle = %d )", search_cycle);
270 XBT_DEBUG("Pair : graph=%p, automaton=%p(%s), %u interleave", current_pair->graph_state, current_pair->automaton_state, current_pair->automaton_state->id,MC_state_interleave_size(current_pair->graph_state));
273 mc_stats_pair->visited_pairs++;
276 mc_state_t next_graph_state = NULL;
277 smx_req_t req = NULL;
281 xbt_transition_t transition_succ;
285 xbt_dynar_t successors = xbt_dynar_new(sizeof(mc_pair_t), NULL);
288 mc_snapshot_t next_snapshot;
289 mc_snapshot_t current_snapshot;
292 while((req = MC_state_get_request(current_pair->graph_state, &value)) != NULL){
295 current_snapshot = xbt_new0(s_mc_snapshot_t, 1);
296 MC_take_snapshot(current_snapshot);
300 /* Debug information */
301 if(XBT_LOG_ISENABLED(mc_liveness, xbt_log_priority_debug)){
302 req_str = MC_request_to_string(req, value);
303 XBT_DEBUG("Execute: %s", req_str);
307 MC_state_set_executed_request(current_pair->graph_state, req, value);
309 /* Answer the request */
310 SIMIX_request_pre(req, value);
312 /* Wait for requests (schedules processes) */
313 MC_wait_for_requests();
316 /* Create the new expanded graph_state */
319 next_graph_state = MC_state_pair_new();
321 /* Get enabled process and insert it in the interleave set of the next graph_state */
322 xbt_swag_foreach(process, simix_global->process_list){
323 if(MC_process_is_enabled(process)){
324 MC_state_interleave_process(next_graph_state, process);
328 next_snapshot = xbt_new0(s_mc_snapshot_t, 1);
329 MC_take_snapshot(next_snapshot);
333 xbt_dynar_reset(successors);
336 xbt_dynar_foreach(current_pair->automaton_state->out, cursor, transition_succ){
338 res = MC_automaton_evaluate_label(a, transition_succ->label);
342 if((res == 1) || (res == 2)){ // enabled transition in automaton
343 next_pair = new_pair(next_snapshot,next_graph_state, transition_succ->dst);
344 xbt_dynar_push(successors, &next_pair);
351 if(xbt_dynar_length(successors) == 0){
354 next_pair = new_pair(next_snapshot, next_graph_state, current_pair->automaton_state);
355 xbt_dynar_push(successors, &next_pair);
362 xbt_dynar_foreach(successors, cursor, pair_succ){
364 //XBT_DEBUG("Search visited pair : graph=%p, automaton=%p", pair_succ->graph_state, pair_succ->automaton_state);
366 if((search_cycle == 1) && (reached(pair_succ) == 1)){
367 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
368 XBT_INFO("| ACCEPTANCE CYCLE |");
369 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
370 XBT_INFO("Counter-example that violates formula :");
371 MC_show_stack_liveness_stateful(mc_stack_liveness_stateful);
372 MC_dump_stack_liveness_stateful(mc_stack_liveness_stateful);
373 MC_print_statistics_pairs(mc_stats_pair);
377 if(visited(pair_succ, search_cycle) == 0){
379 mc_stats_pair->executed_transitions++;
382 xbt_fifo_unshift(mc_stack_liveness_stateful, pair_succ);
383 set_pair_visited(pair_succ, search_cycle);
386 MC_vddfs_stateful(a, search_cycle, 0);
388 if((search_cycle == 0) && (current_pair->automaton_state->type == 1)){
390 MC_restore_snapshot(current_pair->system_state);
393 xbt_swag_foreach(process, simix_global->process_list){
394 if(MC_process_is_enabled(process)){
395 MC_state_interleave_process(current_pair->graph_state, process);
399 set_pair_reached(current_pair);
400 XBT_DEBUG("Acceptance pair : graph=%p, automaton=%p(%s)", current_pair->graph_state, current_pair->automaton_state, current_pair->automaton_state->id);
401 MC_vddfs_stateful(a, 1, 1);
406 XBT_DEBUG("Pair already visited !");
412 if(MC_state_interleave_size(current_pair->graph_state) > 0){
413 MC_restore_snapshot(current_snapshot);
420 xbt_fifo_shift(mc_stack_liveness_stateful);
421 XBT_DEBUG("Pair (graph=%p, automaton =%p) shifted in snapshot_stack", current_pair->graph_state, current_pair->automaton_state);
428 /********************* Double-DFS stateful without visited state *******************/
431 void MC_ddfs_stateful_init(xbt_automaton_t a){
433 XBT_DEBUG("**************************************************");
434 XBT_DEBUG("Double-DFS stateful without visited state init");
435 XBT_DEBUG("**************************************************");
437 mc_pair_t mc_initial_pair;
438 mc_state_t initial_graph_state;
439 smx_process_t process;
440 mc_snapshot_t init_snapshot;
442 MC_wait_for_requests();
446 init_snapshot = xbt_new0(s_mc_snapshot_t, 1);
448 initial_graph_state = MC_state_pair_new();
449 xbt_swag_foreach(process, simix_global->process_list){
450 if(MC_process_is_enabled(process)){
451 MC_state_interleave_process(initial_graph_state, process);
455 reached_pairs = xbt_dynar_new(sizeof(char *), NULL);
457 MC_take_snapshot(init_snapshot);
461 /* regarder dans l'automate toutes les transitions activables grâce à l'état initial du système
462 -> donnera les états initiaux de la propriété consistants avec l'état initial du système */
464 unsigned int cursor = 0;
465 unsigned int cursor2 = 0;
466 xbt_state_t state = NULL;
468 xbt_transition_t transition_succ;
469 xbt_dynar_t successors = xbt_dynar_new(sizeof(mc_pair_t), NULL);
472 xbt_dynar_foreach(a->states, cursor, state){
473 if(state->type == -1){
474 xbt_dynar_foreach(state->out, cursor2, transition_succ){
475 res = MC_automaton_evaluate_label(a, transition_succ->label);
477 if((res == 1) || (res == 2)){
481 mc_initial_pair = new_pair(init_snapshot, initial_graph_state, transition_succ->dst);
482 xbt_dynar_push(successors, &mc_initial_pair);
493 if(xbt_dynar_length(successors) == 0){
494 xbt_dynar_foreach(a->states, cursor, state){
495 if(state->type == -1){
498 mc_initial_pair = new_pair(init_snapshot, initial_graph_state, transition_succ->dst);
499 xbt_dynar_push(successors, &mc_initial_pair);
507 xbt_dynar_foreach(successors, cursor, pair_succ){
510 xbt_fifo_unshift(mc_stack_liveness_stateful, pair_succ);
515 MC_ddfs_stateful(a, 0, 0);
517 MC_ddfs_stateful(a, 0, 1);
523 void MC_ddfs_stateful(xbt_automaton_t a, int search_cycle, int restore){
525 smx_process_t process = NULL;
528 if(xbt_fifo_size(mc_stack_liveness_stateful) == 0)
532 MC_restore_snapshot(((mc_pair_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_stack_liveness_stateful)))->system_state);
537 /* Get current state */
538 mc_pair_t current_pair = (mc_pair_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_stack_liveness_stateful));
541 xbt_swag_foreach(process, simix_global->process_list){
542 if(MC_process_is_enabled(process)){
543 MC_state_interleave_process(current_pair->graph_state, process);
548 XBT_DEBUG("************************************************** ( search_cycle = %d )", search_cycle);
549 XBT_DEBUG("Pair : graph=%p, automaton=%p(%s), %u interleave", current_pair->graph_state, current_pair->automaton_state, current_pair->automaton_state->id,MC_state_interleave_size(current_pair->graph_state));
552 mc_stats_pair->visited_pairs++;
555 mc_state_t next_graph_state = NULL;
556 smx_req_t req = NULL;
560 xbt_transition_t transition_succ;
564 xbt_dynar_t successors = xbt_dynar_new(sizeof(mc_pair_t), NULL);
567 mc_snapshot_t next_snapshot;
568 mc_snapshot_t current_snapshot;
571 while((req = MC_state_get_request(current_pair->graph_state, &value)) != NULL){
574 current_snapshot = xbt_new0(s_mc_snapshot_t, 1);
575 MC_take_snapshot(current_snapshot);
579 /* Debug information */
580 if(XBT_LOG_ISENABLED(mc_liveness, xbt_log_priority_debug)){
581 req_str = MC_request_to_string(req, value);
582 XBT_DEBUG("Execute: %s", req_str);
586 MC_state_set_executed_request(current_pair->graph_state, req, value);
588 /* Answer the request */
589 SIMIX_request_pre(req, value);
591 /* Wait for requests (schedules processes) */
592 MC_wait_for_requests();
595 /* Create the new expanded graph_state */
598 next_graph_state = MC_state_pair_new();
600 /* Get enabled process and insert it in the interleave set of the next graph_state */
601 xbt_swag_foreach(process, simix_global->process_list){
602 if(MC_process_is_enabled(process)){
603 MC_state_interleave_process(next_graph_state, process);
607 next_snapshot = xbt_new0(s_mc_snapshot_t, 1);
608 MC_take_snapshot(next_snapshot);
612 xbt_dynar_reset(successors);
615 xbt_dynar_foreach(current_pair->automaton_state->out, cursor, transition_succ){
617 res = MC_automaton_evaluate_label(a, transition_succ->label);
621 if((res == 1) || (res == 2)){ // enabled transition in automaton
622 next_pair = new_pair(next_snapshot,next_graph_state, transition_succ->dst);
623 xbt_dynar_push(successors, &next_pair);
630 if(xbt_dynar_length(successors) == 0){
633 next_pair = new_pair(next_snapshot, next_graph_state, current_pair->automaton_state);
634 xbt_dynar_push(successors, &next_pair);
641 xbt_dynar_foreach(successors, cursor, pair_succ){
643 //XBT_DEBUG("Search visited pair : graph=%p, automaton=%p", pair_succ->graph_state, pair_succ->automaton_state);
645 if((search_cycle == 1) && (reached(pair_succ) == 1)){
646 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
647 XBT_INFO("| ACCEPTANCE CYCLE |");
648 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
649 XBT_INFO("Counter-example that violates formula :");
650 MC_show_stack_liveness_stateful(mc_stack_liveness_stateful);
651 MC_dump_stack_liveness_stateful(mc_stack_liveness_stateful);
652 MC_print_statistics_pairs(mc_stats_pair);
656 mc_stats_pair->executed_transitions++;
659 xbt_fifo_unshift(mc_stack_liveness_stateful, pair_succ);
662 MC_ddfs_stateful(a, search_cycle, 0);
664 if((search_cycle == 0) && (current_pair->automaton_state->type == 1)){
666 MC_restore_snapshot(current_pair->system_state);
669 xbt_swag_foreach(process, simix_global->process_list){
670 if(MC_process_is_enabled(process)){
671 MC_state_interleave_process(current_pair->graph_state, process);
675 set_pair_reached(current_pair);
676 XBT_DEBUG("Acceptance pair : graph=%p, automaton=%p(%s)", current_pair->graph_state, current_pair->automaton_state, current_pair->automaton_state->id);
677 MC_ddfs_stateful(a, 1, 1);
683 if(MC_state_interleave_size(current_pair->graph_state) > 0){
684 MC_restore_snapshot(current_snapshot);
691 xbt_fifo_shift(mc_stack_liveness_stateful);
692 XBT_DEBUG("Pair (graph=%p, automaton =%p) shifted in snapshot_stack", current_pair->graph_state, current_pair->automaton_state);
699 /********************* Double-DFS stateless *******************/
701 void MC_pair_stateless_delete(mc_pair_stateless_t pair){
702 xbt_free(pair->graph_state->proc_status);
703 xbt_free(pair->graph_state);
704 //xbt_free(pair->automaton_state); -> FIXME : à implémenter
708 mc_pair_stateless_t new_pair_stateless(mc_state_t sg, xbt_state_t st){
709 mc_pair_stateless_t p = NULL;
710 p = xbt_new0(s_mc_pair_stateless_t, 1);
711 p->automaton_state = st;
713 mc_stats_pair->expanded_pairs++;
718 int reached_stateless(mc_pair_stateless_t pair){
720 char* hash_reached = malloc(sizeof(char)*160);
724 char *hash = malloc(sizeof(char)*160);
725 xbt_sha((char *)&pair, hash);
726 xbt_dynar_foreach(reached_pairs, c, hash_reached){
727 if(strcmp(hash, hash_reached) == 0){
737 void set_pair_stateless_reached(mc_pair_stateless_t pair){
739 if(reached_stateless(pair) == 0){
741 char *hash = malloc(sizeof(char)*160) ;
742 xbt_sha((char *)&pair, hash);
743 xbt_dynar_push(reached_pairs, &hash);
750 void MC_ddfs_stateless_init(xbt_automaton_t a){
752 XBT_DEBUG("**************************************************");
753 XBT_DEBUG("Double-DFS stateless init");
754 XBT_DEBUG("**************************************************");
756 mc_pair_stateless_t mc_initial_pair;
757 mc_state_t initial_graph_state;
758 smx_process_t process;
760 MC_wait_for_requests();
764 initial_graph_state = MC_state_pair_new();
765 xbt_swag_foreach(process, simix_global->process_list){
766 if(MC_process_is_enabled(process)){
767 MC_state_interleave_process(initial_graph_state, process);
771 reached_pairs = xbt_dynar_new(sizeof(char *), NULL);
775 /* regarder dans l'automate toutes les transitions activables grâce à l'état initial du système
776 -> donnera les états initiaux de la propriété consistants avec l'état initial du système */
778 unsigned int cursor = 0;
779 unsigned int cursor2 = 0;
780 xbt_state_t state = NULL;
782 xbt_transition_t transition_succ;
783 xbt_dynar_t successors = xbt_dynar_new(sizeof(mc_pair_stateless_t), NULL);
784 mc_pair_stateless_t pair_succ;
786 xbt_dynar_foreach(a->states, cursor, state){
787 if(state->type == -1){
788 xbt_dynar_foreach(state->out, cursor2, transition_succ){
789 res = MC_automaton_evaluate_label(a, transition_succ->label);
791 if((res == 1) || (res == 2)){
795 mc_initial_pair = new_pair_stateless(initial_graph_state, transition_succ->dst);
796 xbt_dynar_push(successors, &mc_initial_pair);
807 if(xbt_dynar_length(successors) == 0){
808 xbt_dynar_foreach(a->states, cursor, state){
809 if(state->type == -1){
812 mc_initial_pair = new_pair_stateless(initial_graph_state, transition_succ->dst);
813 xbt_dynar_push(successors, &mc_initial_pair);
821 xbt_dynar_foreach(successors, cursor, pair_succ){
824 xbt_fifo_unshift(mc_stack_liveness_stateless, pair_succ);
826 /* Save the initial state */
827 initial_snapshot = xbt_new0(s_mc_snapshot_t, 1);
828 MC_take_snapshot(initial_snapshot);
833 MC_ddfs_stateless(a, 0, 0);
835 MC_ddfs_stateless(a, 0, 1);
841 void MC_ddfs_stateless(xbt_automaton_t a, int search_cycle, int replay){
843 smx_process_t process = NULL;
846 if(xbt_fifo_size(mc_stack_liveness_stateless) == 0)
849 /* Get current state */
850 mc_pair_stateless_t current_pair = (mc_pair_stateless_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_stack_liveness_stateless));
852 XBT_DEBUG("********************* ( Depth = %d, search_cycle = %d )", xbt_fifo_size(mc_stack_liveness_stateless), search_cycle);
853 XBT_DEBUG("Pair : graph=%p, automaton=%p(%s), %u interleave", current_pair->graph_state, current_pair->automaton_state, current_pair->automaton_state->id,MC_state_interleave_size(current_pair->graph_state));
856 mc_stats_pair->visited_pairs++;
859 mc_state_t next_graph_state = NULL;
860 smx_req_t req = NULL;
863 mc_pair_stateless_t pair_succ;
864 xbt_transition_t transition_succ;
868 xbt_dynar_t successors;
870 mc_pair_stateless_t next_pair;
872 while((req = MC_state_get_request(current_pair->graph_state, &value)) != NULL){
874 //XBT_DEBUG("Interleave size %u", MC_state_interleave_size(current_pair->graph_state));
876 /* Debug information */
877 if(XBT_LOG_ISENABLED(mc_liveness, xbt_log_priority_debug)){
878 req_str = MC_request_to_string(req, value);
879 XBT_DEBUG("Execute: %s", req_str);
885 MC_state_set_executed_request(current_pair->graph_state, req, value);
887 /* Answer the request */
888 SIMIX_request_pre(req, value);
890 /* Wait for requests (schedules processes) */
891 MC_wait_for_requests();
894 /* Create the new expanded graph_state */
897 next_graph_state = MC_state_pair_new();
899 /* Get enabled process and insert it in the interleave set of the next graph_state */
900 xbt_swag_foreach(process, simix_global->process_list){
901 if(MC_process_is_enabled(process)){
902 MC_state_interleave_process(next_graph_state, process);
906 successors = xbt_dynar_new(sizeof(mc_pair_stateless_t), NULL);
910 //xbt_dynar_reset(successors);
914 xbt_dynar_foreach(current_pair->automaton_state->out, cursor, transition_succ){
916 res = MC_automaton_evaluate_label(a, transition_succ->label);
920 if((res == 1) || (res == 2)){ // enabled transition in automaton
921 next_pair = new_pair_stateless(next_graph_state, transition_succ->dst);
922 xbt_dynar_push(successors, &next_pair);
929 if(xbt_dynar_length(successors) == 0){
932 next_pair = new_pair_stateless(next_graph_state, current_pair->automaton_state);
933 xbt_dynar_push(successors, &next_pair);
940 xbt_dynar_foreach(successors, cursor, pair_succ){
942 if((search_cycle == 1) && (reached_stateless(pair_succ) == 1)){
943 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
944 XBT_INFO("| ACCEPTANCE CYCLE |");
945 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
946 XBT_INFO("Counter-example that violates formula :");
947 MC_show_stack_liveness_stateless(mc_stack_liveness_stateless);
948 MC_dump_stack_liveness_stateless(mc_stack_liveness_stateless);
949 MC_print_statistics_pairs(mc_stats_pair);
953 mc_stats_pair->executed_transitions++;
956 xbt_fifo_unshift(mc_stack_liveness_stateless, pair_succ);
961 MC_ddfs_stateless(a, search_cycle, 0);
963 if((search_cycle == 0) && (current_pair->automaton_state->type == 1)){
965 set_pair_stateless_reached(current_pair);
966 XBT_DEBUG("Acceptance pair : graph=%p, automaton=%p(%s)", current_pair->graph_state, current_pair->automaton_state, current_pair->automaton_state->id);
967 MC_replay_liveness(mc_stack_liveness_stateless);
968 MC_ddfs_stateless(a, 1, 1);
973 if(MC_state_interleave_size(current_pair->graph_state) > 0){
974 XBT_DEBUG("Backtracking to depth %u", xbt_fifo_size(mc_stack_liveness_stateless));
975 MC_replay_liveness(mc_stack_liveness_stateless);
981 xbt_fifo_shift(mc_stack_liveness_stateless);
982 XBT_DEBUG("Pair (graph=%p, automaton =%p) shifted in stack", current_pair->graph_state, current_pair->automaton_state);