4 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_dfs, mc,
5 "Logging specific to MC DFS algorithm");
7 xbt_dynar_t initial_pairs = NULL;
9 xbt_dynar_t visited_pairs;
10 xbt_dynar_t reached_pairs;
12 mc_pairs_t new_pair(mc_snapshot_t sn, mc_state_t sg, xbt_state_t st){
14 p = xbt_new0(s_mc_pairs_t, 1);
16 p->automaton_state = st;
24 void set_pair_visited(mc_state_t gs, xbt_state_t as, int sc){
26 //XBT_DEBUG("New visited pair : graph=%p, automaton=%p", gs, as);
28 mc_visited_pairs_t p = NULL;
29 p = xbt_new0(s_mc_visited_pairs_t, 1);
31 p->automaton_state = as;
33 xbt_dynar_push(visited_pairs, &p);
34 //XBT_DEBUG("New visited pair , length of visited pairs : %lu", xbt_dynar_length(visited_pairs));
37 //XBT_DEBUG("New visited pair , length of visited pairs : %lu", xbt_dynar_length(visited_pairs));
40 int reached(mc_state_t gs, xbt_state_t as ){
42 mc_reached_pairs_t rp = NULL;
45 int different_process;
48 xbt_dynar_foreach(reached_pairs, c, rp){
49 if(rp->automaton_state == as){
51 for(i=0; i < gs->max_pid; i++){
52 if(gs->proc_status[i].state != rp->graph_state->proc_status[i].state){
56 if(different_process==0){
58 XBT_DEBUG("Pair (graph=%p, automaton=%p, interleave=%d) already reached (graph=%p)!", gs, as, MC_state_interleave_size(gs), rp->graph_state);
61 /* XBT_DEBUG("Pair (graph=%p, automaton=%p(%s)) already reached !", gs, as, as->id); */
69 void set_pair_reached(mc_state_t gs, xbt_state_t as){
71 //XBT_DEBUG("Set pair (graph=%p, automaton=%p) reached ", gs, as);
72 if(reached(gs, as) == 0){
74 mc_reached_pairs_t p = NULL;
75 p = xbt_new0(s_mc_reached_pairs_t, 1);
77 p->automaton_state = as;
78 xbt_dynar_push(reached_pairs, &p);
79 XBT_DEBUG("New reached pair : graph=%p, automaton=%p(%s)", gs, as, as->id);
85 int visited(mc_state_t gs, xbt_state_t as, int sc){
87 mc_visited_pairs_t p = NULL;
89 int different_process;
91 //XBT_DEBUG("Visited pair length : %lu", xbt_dynar_length(visited_pairs));
94 xbt_dynar_foreach(visited_pairs, c, p){
95 //XBT_DEBUG("Test pair visited");
97 if((p->automaton_state == as) && (p->search_cycle == sc)){
99 for(i=0; i < gs->max_pid; i++){
100 if(gs->proc_status[i].state != p->graph_state->proc_status[i].state){
104 if(different_process==0){
115 void MC_dfs_init(xbt_automaton_t a){
117 XBT_DEBUG("**************************************************");
118 XBT_DEBUG("DFS init");
119 XBT_DEBUG("**************************************************");
121 mc_pairs_t mc_initial_pair;
122 mc_state_t initial_graph_state;
123 smx_process_t process;
124 mc_snapshot_t init_snapshot;
126 MC_wait_for_requests();
130 init_snapshot = xbt_new0(s_mc_snapshot_t, 1);
132 initial_graph_state = MC_state_new();
133 xbt_swag_foreach(process, simix_global->process_list){
134 if(MC_process_is_enabled(process)){
135 MC_state_interleave_process(initial_graph_state, process);
139 visited_pairs = xbt_dynar_new(sizeof(mc_visited_pairs_t), NULL);
140 reached_pairs = xbt_dynar_new(sizeof(mc_reached_pairs_t), NULL);
142 MC_take_snapshot(init_snapshot);
146 /* unsigned int cursor = 0; */
147 /* xbt_state_t state = NULL; */
148 /* int nb_init_state = 0; */
150 /* xbt_dynar_foreach(a->states, cursor, state){ */
151 /* if(state->type == -1){ */
153 /* MC_SET_RAW_MEM; */
154 /* mc_initial_pair = new_pair(init_snapshot, initial_graph_state, state); */
156 /* xbt_fifo_unshift(mc_snapshot_stack, mc_initial_pair); */
158 /* XBT_DEBUG("**************************************************"); */
159 /* XBT_DEBUG("Initial state=%p ", mc_initial_pair); */
161 /* MC_UNSET_RAW_MEM; */
163 /* set_pair_visited(mc_initial_pair->graph_state, mc_initial_pair->automaton_state, 0); */
165 /* if(nb_init_state == 0) */
166 /* MC_dfs(a, 0, 0); */
168 /* MC_dfs(a, 0, 1); */
170 /* nb_init_state++; */
174 /* regarder dans l'automate toutes les transitions activables grâce à l'état initial du système
175 -> donnera les états initiaux de la propriété consistants avec l'état initial du système */
177 unsigned int cursor = 0;
178 unsigned int cursor2 = 0;
179 xbt_state_t state = NULL;
181 xbt_transition_t transition_succ;
182 xbt_dynar_t elses = xbt_dynar_new(sizeof(mc_pairs_t), NULL);
183 xbt_dynar_t successors = xbt_dynar_new(sizeof(mc_pairs_t), NULL);
184 // int enabled_transition = 0;
185 mc_pairs_t pair_succ;
187 xbt_dynar_foreach(a->states, cursor, state){
188 if(state->type == -1){
189 xbt_dynar_foreach(state->out, cursor2, transition_succ){
190 res = MC_automaton_evaluate_label(a, transition_succ->label);
196 mc_initial_pair = new_pair(init_snapshot, initial_graph_state, transition_succ->dst);
197 xbt_dynar_push(successors, &mc_initial_pair);
199 //XBT_DEBUG("New initial successor");
208 mc_initial_pair = new_pair(init_snapshot, initial_graph_state, transition_succ->dst);
209 xbt_dynar_push(elses, &mc_initial_pair);
211 //XBT_DEBUG("New initial successor");
220 if(xbt_dynar_length(successors) > 0){
223 xbt_dynar_foreach(successors, cursor, pair_succ){
226 xbt_fifo_unshift(mc_snapshot_stack, pair_succ);
228 XBT_DEBUG("**************************************************");
229 XBT_DEBUG("Initial state=%p ", pair_succ);
233 set_pair_visited(pair_succ->graph_state, pair_succ->automaton_state, 0);
237 if(pair_succ->automaton_state->type == 1){
238 set_pair_reached(pair_succ->graph_state, pair_succ->automaton_state);
243 if(pair_succ->automaton_state->type == 1){
248 /* if(cursor == 0) */
249 /* MC_dfs(a, 0, 0); */
251 /* MC_dfs(a, 0, 1); */
257 if(xbt_dynar_length(elses) > 0){
259 xbt_dynar_foreach(elses, cursor, pair_succ){
262 xbt_fifo_unshift(mc_snapshot_stack, pair_succ);
264 XBT_DEBUG("**************************************************");
265 XBT_DEBUG("Initial state=%p ", pair_succ);
269 set_pair_visited(pair_succ->graph_state, pair_succ->automaton_state, 0);
273 if(pair_succ->automaton_state->type == 1){
274 set_pair_reached(pair_succ->graph_state, pair_succ->automaton_state);
279 if(pair_succ->automaton_state->type == 1){
284 /* if(cursor == 0) */
285 /* MC_dfs(a, 0, 0); */
287 /* MC_dfs(a, 0, 1); */
296 void MC_dfs(xbt_automaton_t a, int search_cycle, int restore){
298 smx_process_t process = NULL;
301 if(xbt_fifo_size(mc_snapshot_stack) == 0)
305 MC_restore_snapshot(((mc_pairs_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_snapshot_stack)))->system_state);
309 //XBT_DEBUG("Lpv length after restore snapshot: %lu", xbt_dynar_length(visited_pairs));
311 /* Get current state */
312 mc_pairs_t current_pair = (mc_pairs_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_snapshot_stack));
315 xbt_swag_foreach(process, simix_global->process_list){
316 if(MC_process_is_enabled(process)){
317 //XBT_DEBUG("Pid : %lu", process->pid);
318 MC_state_interleave_process(current_pair->graph_state, process);
323 XBT_DEBUG("************************************************** ( search_cycle = %d )", search_cycle);
324 XBT_DEBUG("State : 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));
325 //XBT_DEBUG("Restore : %d", restore);
327 //XBT_DEBUG("Reached pairs : %lu", xbt_dynar_length(reached_pairs));
332 mc_state_t next_graph_state = NULL;
333 smx_req_t req = NULL;
336 mc_pairs_t pair_succ;
337 xbt_transition_t transition_succ;
340 //int enabled_transition = 0;
342 xbt_dynar_t successors = xbt_dynar_new(sizeof(mc_pairs_t), NULL);
344 mc_pairs_t next_pair;
345 mc_snapshot_t next_snapshot;
346 mc_snapshot_t current_snapshot;
349 while((req = MC_state_get_request(current_pair->graph_state, &value)) != NULL){
352 current_snapshot = xbt_new0(s_mc_snapshot_t, 1);
353 MC_take_snapshot(current_snapshot);
357 /* Debug information */
358 if(XBT_LOG_ISENABLED(mc_dfs, xbt_log_priority_debug)){
359 req_str = MC_request_to_string(req, value);
360 XBT_DEBUG("Execute: %s", req_str);
364 MC_state_set_executed_request(current_pair->graph_state, req, value);
365 //mc_stats->executed_transitions++;
367 /* Answer the request */
368 SIMIX_request_pre(req, value);
370 /* Wait for requests (schedules processes) */
371 MC_wait_for_requests();
374 /* Create the new expanded graph_state */
377 next_graph_state = MC_state_new();
379 /* Get enabled process and insert it in the interleave set of the next graph_state */
380 xbt_swag_foreach(process, simix_global->process_list){
381 if(MC_process_is_enabled(process)){
382 //XBT_DEBUG("Pid : %lu", process->pid);
383 MC_state_interleave_process(next_graph_state, process);
387 next_snapshot = xbt_new0(s_mc_snapshot_t, 1);
388 MC_take_snapshot(next_snapshot);
392 xbt_dynar_reset(successors);
395 xbt_dynar_foreach(current_pair->automaton_state->out, cursor, transition_succ){
397 res = MC_automaton_evaluate_label(a, transition_succ->label);
400 next_pair = new_pair(next_snapshot,next_graph_state, transition_succ->dst);
402 //XBT_DEBUG("Next pair : %p", next_pair);
404 if((res == 1) || (res == 2)){ // enabled transition in automaton
405 xbt_dynar_push(successors, &next_pair);
412 if(xbt_dynar_length(successors) == 0){
415 next_pair = new_pair(next_snapshot, next_graph_state, current_pair->automaton_state);
416 xbt_dynar_push(successors, &next_pair);
421 // XBT_DEBUG("Successors length : %lu", xbt_dynar_length(successors));
422 //XBT_DEBUG("Elses length : %lu", xbt_dynar_length(elses));
424 if(xbt_dynar_length(successors) >0){
427 xbt_dynar_foreach(successors, cursor, pair_succ){
429 //XBT_DEBUG("Search visited pair : graph=%p, automaton=%p", pair_succ->graph_state, pair_succ->automaton_state);
431 if((search_cycle == 1) && (reached(pair_succ->graph_state, pair_succ->automaton_state) == 1)){
432 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
433 XBT_INFO("| ACCEPTANCE CYCLE |");
434 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
435 XBT_INFO("Counter-example that violates formula :");
436 MC_show_snapshot_stack(mc_snapshot_stack);
437 MC_dump_snapshot_stack(mc_snapshot_stack);
441 if(visited(pair_succ->graph_state, pair_succ->automaton_state, search_cycle) == 0){
443 //XBT_DEBUG("Unvisited pair !");
446 xbt_fifo_unshift(mc_snapshot_stack, pair_succ);
449 set_pair_visited(pair_succ->graph_state, pair_succ->automaton_state, search_cycle);
450 MC_dfs(a, search_cycle, 0);
452 if((search_cycle == 0) && (current_pair->automaton_state->type == 1)){
454 MC_restore_snapshot(current_pair->system_state);
457 xbt_swag_foreach(process, simix_global->process_list){
458 if(MC_process_is_enabled(process)){
459 //XBT_DEBUG("Pid : %lu", process->pid);
460 MC_state_interleave_process(current_pair->graph_state, process);
464 set_pair_reached(current_pair->graph_state, current_pair->automaton_state);
465 XBT_DEBUG("Acceptance pair : graph=%p, automaton=%p(%s)", current_pair->graph_state, current_pair->automaton_state, current_pair->automaton_state->id);
475 if(MC_state_interleave_size(current_pair->graph_state) > 0){
476 MC_restore_snapshot(current_snapshot);
478 //XBT_DEBUG("Snapshot restored");
484 //remove_pair_reached(current_pair->graph_state);
485 xbt_fifo_shift(mc_snapshot_stack);
486 XBT_DEBUG("State (graph=%p, automaton =%p) shifted in snapshot_stack", current_pair->graph_state, current_pair->automaton_state);
491 void MC_show_snapshot_stack(xbt_fifo_t stack){
494 xbt_fifo_item_t item;
496 char *req_str = NULL;
498 for (item = xbt_fifo_get_last_item(stack);
499 (item ? (pair = (mc_pairs_t) (xbt_fifo_get_item_content(item)))
500 : (NULL)); item = xbt_fifo_get_prev_item(item)) {
501 req = MC_state_get_executed_request(pair->graph_state, &value);
503 req_str = MC_request_to_string(req, value);
504 XBT_INFO("%s", req_str);
510 void MC_dump_snapshot_stack(xbt_fifo_t stack){
514 while ((pair = (mc_pairs_t) xbt_fifo_pop(stack)) != NULL)
515 MC_pair_delete(pair);
519 void MC_pair_delete(mc_pairs_t pair){
520 xbt_free(pair->graph_state->proc_status);
521 xbt_free(pair->graph_state);
522 //xbt_free(pair->automaton_state); -> FIXME : à implémenter
527 int MC_automaton_evaluate_label(xbt_automaton_t a, xbt_exp_label_t l){
531 int left_res = MC_automaton_evaluate_label(a, l->u.or_and.left_exp);
532 int right_res = MC_automaton_evaluate_label(a, l->u.or_and.right_exp);
533 return (left_res || right_res);
537 int left_res = MC_automaton_evaluate_label(a, l->u.or_and.left_exp);
538 int right_res = MC_automaton_evaluate_label(a, l->u.or_and.right_exp);
539 return (left_res && right_res);
543 int res = MC_automaton_evaluate_label(a, l->u.exp_not);
548 unsigned int cursor = 0;
549 xbt_propositional_symbol_t p = NULL;
550 xbt_dynar_foreach(a->propositional_symbols, cursor, p){
551 if(strcmp(p->pred, l->u.predicat) == 0){
552 int (*f)() = p->function;
568 /*void MC_dfs(xbt_automaton_t a, int search_cycle){
570 xbt_state_t current_state = (xbt_state_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(stack_automaton_dfs));
571 xbt_transition_t transition_succ = NULL;
572 xbt_state_t successor = NULL;
573 unsigned int cursor = 0;
574 xbt_dynar_t elses = xbt_dynar_new(sizeof(xbt_transition_t), NULL);
577 //printf("++ current state : %s\n", current_state->id);
579 xbt_dynar_foreach(current_state->out, cursor, transition_succ){
580 successor = transition_succ->dst;
581 res = MC_automaton_evaluate_label(a, transition_succ->label);
582 //printf("-- state : %s, transition_label : %d, res = %d\n", successor->id, transition_succ->label->type, res);
584 if(search_cycle == 1 && reached_dfs != NULL){
585 if(strcmp(reached_dfs->id, successor->id) == 0){
586 xbt_dynar_push(state_automaton_visited_dfs, &successor);
587 printf("\n-*-*-*-*-*-*- ACCEPTANCE CYCLE -*-*-*-*-*-*-\n");
588 printf("Visited states : \n");
589 unsigned int cursor2 = 0;
590 xbt_state_t visited_state = NULL;
591 xbt_dynar_foreach(state_automaton_visited_dfs, cursor2, visited_state){
592 printf("State : %s\n", visited_state->id);
597 if(successor->visited == 0){
598 successor->visited = 1;
599 xbt_fifo_unshift(stack_automaton_dfs, successor);
600 xbt_dynar_push(state_automaton_visited_dfs, &successor);
601 MC_dfs(a, search_cycle);
602 if(search_cycle == 0 && successor->type == 1){
603 reached_dfs = successor;
609 xbt_dynar_push(elses,&transition_succ);
615 xbt_dynar_foreach(elses, cursor, transition_succ){
616 successor = transition_succ->dst;
617 if(search_cycle == 1 && reached_dfs != NULL){
618 if(strcmp(reached_dfs->id, successor->id) == 0){
619 xbt_dynar_push(state_automaton_visited_dfs, &successor);
620 printf("\n-*-*-*-*-*-*- ACCEPTANCE CYCLE -*-*-*-*-*-*-\n");
621 printf("Visited states : \n");
622 unsigned int cursor2 = 0;
623 xbt_state_t visited_state = NULL;
624 xbt_dynar_foreach(state_automaton_visited_dfs, cursor2, visited_state){
625 printf("State : %s\n", visited_state->id);
630 if(successor->visited == 0){
631 successor->visited = 1;
632 xbt_fifo_unshift(stack_automaton_dfs, successor);
633 xbt_dynar_push(state_automaton_visited_dfs, &successor);
634 MC_dfs(a, search_cycle);
635 if(search_cycle == 0 && successor->type == 1){
636 reached_dfs = successor;
642 xbt_fifo_shift(stack_automaton_dfs);
646 /* void MC_dfs(xbt_automaton_t a, int search_cycle, int restore){ */
649 /* if(xbt_fifo_size(mc_snapshot_stack) == 0) */
652 /* if(restore == 1){ */
653 /* MC_restore_snapshot(((mc_pairs_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_snapshot_stack)))->system_state); */
654 /* MC_UNSET_RAW_MEM; */
658 /* //XBT_DEBUG("Lpv length after restore snapshot: %lu", xbt_dynar_length(visited_pairs)); */
660 /* /\* Get current state *\/ */
661 /* mc_pairs_t current_pair = (mc_pairs_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_snapshot_stack)); */
663 /* XBT_DEBUG("************************************************** ( search_cycle = %d )", search_cycle); */
664 /* XBT_DEBUG("State : 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)); */
666 /* //XBT_DEBUG("Reached pairs : %lu", xbt_dynar_length(reached_pairs)); */
670 /* smx_process_t process = NULL; */
672 /* mc_state_t next_graph_state = NULL; */
673 /* smx_req_t req = NULL; */
676 /* mc_pairs_t pair_succ; */
677 /* xbt_transition_t transition_succ; */
678 /* unsigned int cursor; */
680 /* //int enabled_transition = 0; */
682 /* xbt_dynar_t elses = xbt_dynar_new(sizeof(mc_pairs_t), NULL); */
683 /* xbt_dynar_t successors = xbt_dynar_new(sizeof(mc_pairs_t), NULL); */
684 /* xbt_dynar_reset(all_successors); */
686 /* mc_pairs_t next_pair; */
687 /* mc_snapshot_t next_snapshot; */
688 /* mc_snapshot_t current_snapshot; */
690 /* while((req = MC_state_get_request(current_pair->graph_state, &value)) != NULL){ */
692 /* //XBT_DEBUG("Current pair : %p (%u interleave)", current_pair, MC_state_interleave_size(current_pair->graph_state)+1); */
693 /* //XBT_DEBUG("Visited pairs : %lu", xbt_dynar_length(visited_pairs)); */
695 /* MC_SET_RAW_MEM; */
696 /* current_snapshot = xbt_new0(s_mc_snapshot_t, 1); */
697 /* MC_take_snapshot(current_snapshot); */
698 /* MC_UNSET_RAW_MEM; */
701 /* /\* Debug information *\/ */
702 /* if(XBT_LOG_ISENABLED(mc_dfs, xbt_log_priority_debug)){ */
703 /* req_str = MC_request_to_string(req, value); */
704 /* XBT_DEBUG("Execute: %s", req_str); */
705 /* xbt_free(req_str); */
708 /* MC_state_set_executed_request(current_pair->graph_state, req, value); */
709 /* //mc_stats->executed_transitions++; */
711 /* /\* Answer the request *\/ */
712 /* SIMIX_request_pre(req, value); */
714 /* /\* Wait for requests (schedules processes) *\/ */
715 /* MC_wait_for_requests(); */
718 /* /\* Create the new expanded graph_state *\/ */
719 /* MC_SET_RAW_MEM; */
721 /* next_graph_state = MC_state_new(); */
723 /* /\* Get enabled process and insert it in the interleave set of the next graph_state *\/ */
724 /* xbt_swag_foreach(process, simix_global->process_list){ */
725 /* if(MC_process_is_enabled(process)){ */
726 /* MC_state_interleave_process(next_graph_state, process); */
730 /* next_snapshot = xbt_new0(s_mc_snapshot_t, 1); */
731 /* MC_take_snapshot(next_snapshot); */
733 /* MC_UNSET_RAW_MEM; */
735 /* xbt_dynar_reset(elses); */
736 /* xbt_dynar_reset(successors); */
739 /* xbt_dynar_foreach(current_pair->automaton_state->out, cursor, transition_succ){ */
741 /* res = MC_automaton_evaluate_label(a, transition_succ->label); */
743 /* MC_SET_RAW_MEM; */
744 /* next_pair = new_pair(next_snapshot,next_graph_state, transition_succ->dst); */
746 /* //XBT_DEBUG("Next pair : %p", next_pair); */
748 /* if(res == 1){ // enabled transition in automaton */
749 /* xbt_dynar_push(successors, &next_pair); */
750 /* //XBT_DEBUG("New Successors length : %lu", xbt_dynar_length(successors)); */
753 /* xbt_dynar_push(elses, &next_pair); */
754 /* //XBT_DEBUG("New Elses length : %lu", xbt_dynar_length(elses)); */
758 /* MC_UNSET_RAW_MEM; */
762 /* if((xbt_dynar_length(successors) == 0) && (xbt_dynar_length(elses) == 0) ){ */
764 /* MC_SET_RAW_MEM; */
765 /* next_pair = new_pair(next_snapshot, next_graph_state, current_pair->automaton_state); */
766 /* xbt_dynar_push(successors, &next_pair); */
767 /* MC_UNSET_RAW_MEM; */
771 /* //XBT_DEBUG("Successors length : %lu", xbt_dynar_length(successors)); */
772 /* //XBT_DEBUG("Elses length : %lu", xbt_dynar_length(elses)); */
774 /* if(xbt_dynar_length(successors) > 0){ */
777 /* xbt_dynar_foreach(successors, cursor, pair_succ){ */
778 /* MC_SET_RAW_MEM; */
779 /* xbt_dynar_push(all_successors, &pair_succ); */
780 /* MC_UNSET_RAW_MEM; */
786 /* xbt_dynar_foreach(elses, cursor, pair_succ){ */
787 /* MC_SET_RAW_MEM; */
788 /* xbt_dynar_push(all_successors, &pair_succ); */
789 /* MC_UNSET_RAW_MEM; */
794 /* MC_restore_snapshot(current_snapshot); */
795 /* MC_UNSET_RAW_MEM; */
799 /* //XBT_DEBUG("All successors : %lu", xbt_dynar_length(all_successors)); */
803 /* xbt_dynar_foreach(all_successors, cursor, pair_succ){ */
805 /* if((search_cycle == 1) && (reached(pair_succ->graph_state, pair_succ->automaton_state) == 1)){ */
806 /* XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*"); */
807 /* XBT_INFO("| ACCEPTANCE CYCLE |"); */
808 /* XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*"); */
809 /* XBT_INFO("Counter-example that violates formula :"); */
810 /* MC_show_snapshot_stack(mc_snapshot_stack); */
811 /* MC_dump_snapshot_stack(mc_snapshot_stack); */
815 /* if(visited(pair_succ->graph_state, pair_succ->automaton_state, search_cycle) == 0){ */
817 /* //XBT_DEBUG("New pair in stack"); */
819 /* MC_SET_RAW_MEM; */
820 /* xbt_fifo_unshift(mc_snapshot_stack, pair_succ); */
821 /* MC_UNSET_RAW_MEM; */
823 /* set_pair_visited(pair_succ->graph_state, pair_succ->automaton_state, search_cycle); */
824 /* MC_dfs(a, search_cycle, 1); */
826 /* if((search_cycle == 0) && (pair_succ->automaton_state->type == 1)){ */
828 /* set_pair_reached(pair_succ->graph_state, pair_succ->automaton_state); */
829 /* XBT_DEBUG("Acceptance pair : graph=%p, automaton=%p(%s)", pair_succ->graph_state, pair_succ->automaton_state, pair_succ->automaton_state->id); */
830 /* MC_dfs(a, 1, 1); */
837 /* MC_SET_RAW_MEM; */
838 /* //remove_pair_reached(current_pair->graph_state); */
839 /* xbt_fifo_shift(mc_snapshot_stack); */
840 /* XBT_DEBUG("State (graph=%p, automaton =%p) shifted in snapshot_stack", current_pair->graph_state, current_pair->automaton_state); */
841 /* MC_UNSET_RAW_MEM; */