static int is_visited_state(){
- if(_surf_mc_visited == 0)
+ if(_sg_mc_visited == 0)
return 0;
int raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
}
}
- if(xbt_dynar_length(visited_states) == _surf_mc_visited){
+ if(xbt_dynar_length(visited_states) == _sg_mc_visited){
mc_snapshot_t state_to_remove = NULL;
xbt_dynar_shift(visited_states, &state_to_remove);
MC_free_snapshot(state_to_remove);
MC_wait_for_requests();
MC_SET_RAW_MEM;
-
- xbt_swag_foreach(process, simix_global->process_list){
- if(MC_process_is_enabled(process)){
- XBT_DEBUG("Process %lu enabled with simcall : %d", process->pid, (&process->simcall)->call);
- }
- }
-
+
/* Get an enabled process and insert it in the interleave set of the initial state */
xbt_swag_foreach(process, simix_global->process_list){
if(MC_process_is_enabled(process)){
MC_state_interleave_process(initial_state, process);
- break;
}
}
else
MC_UNSET_RAW_MEM;
-
- /* FIXME: Update Statistics
- mc_stats->state_size +=
- xbt_setset_set_size(initial_state->enabled_transitions); */
}
/* If there are processes to interleave and the maximum depth has not been reached
then perform one step of the exploration algorithm */
- if (xbt_fifo_size(mc_stack_safety) < _surf_mc_max_depth &&
+ if (xbt_fifo_size(mc_stack_safety) < _sg_mc_max_depth &&
(req = MC_state_get_request(state, &value))) {
/* Debug information */
xbt_swag_foreach(process, simix_global->process_list){
if(MC_process_is_enabled(process)){
MC_state_interleave_process(next_state, process);
- XBT_DEBUG("Process %lu enabled with simcall : %d", process->pid, (&process->simcall)->call);
}
}
- if(_surf_mc_checkpoint && ((xbt_fifo_size(mc_stack_safety) + 1) % _surf_mc_checkpoint == 0)){
+ if(_sg_mc_checkpoint && ((xbt_fifo_size(mc_stack_safety) + 1) % _sg_mc_checkpoint == 0)){
next_state->system_state = MC_take_snapshot();
}
/* The interleave set is empty or the maximum depth is reached, let's back-track */
} else {
- if(xbt_fifo_size(mc_stack_safety) == _surf_mc_max_depth){
-
+ if(xbt_fifo_size(mc_stack_safety) == _sg_mc_max_depth)
XBT_WARN("/!\\ Max depth reached ! /!\\ ");
- if(req != NULL){
- XBT_WARN("/!\\ But, there are still processes to interleave. Model-checker will not be able to ensure the soundness of the verification from now. /!\\ ");
- XBT_WARN("Notice : the default value of max depth is 1000 but you can change it with cfg=model-check/max_depth:value.");
- }
-
- }else{
-
+ else
XBT_DEBUG("There are no more processes to interleave.");
- }
-
/* Trash the current state, no longer needed */
MC_SET_RAW_MEM;
xbt_fifo_shift(mc_stack_safety);
break;
}else{
-
+
MC_state_remove_interleave_process(prev_state, req->issuer);
}
+
}
}
+
if (MC_state_interleave_size(state)) {
/* We found a back-tracking point, let's loop */
- if(_surf_mc_checkpoint){
+ if(_sg_mc_checkpoint){
if(state->system_state != NULL){
MC_restore_snapshot(state->system_state);
xbt_fifo_unshift(mc_stack_safety, state);