int reached(xbt_state_t st){
- raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
+ int raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
MC_SET_RAW_MEM;
new_pair->automaton_state = st;
new_pair->prop_ato = xbt_dynar_new(sizeof(int), NULL);
new_pair->comparison_times = new_comparison_times();
- new_pair->system_state = MC_take_snapshot_liveness();
+ new_pair->system_state = MC_take_snapshot();
/* Get values of propositional symbols */
int res;
void set_pair_reached(xbt_state_t st){
- raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
+ int raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
MC_SET_RAW_MEM;
pair->automaton_state = st;
pair->prop_ato = xbt_dynar_new(sizeof(int), NULL);
pair->comparison_times = new_comparison_times();
- pair->system_state = MC_take_snapshot_liveness();
+ pair->system_state = MC_take_snapshot();
/* Get values of propositional symbols */
unsigned int cursor = 0;
new_pair = xbt_new0(s_mc_pair_visited_t, 1);
new_pair->automaton_state = st;
new_pair->prop_ato = xbt_dynar_new(sizeof(int), NULL);
- new_pair->system_state = MC_take_snapshot_liveness();
+ new_pair->system_state = MC_take_snapshot();
/* Get values of propositional symbols */
int res;
if(pair){
pair->automaton_state = NULL;
xbt_dynar_free(&(pair->prop_ato));
+ if(pair->comparison_times != NULL){
+ xbt_dynar_free(&(pair->comparison_times->snapshot_comparison_times));
+ xbt_dynar_free(&(pair->comparison_times->chunks_used_comparison_times));
+ xbt_dynar_free(&(pair->comparison_times->stacks_sizes_comparison_times));
+ xbt_dynar_free(&(pair->comparison_times->program_data_segment_comparison_times));
+ xbt_dynar_free(&(pair->comparison_times->libsimgrid_data_segment_comparison_times));
+ xbt_dynar_free(&(pair->comparison_times->heap_comparison_times));
+ xbt_dynar_free(&(pair->comparison_times->stacks_comparison_times));
+ }
MC_free_snapshot(pair->system_state);
xbt_free(pair);
}
void MC_ddfs_init(void){
- raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
+ initial_state_liveness->raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
XBT_INFO("**************************************************");
XBT_INFO("Double-DFS init");
successors = xbt_dynar_new(sizeof(mc_pair_stateless_t), NULL);
/* Save the initial state */
- initial_state_liveness->initial_snapshot = MC_take_snapshot_liveness();
+ initial_state_liveness->snapshot = MC_take_snapshot();
MC_UNSET_RAW_MEM;
MC_UNSET_RAW_MEM;
if(cursor != 0){
- MC_restore_snapshot(initial_state_liveness->initial_snapshot);
+ MC_restore_snapshot(initial_state_liveness->snapshot);
MC_UNSET_RAW_MEM;
}
set_pair_reached(state);
if(cursor != 0){
- MC_restore_snapshot(initial_state_liveness->initial_snapshot);
+ MC_restore_snapshot(initial_state_liveness->snapshot);
MC_UNSET_RAW_MEM;
}
}
}
- if(raw_mem_set)
+ if(initial_state_liveness->raw_mem_set)
MC_SET_RAW_MEM;
else
MC_UNSET_RAW_MEM;
void MC_ddfs(int search_cycle){
- raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
+ //initial_state_liveness->raw_mem_set = (mmalloc_get_current_heap() == raw_heap);
smx_process_t process;
mc_pair_stateless_t current_pair = NULL;
next_graph_state = MC_state_pair_new();
/* Get enabled process and insert it in the interleave set of the next graph_state */
-
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);
}else{
- XBT_DEBUG("Max depth reached");
-
+ XBT_WARN("/!\\ Max depth reached ! /!\\ ");
+ if(current_pair->requests > 0){
+ 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.");
+ }
+
}
if(xbt_fifo_size(mc_stack_liveness) == _surf_mc_max_depth ){
}
MC_UNSET_RAW_MEM;
- if(raw_mem_set)
- MC_SET_RAW_MEM;
+ /*if(initial_state_liveness->raw_mem_set)
+ MC_SET_RAW_MEM;*/
}