-/* Copyright (c) 2011-2014. The SimGrid Team.
+/* Copyright (c) 2011-2015. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
#include "mc_safety.h"
#include "mc_liveness.h"
#include "mc_private.h"
-#include "mc_process.h"
+#include "mc/Process.hpp"
#include "mc_smx.h"
extern "C" {
process->get_heap()->heaplimit,
process->get_malloc_info());
- if (mc_model_checker->process().is_self()) {
- new_state->nb_processes = xbt_swag_size(simix_global->process_list);
- } else {
- MC_process_smx_refresh(&mc_model_checker->process());
- new_state->nb_processes = xbt_dynar_length(
- mc_model_checker->process().smx_process_infos);
- }
+ MC_process_smx_refresh(&mc_model_checker->process());
+ new_state->nb_processes = xbt_dynar_length(
+ mc_model_checker->process().smx_process_infos);
new_state->system_state = MC_take_snapshot(mc_stats->expanded_states);
new_state->num = mc_stats->expanded_states;
pair->heap_bytes_used = mmalloc_get_bytes_used_remote(
process->get_heap()->heaplimit,
process->get_malloc_info());
- if (mc_model_checker->process().is_self()) {
- pair->nb_processes = xbt_swag_size(simix_global->process_list);
- } else {
- MC_process_smx_refresh(&mc_model_checker->process());
- pair->nb_processes = xbt_dynar_length(
- mc_model_checker->process().smx_process_infos);
- }
+
+ MC_process_smx_refresh(&mc_model_checker->process());
+ pair->nb_processes = xbt_dynar_length(
+ mc_model_checker->process().smx_process_infos);
+
pair->automaton_state = automaton_state;
pair->num = pair_num;
pair->other_num = -1;
unsigned int cursor2 = 0;
unsigned int index2 = 0;
xbt_dynar_foreach(visited_states, cursor2, state_test){
- if (state_test->num < min2) {
+ if (!MC_important_snapshot(state_test->system_state) && state_test->num < min2) {
index2 = cursor2;
min2 = state_test->num;
}
unsigned int cursor2 = 0;
unsigned int index2 = 0;
xbt_dynar_foreach(visited_pairs, cursor2, pair_test) {
- if (pair_test->num < min2) {
+ if (!MC_important_snapshot(pair_test->graph_state->system_state)
+ && pair_test->num < min2) {
index2 = cursor2;
min2 = pair_test->num;
}