xbt_setset_set_insert(initial_state->interleave, trans);
MC_UNSET_RAW_MEM;
- trans->refcount++;
-
/* Update Statistics */
mc_stats->state_size += xbt_setset_set_size(initial_state->enabled_transitions);
}
xbt_setset_set_remove(mc_current_state->interleave, trans);
/* Add the transition in the done set of the current state */
xbt_setset_set_insert(mc_current_state->done, trans);
- trans->refcount++;
}
next_state = MC_state_new();
/* The interleave set is empty or the maximum depth is reached, let's back-track */
}else{
DEBUG0("There are no more transitions to interleave.");
-
+
+
+ /* Check for deadlocks */
+ xbt_setset_substract(mc_current_state->transitions, mc_current_state->done);
+ if(xbt_setset_set_size(mc_current_state->transitions) > 0){
+ INFO0("**************************");
+ INFO0("*** DEAD-LOCK DETECTED ***");
+ INFO0("**************************");
+ INFO0("Counter-example execution trace:");
+ MC_dump_stack(mc_stack);
+ MC_print_statistics(mc_stats);
+ xbt_abort();
+ }
+
mc_transition_t q = NULL;
xbt_fifo_item_t item = NULL;
mc_state_t state = NULL;