Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of github.com:mquinson/simgrid
[simgrid.git] / src / mc / mc_safety.h
1 /* Copyright (c) 2007-2015. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #ifndef SIMGRID_MC_SAFETY_H
8 #define SIMGRID_MC_SAFETY_H
9
10 #include <stdint.h>
11
12 #include <simgrid_config.h>
13
14 #include <xbt/base.h>
15 #include <xbt/dynar.h>
16
17 #include "src/mc/mc_forward.hpp"
18 #include "src/mc/mc_state.h"
19
20 SG_BEGIN_DECL()
21
22 typedef enum {
23   e_mc_reduce_unset,
24   e_mc_reduce_none,
25   e_mc_reduce_dpor
26 } e_mc_reduce_t;
27
28 extern XBT_PRIVATE e_mc_reduce_t mc_reduce_kind;
29
30 int MC_modelcheck_safety(void);
31
32 typedef struct XBT_PRIVATE s_mc_visited_state{
33   mc_snapshot_t system_state;
34   size_t heap_bytes_used;
35   int nb_processes;
36   int num;
37   int other_num; // dot_output for
38 }s_mc_visited_state_t, *mc_visited_state_t;
39
40 extern XBT_PRIVATE xbt_dynar_t visited_states;
41 XBT_PRIVATE mc_visited_state_t is_visited_state(mc_state_t graph_state);
42 XBT_PRIVATE void visited_state_free(mc_visited_state_t state);
43 XBT_PRIVATE void visited_state_free_voidp(void *s);
44
45 SG_END_DECL()
46
47 #endif