X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6a8dfdb49f69b809acd48b63087e285e1218cbdb..5b3677b425b9cc6949c1573d59ac772540cbf4b2:/src/mc/mc_compare.c diff --git a/src/mc/mc_compare.c b/src/mc/mc_compare.c index b58023327b..e017b7d376 100644 --- a/src/mc/mc_compare.c +++ b/src/mc/mc_compare.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2012-2013. The SimGrid Team. +/* Copyright (c) 2012-2014. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it @@ -308,6 +308,7 @@ static int compare_local_variables(mc_snapshot_stack_t stack1, mc_snapshot_stack current_var2 = (local_variable_t)xbt_dynar_get_as(stack2->local_variables, cursor, local_variable_t); if(strcmp(current_var1->name, current_var2->name) != 0 || strcmp(current_var1->frame, current_var2->frame) != 0 || current_var1->ip != current_var2->ip){ xbt_dynar_free(&compared_pointers); + XBT_VERB("Different name of variable (%s - %s) or frame (%s - %s) or ip (%lu - %lu)", current_var1->name, current_var2->name, current_var1->frame, current_var2->frame, current_var1->ip, current_var2->ip); return 1; } offset1 = (char *)current_var1->address - (char *)std_heap; @@ -336,10 +337,15 @@ int snapshot_compare(void *state1, void *state2){ int num1, num2; if(_sg_mc_property_file && _sg_mc_property_file[0] != '\0'){ /* Liveness MC */ - s1 = ((mc_pair_t)state1)->graph_state->system_state; - s2 = ((mc_pair_t)state2)->graph_state->system_state; - num1 = ((mc_pair_t)state1)->num; - num2 = ((mc_pair_t)state2)->num; + s1 = ((mc_visited_pair_t)state1)->graph_state->system_state; + s2 = ((mc_visited_pair_t)state2)->graph_state->system_state; + num1 = ((mc_visited_pair_t)state1)->num; + num2 = ((mc_visited_pair_t)state2)->num; + /* Firstly compare automaton state */ + /*if(xbt_automaton_state_compare(((mc_pair_t)state1)->automaton_state, ((mc_pair_t)state2)->automaton_state) != 0) + return 1; + if(xbt_automaton_propositional_symbols_compare_value(((mc_pair_t)state1)->atomic_propositions, ((mc_pair_t)state2)->atomic_propositions) != 0) + return 1;*/ }else{ /* Safety MC */ s1 = ((mc_visited_state_t)state1)->system_state; s2 = ((mc_visited_state_t)state2)->system_state; @@ -580,7 +586,7 @@ int snapshot_compare(void *state1, void *state2){ #endif /* Compare heap */ - if(mmalloc_compare_heap((xbt_mheap_t)s1->regions[0]->data, (xbt_mheap_t)s2->regions[0]->data) > 0){ + if(mmalloc_compare_heap((xbt_mheap_t)s1->regions[0]->data, (xbt_mheap_t)s2->regions[0]->data, mc_variables_type_libsimgrid, mc_variables_type_binary) > 0){ #ifdef MC_DEBUG xbt_os_walltimer_stop(timer);