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;
8 xbt_dynar_t reached_pairs;
9 xbt_dynar_t successors = NULL;
10 extern mc_snapshot_t initial_snapshot;
12 /* Global variables for stateless algorithm */
13 mc_snapshot_t snapshot = NULL;
15 /* Global variables for stateful algorithm */
16 mc_snapshot_t next_snapshot = NULL;
17 mc_snapshot_t current_snapshot = NULL;
20 int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2){
22 if(s1->num_reg != s2->num_reg)
27 for(i=0 ; i< s1->num_reg ; i++){
29 if(s1->regions[i]->size != s2->regions[i]->size)
32 if(s1->regions[i]->start_addr != s2->regions[i]->start_addr)
35 if(s1->regions[i]->type != s2->regions[i]->type)
38 if(s1->regions[i]->type == 0){
39 if(mmalloc_compare_heap(s1->regions[i]->start_addr, s2->regions[i]->start_addr)){
40 XBT_DEBUG("Different heap (mmalloc_compare)");
45 if(memcmp(s1->regions[i]->data, s2->regions[i]->data, s1->regions[i]->size) != 0){
46 XBT_DEBUG("Different memcmp for data in libsimgrid");
59 int reached(xbt_automaton_t a, xbt_state_t st, mc_snapshot_t s){
62 if(xbt_dynar_is_empty(reached_pairs)){
67 xbt_dynar_t prop_ato = xbt_dynar_new(sizeof(int), NULL);
69 /* Get values of propositional symbols */
70 unsigned int cursor = 0;
71 xbt_propositional_symbol_t ps = NULL;
72 xbt_dynar_foreach(a->propositional_symbols, cursor, ps){
73 int (*f)() = ps->function;
75 xbt_dynar_push_as(prop_ato, int, res);
79 mc_pair_reached_t pair_test;
81 xbt_dynar_foreach(reached_pairs, cursor, pair_test){
82 if(automaton_state_compare(pair_test->automaton_state, st) == 0){
83 if(propositional_symbols_compare_value(pair_test->prop_ato, prop_ato) == 0){
84 if(snapshot_compare(pair_test->system_state, s) == 0){
98 void set_pair_reached(xbt_automaton_t a, xbt_state_t st, mc_snapshot_t sn){
103 mc_pair_reached_t pair = NULL;
104 pair = xbt_new0(s_mc_pair_reached_t, 1);
105 pair->automaton_state = st;
106 pair->prop_ato = xbt_dynar_new(sizeof(int), NULL);
107 pair->system_state = sn;
109 /* Get values of propositional symbols */
110 unsigned int cursor = 0;
111 xbt_propositional_symbol_t ps = NULL;
112 xbt_dynar_foreach(a->propositional_symbols, cursor, ps){
113 int (*f)() = ps->function;
115 xbt_dynar_push_as(pair->prop_ato, int, res);
118 xbt_dynar_push(reached_pairs, &pair);
125 void MC_pair_delete(mc_pair_t pair){
126 xbt_free(pair->graph_state->proc_status);
127 xbt_free(pair->graph_state);
128 //xbt_free(pair->automaton_state); -> FIXME : à implémenter
134 int MC_automaton_evaluate_label(xbt_automaton_t a, xbt_exp_label_t l){
138 int left_res = MC_automaton_evaluate_label(a, l->u.or_and.left_exp);
139 int right_res = MC_automaton_evaluate_label(a, l->u.or_and.right_exp);
140 return (left_res || right_res);
144 int left_res = MC_automaton_evaluate_label(a, l->u.or_and.left_exp);
145 int right_res = MC_automaton_evaluate_label(a, l->u.or_and.right_exp);
146 return (left_res && right_res);
150 int res = MC_automaton_evaluate_label(a, l->u.exp_not);
155 unsigned int cursor = 0;
156 xbt_propositional_symbol_t p = NULL;
157 xbt_dynar_foreach(a->propositional_symbols, cursor, p){
158 if(strcmp(p->pred, l->u.predicat) == 0){
159 int (*f)() = p->function;
179 /********************* Double-DFS stateless *******************/
181 void MC_pair_stateless_delete(mc_pair_stateless_t pair){
182 xbt_free(pair->graph_state->proc_status);
183 xbt_free(pair->graph_state);
184 //xbt_free(pair->automaton_state); -> FIXME : à implémenter
188 mc_pair_stateless_t new_pair_stateless(mc_state_t sg, xbt_state_t st, int r){
189 mc_pair_stateless_t p = NULL;
190 p = xbt_new0(s_mc_pair_stateless_t, 1);
191 p->automaton_state = st;
194 mc_stats_pair->expanded_pairs++;
200 void MC_ddfs_stateless_init(xbt_automaton_t a){
202 XBT_DEBUG("**************************************************");
203 XBT_DEBUG("Double-DFS stateless init");
204 XBT_DEBUG("**************************************************");
206 mc_pair_stateless_t mc_initial_pair = NULL;
207 mc_state_t initial_graph_state = NULL;
208 smx_process_t process;
210 MC_wait_for_requests();
214 initial_graph_state = MC_state_pair_new();
215 xbt_swag_foreach(process, simix_global->process_list){
216 if(MC_process_is_enabled(process)){
217 MC_state_interleave_process(initial_graph_state, process);
221 reached_pairs = xbt_dynar_new(sizeof(mc_pair_reached_t), NULL);
222 successors = xbt_dynar_new(sizeof(mc_pair_stateless_t), NULL);
223 snapshot = xbt_new0(s_mc_snapshot_t, 1);
225 initial_snapshot = xbt_new0(s_mc_snapshot_t, 1);
226 MC_take_snapshot(initial_snapshot);
230 unsigned int cursor = 0;
233 xbt_dynar_foreach(a->states, cursor, state){
234 if(state->type == -1){
237 mc_initial_pair = new_pair_stateless(initial_graph_state, state, MC_state_interleave_size(initial_graph_state));
238 xbt_fifo_unshift(mc_stack_liveness_stateless, mc_initial_pair);
242 MC_ddfs_stateless(a, 0, 0);
244 MC_restore_snapshot(initial_snapshot);
246 MC_ddfs_stateless(a, 0, 0);
249 if(state->type == 2){
252 mc_initial_pair = new_pair_stateless(initial_graph_state, state, MC_state_interleave_size(initial_graph_state));
253 xbt_fifo_unshift(mc_stack_liveness_stateless, mc_initial_pair);
257 MC_ddfs_stateless(a, 1, 0);
259 MC_restore_snapshot(initial_snapshot);
261 MC_ddfs_stateless(a, 1, 0);
270 void MC_ddfs_stateless(xbt_automaton_t a, int search_cycle, int replay){
272 smx_process_t process;
273 mc_pair_stateless_t current_pair = NULL;
275 if(xbt_fifo_size(mc_stack_liveness_stateless) == 0)
279 MC_replay_liveness(mc_stack_liveness_stateless, 0);
280 current_pair = (mc_pair_stateless_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_stack_liveness_stateless));
281 xbt_swag_foreach(process, simix_global->process_list){
282 if(MC_process_is_enabled(process)){
283 MC_state_interleave_process(current_pair->graph_state, process);
288 /* Get current pair */
289 current_pair = (mc_pair_stateless_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_stack_liveness_stateless));
291 /* Update current state in buchi automaton */
292 a->current_state = current_pair->automaton_state;
295 XBT_DEBUG("********************* ( Depth = %d, search_cycle = %d )", xbt_fifo_size(mc_stack_liveness_stateless), search_cycle);
296 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));
299 mc_stats_pair->visited_pairs++;
302 mc_state_t next_graph_state = NULL;
303 smx_req_t req = NULL;
306 xbt_transition_t transition_succ;
307 unsigned int cursor = 0;
310 mc_pair_stateless_t next_pair = NULL;
311 mc_pair_stateless_t pair_succ;
314 if(current_pair->requests > 0){
316 while((req = MC_state_get_request(current_pair->graph_state, &value)) != NULL && (xbt_fifo_size(mc_stack_liveness_stateless) < MAX_DEPTH_LIVENESS)){
319 /* Debug information */
320 if(XBT_LOG_ISENABLED(mc_liveness, xbt_log_priority_debug)){
321 req_str = MC_request_to_string(req, value);
322 XBT_DEBUG("Execute: %s", req_str);
328 MC_state_set_executed_request(current_pair->graph_state, req, value);
330 /* Answer the request */
331 SIMIX_request_pre(req, value);
333 /* Wait for requests (schedules processes) */
334 MC_wait_for_requests();
339 /* Create the new expanded graph_state */
340 next_graph_state = MC_state_pair_new();
342 /* Get enabled process and insert it in the interleave set of the next graph_state */
343 xbt_swag_foreach(process, simix_global->process_list){
344 if(MC_process_is_enabled(process)){
345 MC_state_interleave_process(next_graph_state, process);
349 xbt_dynar_reset(successors);
355 xbt_dynar_foreach(current_pair->automaton_state->out, cursor, transition_succ){
357 res = MC_automaton_evaluate_label(a, transition_succ->label);
359 if(res == 1){ // enabled transition in automaton
361 next_pair = new_pair_stateless(next_graph_state, transition_succ->dst, MC_state_interleave_size(next_graph_state));
362 xbt_dynar_push(successors, &next_pair);
370 xbt_dynar_foreach(current_pair->automaton_state->out, cursor, transition_succ){
372 res = MC_automaton_evaluate_label(a, transition_succ->label);
374 if(res == 2){ // true transition in automaton
376 next_pair = new_pair_stateless(next_graph_state, transition_succ->dst, MC_state_interleave_size(next_graph_state));
377 xbt_dynar_push(successors, &next_pair);
384 if(xbt_dynar_length(successors) == 0){
386 next_pair = new_pair_stateless(next_graph_state, current_pair->automaton_state, MC_state_interleave_size(next_graph_state));
387 xbt_dynar_push(successors, &next_pair);
392 MC_take_snapshot(snapshot);
397 xbt_dynar_foreach(successors, cursor, pair_succ){
399 if((search_cycle == 1) && ((pair_succ->automaton_state->type == 1) || (pair_succ->automaton_state->type == 2)) ){
402 MC_take_snapshot(snapshot);
405 if(reached(a, pair_succ->automaton_state, snapshot) == 1){
407 XBT_DEBUG("Next pair (depth = %d) already reached !", xbt_fifo_size(mc_stack_liveness_stateless) + 1);
409 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
410 XBT_INFO("| ACCEPTANCE CYCLE |");
411 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
412 XBT_INFO("Counter-example that violates formula :");
413 MC_show_stack_liveness_stateless(mc_stack_liveness_stateless);
414 MC_dump_stack_liveness_stateless(mc_stack_liveness_stateless);
415 MC_print_statistics_pairs(mc_stats_pair);
422 xbt_fifo_unshift(mc_stack_liveness_stateless, pair_succ);
425 if(xbt_fifo_size(mc_stack_liveness_stateless) == MAX_DEPTH_LIVENESS){
426 XBT_DEBUG("Maximum depth reached");
429 MC_ddfs_stateless(a, search_cycle, 0);
432 if((search_cycle == 0) && ((pair_succ->automaton_state->type == 1) || (pair_succ->automaton_state->type == 2)) && (xbt_fifo_size(mc_stack_liveness_stateless) < (MAX_DEPTH_LIVENESS - 1))){
434 XBT_DEBUG("Acceptance pair : graph=%p, automaton=%p(%s)", pair_succ->graph_state, pair_succ->automaton_state, pair_succ->automaton_state->id);
436 /* Pair shifted from stack when first MC_ddfs finished and returned at this point */
438 xbt_fifo_unshift(mc_stack_liveness_stateless, pair_succ);
441 /* Restore system before starting detection of acceptance cycle */
442 MC_replay_liveness(mc_stack_liveness_stateless, 0);
445 MC_take_snapshot(snapshot);
448 set_pair_reached(a, pair_succ->automaton_state, snapshot);
450 XBT_DEBUG("Detection of acceptance cycle enabled");
452 MC_ddfs_stateless(a, 1, 1);
454 /* No acceptance cycle with this acceptance pair, we remove it from the list reached_pairs */
456 xbt_dynar_pop(reached_pairs, NULL);
461 /* Restore system before checking others successors */
462 MC_replay_liveness(mc_stack_liveness_stateless, 1);
466 if(xbt_dynar_is_empty(successors)){
467 XBT_DEBUG("Backtracking to depth %u", xbt_fifo_size(mc_stack_liveness_stateless));
468 MC_replay_liveness(mc_stack_liveness_stateless, 0);
474 }else{ /*No request to execute, search evolution in Büchi automaton */
476 if((xbt_fifo_size(mc_stack_liveness_stateless) < MAX_DEPTH_LIVENESS)){
480 /* Create the new expanded graph_state */
481 next_graph_state = MC_state_pair_new();
483 xbt_dynar_reset(successors);
489 xbt_dynar_foreach(current_pair->automaton_state->out, cursor, transition_succ){
491 res = MC_automaton_evaluate_label(a, transition_succ->label);
493 if(res == 1){ // enabled transition in automaton
495 next_pair = new_pair_stateless(next_graph_state, transition_succ->dst, MC_state_interleave_size(next_graph_state));
496 xbt_dynar_push(successors, &next_pair);
504 xbt_dynar_foreach(current_pair->automaton_state->out, cursor, transition_succ){
506 res = MC_automaton_evaluate_label(a, transition_succ->label);
508 if(res == 2){ // true transition in automaton
510 next_pair = new_pair_stateless(next_graph_state, transition_succ->dst, MC_state_interleave_size(next_graph_state));
511 xbt_dynar_push(successors, &next_pair);
518 if(xbt_dynar_length(successors) == 0){
520 next_pair = new_pair_stateless(next_graph_state, current_pair->automaton_state, MC_state_interleave_size(next_graph_state));
521 xbt_dynar_push(successors, &next_pair);
527 xbt_dynar_foreach(successors, cursor, pair_succ){
529 if((search_cycle == 1) && ((pair_succ->automaton_state->type == 1) || (pair_succ->automaton_state->type == 2)) ){
532 MC_take_snapshot(snapshot);
535 if(reached(a, pair_succ->automaton_state, snapshot) == 1){
537 XBT_DEBUG("Next pair (depth = %d) already reached !", xbt_fifo_size(mc_stack_liveness_stateless) + 1);
539 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
540 XBT_INFO("| ACCEPTANCE CYCLE |");
541 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
542 XBT_INFO("Counter-example that violates formula :");
543 MC_show_stack_liveness_stateless(mc_stack_liveness_stateless);
544 MC_dump_stack_liveness_stateless(mc_stack_liveness_stateless);
545 MC_print_statistics_pairs(mc_stats_pair);
551 xbt_fifo_unshift(mc_stack_liveness_stateless, pair_succ);
554 MC_ddfs_stateless(a, search_cycle, 0);
557 if((search_cycle == 0) && ((pair_succ->automaton_state->type == 1) || (pair_succ->automaton_state->type == 2)) && (xbt_fifo_size(mc_stack_liveness_stateless) < (MAX_DEPTH_LIVENESS - 1))){
559 XBT_DEBUG("Acceptance pair : graph=%p, automaton=%p(%s)", pair_succ->graph_state, pair_succ->automaton_state, pair_succ->automaton_state->id);
561 /* Restore system before taking snapshot of system */
562 MC_replay_liveness(mc_stack_liveness_stateless, 0);
565 MC_take_snapshot(snapshot);
568 set_pair_reached(a, pair_succ->automaton_state, snapshot);
570 /* Pair shifted from stack when first MC_ddfs finished and returned at this point */
572 xbt_fifo_unshift(mc_stack_liveness_stateless, pair_succ);
575 XBT_DEBUG("Backtracking to depth %d, detection of acceptance cycle enabled", xbt_fifo_size(mc_stack_liveness_stateless));
577 MC_ddfs_stateless(a, 1, 1);
579 /* No acceptance cycle with this acceptance pair, we remove it from the list reached_pairs */
581 xbt_dynar_pop(reached_pairs, NULL);
586 /* Restore system before checking others successors */
587 MC_replay_liveness(mc_stack_liveness_stateless, 1);
595 if(xbt_fifo_size(mc_stack_liveness_stateless) == MAX_DEPTH_LIVENESS - 1){
596 XBT_DEBUG("Pair (graph=%p, automaton =%p, search_cycle = %u) shifted in stack, maximum depth reached", current_pair->graph_state, current_pair->automaton_state, search_cycle);
598 XBT_DEBUG("Pair (graph=%p, automaton =%p, search_cycle = %u) shifted in stack", current_pair->graph_state, current_pair->automaton_state, search_cycle);
600 xbt_fifo_shift(mc_stack_liveness_stateless);
605 /********************* Double-DFS stateful without visited state *******************/
607 mc_pair_t new_pair(mc_snapshot_t sn, mc_state_t sg, xbt_state_t st){
609 p = xbt_new0(s_mc_pair_t, 1);
610 p->system_state = sn;
611 p->automaton_state = st;
613 mc_stats_pair->expanded_pairs++;
618 void MC_ddfs_stateful_init(xbt_automaton_t a){
620 XBT_DEBUG("**************************************************");
621 XBT_DEBUG("Double-DFS stateful without visited state init");
622 XBT_DEBUG("**************************************************");
624 mc_pair_t mc_initial_pair;
625 mc_state_t initial_graph_state;
626 smx_process_t process;
627 mc_snapshot_t init_snapshot;
629 MC_wait_for_requests();
633 initial_graph_state = MC_state_pair_new();
634 xbt_swag_foreach(process, simix_global->process_list){
635 if(MC_process_is_enabled(process)){
636 MC_state_interleave_process(initial_graph_state, process);
640 reached_pairs = xbt_dynar_new(sizeof(mc_pair_reached_t), NULL);
641 successors = xbt_dynar_new(sizeof(mc_pair_t), NULL);
642 current_snapshot = xbt_new0(s_mc_snapshot_t, 1);
643 next_snapshot = xbt_new0(s_mc_snapshot_t, 1);
645 init_snapshot = xbt_new0(s_mc_snapshot_t, 1);
646 MC_take_snapshot(init_snapshot);
650 unsigned int cursor = 0;
651 xbt_state_t state = NULL;
653 xbt_dynar_foreach(a->states, cursor, state){
654 if(state->type == -1){
657 mc_initial_pair = new_pair(init_snapshot, initial_graph_state, state);
658 xbt_fifo_unshift(mc_stack_liveness_stateful, mc_initial_pair);
662 MC_ddfs_stateful(a, 0, 0);
664 MC_restore_snapshot(init_snapshot);
666 MC_ddfs_stateful(a, 0, 0);
669 if(state->type == 2){
672 mc_initial_pair = new_pair(init_snapshot, initial_graph_state, state);
673 xbt_fifo_unshift(mc_stack_liveness_stateful, mc_initial_pair);
677 MC_ddfs_stateful(a, 1, 0);
679 MC_restore_snapshot(init_snapshot);
681 MC_ddfs_stateful(a, 1, 0);
689 void MC_ddfs_stateful(xbt_automaton_t a, int search_cycle, int restore){
691 smx_process_t process = NULL;
692 mc_pair_t current_pair = NULL;
694 if(xbt_fifo_size(mc_stack_liveness_stateful) == 0)
698 current_pair = (mc_pair_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_stack_liveness_stateful));
699 MC_restore_snapshot(current_pair->system_state);
700 xbt_swag_foreach(process, simix_global->process_list){
701 if(MC_process_is_enabled(process)){
702 MC_state_interleave_process(current_pair->graph_state, process);
708 /* Get current state */
709 current_pair = (mc_pair_t)xbt_fifo_get_item_content(xbt_fifo_get_first_item(mc_stack_liveness_stateful));
712 XBT_DEBUG("********************* ( Depth = %d, search_cycle = %d )", xbt_fifo_size(mc_stack_liveness_stateful), search_cycle);
713 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));
715 a->current_state = current_pair->automaton_state;
719 mc_stats_pair->visited_pairs++;
722 mc_state_t next_graph_state = NULL;
723 smx_req_t req = NULL;
727 xbt_transition_t transition_succ;
731 mc_pair_t next_pair = NULL;
733 while((req = MC_state_get_request(current_pair->graph_state, &value)) != NULL){
736 MC_take_snapshot(current_snapshot);
739 /* Debug information */
740 if(XBT_LOG_ISENABLED(mc_liveness, xbt_log_priority_debug)){
741 req_str = MC_request_to_string(req, value);
742 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));
743 XBT_DEBUG("Execute: %s", req_str);
747 MC_state_set_executed_request(current_pair->graph_state, req, value);
749 /* Answer the request */
750 SIMIX_request_pre(req, value);
752 /* Wait for requests (schedules processes) */
753 MC_wait_for_requests();
756 /* Create the new expanded graph_state */
759 next_graph_state = MC_state_pair_new();
761 /* Get enabled process and insert it in the interleave set of the next graph_state */
762 xbt_swag_foreach(process, simix_global->process_list){
763 if(MC_process_is_enabled(process)){
764 MC_state_interleave_process(next_graph_state, process);
768 MC_take_snapshot(next_snapshot);
770 xbt_dynar_reset(successors);
776 xbt_dynar_foreach(current_pair->automaton_state->out, cursor, transition_succ){
778 res = MC_automaton_evaluate_label(a, transition_succ->label);
780 if(res == 1){ // enabled transition in automaton
782 next_pair = new_pair(next_snapshot,next_graph_state, transition_succ->dst);
783 xbt_dynar_push(successors, &next_pair);
790 xbt_dynar_foreach(current_pair->automaton_state->out, cursor, transition_succ){
792 res = MC_automaton_evaluate_label(a, transition_succ->label);
794 if(res == 2){ // transition always enabled in automaton
796 next_pair = new_pair(next_snapshot,next_graph_state, transition_succ->dst);
797 xbt_dynar_push(successors, &next_pair);
805 if(xbt_dynar_length(successors) == 0){
808 next_pair = new_pair(next_snapshot, next_graph_state, current_pair->automaton_state);
809 xbt_dynar_push(successors, &next_pair);
815 xbt_dynar_foreach(successors, cursor, pair_succ){
817 if((search_cycle == 1) && ((pair_succ->automaton_state->type == 1) || (pair_succ->automaton_state->type == 2))){
819 if(reached(a, pair_succ->automaton_state, next_snapshot) == 1){
820 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
821 XBT_INFO("| ACCEPTANCE CYCLE |");
822 XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
823 XBT_INFO("Counter-example that violates formula :");
824 MC_show_stack_liveness_stateful(mc_stack_liveness_stateful);
825 MC_dump_stack_liveness_stateful(mc_stack_liveness_stateful);
826 MC_print_statistics_pairs(mc_stats_pair);
833 xbt_fifo_unshift(mc_stack_liveness_stateful, pair_succ);
836 MC_ddfs_stateful(a, search_cycle, 0);
839 if((search_cycle == 0) && ((pair_succ->automaton_state->type == 1) || (pair_succ->automaton_state->type == 2))){
841 XBT_DEBUG("Acceptance pair : graph=%p, automaton=%p(%s)", pair_succ->graph_state, pair_succ->automaton_state, pair_succ->automaton_state->id);
842 set_pair_reached(a, pair_succ->automaton_state, next_snapshot);
845 xbt_fifo_unshift(mc_stack_liveness_stateful, pair_succ);
848 MC_ddfs_stateful(a, 1, 0);
852 xbt_dynar_pop(reached_pairs, NULL);
858 if(MC_state_interleave_size(current_pair->graph_state) > 0){
859 XBT_DEBUG("Backtracking to depth %u", xbt_fifo_size(mc_stack_liveness_stateful));
860 MC_restore_snapshot(current_snapshot);
868 xbt_fifo_shift(mc_stack_liveness_stateful);
869 XBT_DEBUG("Pair (graph=%p, automaton =%p) shifted in stack", current_pair->graph_state, current_pair->automaton_state);