X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/633f3ab4f0f29940ea9759bfe3dc4f8ec37595e8..f28d984fb76ea5e45562168a2e67b60a8b1d0fb2:/src/mc/mc_global.c diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index a0ad3ee77f..247d959292 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -1,3 +1,8 @@ +/* Copyright (c) 2008-2012 Da SimGrid Team. All rights reserved. */ + +/* This program is free software; you can redistribute it and/or modify it + * under the terms of the license (GNU LGPL) which comes with this package. */ + #include #include #include @@ -7,8 +12,9 @@ #include "../simix/smx_private.h" #include "xbt/fifo.h" #include "mc_private.h" +#include "xbt/automaton/automaton_create.h" - +XBT_LOG_NEW_CATEGORY(mc, "All MC categories"); XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_global, mc, "Logging specific to MC (global)"); @@ -32,9 +38,8 @@ xbt_fifo_t mc_stack_liveness = NULL; mc_snapshot_t initial_snapshot_liveness = NULL; xbt_automaton_t automaton; -char *prog_name; -static void MC_init_liveness(xbt_automaton_t a, char *prgm); +static void MC_init_liveness(xbt_automaton_t a); static void MC_assert_pair(int prop); @@ -99,7 +104,7 @@ void MC_init_safety_stateful(void){ } -static void MC_init_liveness(xbt_automaton_t a, char *prgm){ +static void MC_init_liveness(xbt_automaton_t a){ XBT_DEBUG("Start init mc"); @@ -121,7 +126,6 @@ static void MC_init_liveness(xbt_automaton_t a, char *prgm){ MC_UNSET_RAW_MEM; automaton = a; - prog_name = strdup(prgm); MC_ddfs_init(); @@ -144,8 +148,8 @@ void MC_modelcheck_stateful(void) } -void MC_modelcheck_liveness(xbt_automaton_t a, char *prgm){ - MC_init_liveness(a, prgm); +void MC_modelcheck_liveness(xbt_automaton_t a){ + MC_init_liveness(a); MC_exit_liveness(); } @@ -499,7 +503,7 @@ void MC_dump_stack_liveness(xbt_fifo_t stack){ void MC_print_statistics(mc_stats_t stats) { - XBT_INFO("State space size ~= %lu", stats->state_size); + //XBT_INFO("State space size ~= %lu", stats->state_size); XBT_INFO("Expanded states = %lu", stats->expanded_states); XBT_INFO("Visited states = %lu", stats->visited_states); XBT_INFO("Executed transitions = %lu", stats->executed_transitions); @@ -522,7 +526,7 @@ void MC_print_statistics_pairs(mc_stats_pair_t stats) void MC_assert(int prop) { - if (MC_IS_ENABLED && !prop) { + if (MC_IS_ENABLED && !prop){ XBT_INFO("**************************"); XBT_INFO("*** PROPERTY NOT VALID ***"); XBT_INFO("**************************"); @@ -580,7 +584,7 @@ void MC_diff(void){ int i; - XBT_INFO("Number of regions : %d", sn->num_reg); + XBT_INFO("Number of regions : %u", sn->num_reg); for(i=0; inum_reg; i++){ @@ -604,3 +608,7 @@ void MC_diff(void){ } } + +xbt_automaton_t MC_create_automaton(const char *file){ + return xbt_create_automaton(file); +}