/* Create the initial state and push it into the exploration stack */
MC_SET_RAW_MEM;
initial_state = MC_state_new();
/* Create the initial state and push it into the exploration stack */
MC_SET_RAW_MEM;
initial_state = MC_state_new();
XBT_DEBUG("**************************************************");
XBT_DEBUG("Exploration depth=%d (state=%p)(%u interleave)",
XBT_DEBUG("**************************************************");
XBT_DEBUG("Exploration depth=%d (state=%p)(%u interleave)",
/* If there are processes to interleave and the maximum depth has not been reached
then perform one step of the exploration algorithm */
/* If there are processes to interleave and the maximum depth has not been reached
then perform one step of the exploration algorithm */
/* Get an enabled process and insert it in the interleave set of the next state */
xbt_swag_foreach(process, simix_global->process_list){
/* Get an enabled process and insert it in the interleave set of the next state */
xbt_swag_foreach(process, simix_global->process_list){
(from it's predecesor state), depends on any other previous request
executed before it. If it does then add it to the interleave set of the
state that executed that previous request. */
(from it's predecesor state), depends on any other previous request
executed before it. If it does then add it to the interleave set of the
state that executed that previous request. */
- xbt_fifo_foreach(mc_stack, item, prev_state, mc_state_t) {
+ xbt_fifo_foreach(mc_stack_safety_stateless, item, prev_state, mc_state_t) {
if(MC_request_depend(req, MC_state_get_internal_request(prev_state))){
if(XBT_LOG_ISENABLED(mc_dpor, xbt_log_priority_debug)){
XBT_DEBUG("Dependent Transitions:");
if(MC_request_depend(req, MC_state_get_internal_request(prev_state))){
if(XBT_LOG_ISENABLED(mc_dpor, xbt_log_priority_debug)){
XBT_DEBUG("Dependent Transitions:");
}
if (MC_state_interleave_size(state)) {
/* We found a back-tracking point, let's loop */
}
if (MC_state_interleave_size(state)) {
/* We found a back-tracking point, let's loop */
- xbt_fifo_unshift(mc_stack, state);
- XBT_DEBUG("Back-tracking to depth %d", xbt_fifo_size(mc_stack));
+ xbt_fifo_unshift(mc_stack_safety_stateless, state);
+ XBT_DEBUG("Back-tracking to depth %d", xbt_fifo_size(mc_stack_safety_stateless));
mc_state_ws_t new_state_ws(mc_snapshot_t s, mc_state_t gs){
mc_state_ws_t sws = NULL;
mc_state_ws_t new_state_ws(mc_snapshot_t s, mc_state_t gs){
mc_state_ws_t sws = NULL;
MC_take_snapshot(initial_system_snapshot);
initial_state = new_state_ws(initial_system_snapshot, initial_graph_state);
MC_take_snapshot(initial_system_snapshot);
initial_state = new_state_ws(initial_system_snapshot, initial_graph_state);
- XBT_DEBUG("Depth : %d, State : %p , %u interleave", xbt_fifo_size(mc_snapshot_stack),current_state, MC_state_interleave_size(current_state->graph_state));
+ XBT_DEBUG("Depth : %d, State : %p , %u interleave", xbt_fifo_size(mc_stack_safety_stateful),current_state, MC_state_interleave_size(current_state->graph_state));
/* Debug information */
if(XBT_LOG_ISENABLED(mc_dpor, xbt_log_priority_debug)){
req_str = MC_request_to_string(req, value);
/* Debug information */
if(XBT_LOG_ISENABLED(mc_dpor, xbt_log_priority_debug)){
req_str = MC_request_to_string(req, value);
- XBT_DEBUG("Execute: %s", req_str);
+ //XBT_INFO("Visited states = %lu",mc_stats->visited_states );
+ XBT_DEBUG("Execute: %s",req_str);
MC_take_snapshot(next_snapshot);
next_state = new_state_ws(next_snapshot, next_graph_state);
MC_take_snapshot(next_snapshot);
next_state = new_state_ws(next_snapshot, next_graph_state);
- xbt_fifo_foreach(mc_snapshot_stack, item, prev_state, mc_state_ws_t) {
+ xbt_fifo_foreach(mc_stack_safety_stateful, item, prev_state, mc_state_ws_t) {
if(MC_request_depend(req, MC_state_get_internal_request(prev_state->graph_state))){
if(XBT_LOG_ISENABLED(mc_dpor, xbt_log_priority_debug)){
XBT_DEBUG("Dependent Transitions:");
if(MC_request_depend(req, MC_state_get_internal_request(prev_state->graph_state))){
if(XBT_LOG_ISENABLED(mc_dpor, xbt_log_priority_debug)){
XBT_DEBUG("Dependent Transitions:");
if(MC_state_interleave_size(current_state->graph_state)){
MC_restore_snapshot(current_state->system_state);
if(MC_state_interleave_size(current_state->graph_state)){
MC_restore_snapshot(current_state->system_state);
- xbt_fifo_unshift(mc_snapshot_stack, current_state);
- XBT_DEBUG("Back-tracking to depth %d", xbt_fifo_size(mc_snapshot_stack));
+ xbt_fifo_unshift(mc_stack_safety_stateful, current_state);
+ XBT_DEBUG("Back-tracking to depth %d", xbt_fifo_size(mc_stack_safety_stateful));
cursor = 0;
xbt_dynar_foreach(a->states, cursor, automaton_state){
if(automaton_state->type == -1){
cursor = 0;
xbt_dynar_foreach(a->states, cursor, automaton_state){
if(automaton_state->type == -1){
mc_prop_ato_t pa = new_proposition(ps->pred, val);
xbt_dynar_push(initial_pair->propositions, &pa);
}
mc_prop_ato_t pa = new_proposition(ps->pred, val);
xbt_dynar_push(initial_pair->propositions, &pa);
}
XBT_DEBUG("**************************************************");
XBT_DEBUG("Exploration depth=%d (pair=%p) (%d interleave)",
XBT_DEBUG("**************************************************");
XBT_DEBUG("Exploration depth=%d (pair=%p) (%d interleave)",
XBT_INFO("| ACCEPTANCE CYCLE |");
XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
XBT_INFO("Counter-example that violates formula :");
XBT_INFO("| ACCEPTANCE CYCLE |");
XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
XBT_INFO("Counter-example that violates formula :");
- MC_show_snapshot_stack(mc_snapshot_stack);
- MC_dump_snapshot_stack(mc_snapshot_stack);
+ MC_show_stack_liveness_stateful(mc_stack_liveness_stateful);
+ MC_dump_stack_liveness_stateful(mc_stack_liveness_stateful);
/* If there are processes to interleave and the maximum depth has not been reached
then perform one step of the exploration algorithm */
/* If there are processes to interleave and the maximum depth has not been reached
then perform one step of the exploration algorithm */
xbt_dynar_push(next_pair->propositions, &pa);
//XBT_DEBUG("%s : %d", pa->id, pa->value);
}
xbt_dynar_push(next_pair->propositions, &pa);
//XBT_DEBUG("%s : %d", pa->id, pa->value);
}
(from it's predecesor state), depends on any other previous request
executed before it. If it does then add it to the interleave set of the
state that executed that previous request. */
(from it's predecesor state), depends on any other previous request
executed before it. If it does then add it to the interleave set of the
state that executed that previous request. */
- xbt_fifo_foreach(mc_snapshot_stack, item, prev_pair, mc_pair_prop_t) {
+ xbt_fifo_foreach(mc_stack_liveness_stateful, item, prev_pair, mc_pair_prop_t) {
if(MC_request_depend(req, MC_state_get_internal_request(prev_pair->graph_state))){
if(XBT_LOG_ISENABLED(mc_dpor, xbt_log_priority_debug)){
XBT_DEBUG("Dependent Transitions:");
if(MC_request_depend(req, MC_state_get_internal_request(prev_pair->graph_state))){
if(XBT_LOG_ISENABLED(mc_dpor, xbt_log_priority_debug)){
XBT_DEBUG("Dependent Transitions:");
if (MC_state_interleave_size(pair->graph_state) > 0) {
/* We found a back-tracking point, let's loop */
MC_restore_snapshot(pair->system_state);
if (MC_state_interleave_size(pair->graph_state) > 0) {
/* We found a back-tracking point, let's loop */
MC_restore_snapshot(pair->system_state);
- xbt_fifo_unshift(mc_snapshot_stack, pair);
- XBT_DEBUG("Back-tracking to depth %d", xbt_fifo_size(mc_snapshot_stack));
+ xbt_fifo_unshift(mc_stack_liveness_stateful, pair);
+ XBT_DEBUG("Back-tracking to depth %d", xbt_fifo_size(mc_stack_liveness_stateful));
mc_prop_ato_t pa = new_proposition(ps->pred, val);
xbt_dynar_push(initial_pair->propositions, &pa);
}
mc_prop_ato_t pa = new_proposition(ps->pred, val);
xbt_dynar_push(initial_pair->propositions, &pa);
}
XBT_DEBUG("**************************************************");
XBT_DEBUG("Exploration depth=%d (pair=%p) (%d interleave)",
XBT_DEBUG("**************************************************");
XBT_DEBUG("Exploration depth=%d (pair=%p) (%d interleave)",
XBT_INFO("| ACCEPTANCE CYCLE |");
XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
XBT_INFO("Counter-example that violates formula :");
XBT_INFO("| ACCEPTANCE CYCLE |");
XBT_INFO("*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*");
XBT_INFO("Counter-example that violates formula :");
- MC_show_snapshot_stack(mc_snapshot_stack);
- MC_dump_snapshot_stack(mc_snapshot_stack);
+ MC_show_stack_liveness_stateful(mc_stack_liveness_stateful);
+ MC_dump_stack_liveness_stateful(mc_stack_liveness_stateful);
/* If there are processes to interleave and the maximum depth has not been reached
then perform one step of the exploration algorithm */
/* If there are processes to interleave and the maximum depth has not been reached
then perform one step of the exploration algorithm */
(req = MC_state_get_request(pair->graph_state, &value))) {
set_pair_prop_col_visited(pair, search_cycle);
(req = MC_state_get_request(pair->graph_state, &value))) {
set_pair_prop_col_visited(pair, search_cycle);
mc_prop_ato_t pa = new_proposition(ps->pred, val);
xbt_dynar_push(next_pair->propositions, &pa);
}
mc_prop_ato_t pa = new_proposition(ps->pred, val);
xbt_dynar_push(next_pair->propositions, &pa);
}
(from it's predecesor state), depends on any other previous request
executed before it. If it does then add it to the interleave set of the
state that executed that previous request. */
(from it's predecesor state), depends on any other previous request
executed before it. If it does then add it to the interleave set of the
state that executed that previous request. */
- xbt_fifo_foreach(mc_snapshot_stack, item, prev_pair, mc_pair_prop_col_t) {
+ xbt_fifo_foreach(mc_stack_liveness_stateful, item, prev_pair, mc_pair_prop_col_t) {
if(MC_request_depend(req, MC_state_get_internal_request(prev_pair->graph_state))){
if(XBT_LOG_ISENABLED(mc_dpor, xbt_log_priority_debug)){
XBT_DEBUG("Dependent Transitions:");
if(MC_request_depend(req, MC_state_get_internal_request(prev_pair->graph_state))){
if(XBT_LOG_ISENABLED(mc_dpor, xbt_log_priority_debug)){
XBT_DEBUG("Dependent Transitions:");
if (MC_state_interleave_size(pair->graph_state) > 0) {
/* We found a back-tracking point, let's loop */
MC_restore_snapshot(pair->system_state);
if (MC_state_interleave_size(pair->graph_state) > 0) {
/* We found a back-tracking point, let's loop */
MC_restore_snapshot(pair->system_state);
- xbt_fifo_unshift(mc_snapshot_stack, pair);
- XBT_DEBUG("Back-tracking to depth %d", xbt_fifo_size(mc_snapshot_stack));
+ xbt_fifo_unshift(mc_stack_liveness_stateful, pair);
+ XBT_DEBUG("Back-tracking to depth %d", xbt_fifo_size(mc_stack_liveness_stateful));