Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
3969319dd38d98b61498939d9dec6061e413a65a
[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 namespace simgrid {
21 namespace mc {
22
23 enum class ReductionMode {
24   unset,
25   none,
26   dpor,
27 };
28
29 extern XBT_PRIVATE simgrid::mc::ReductionMode reduction_mode;
30
31 int modelcheck_safety(void);
32
33 struct XBT_PRIVATE VisitedState {
34   simgrid::mc::Snapshot* system_state = nullptr;
35   size_t heap_bytes_used = 0;
36   int nb_processes = 0;
37   int num = 0;
38   int other_num = 0; // dot_output for
39
40   VisitedState();
41   ~VisitedState();
42 };
43
44 extern XBT_PRIVATE xbt_dynar_t visited_states;
45 XBT_PRIVATE simgrid::mc::VisitedState* is_visited_state(mc_state_t graph_state);
46
47 }
48 }
49
50 #endif