Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove/cleanup/fix #include
[simgrid.git] / src / mc / mc_liveness.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_LIVENESS_H
8 #define SIMGRID_MC_LIVENESS_H
9
10 #include <stdint.h>
11
12 #include <simgrid_config.h>
13 #include <xbt/base.h>
14 #include <xbt/fifo.h>
15 #include <xbt/dynar.h>
16 #include <xbt/automaton.h>
17 #include "src/mc/mc_state.h"
18
19 SG_BEGIN_DECL()
20
21 extern XBT_PRIVATE xbt_automaton_t _mc_property_automaton;
22
23 typedef struct XBT_PRIVATE s_mc_pair {
24   int num;
25   int search_cycle;
26   mc_state_t graph_state; /* System state included */
27   xbt_automaton_state_t automaton_state;
28   xbt_dynar_t atomic_propositions;
29   int requests;
30   int depth;
31   int exploration_started;
32   int visited_pair_removed;
33 } s_mc_pair_t, *mc_pair_t;
34
35 typedef struct XBT_PRIVATE s_mc_visited_pair{
36   int num;
37   int other_num; /* Dot output for */
38   int acceptance_pair;
39   mc_state_t graph_state; /* System state included */
40   xbt_automaton_state_t automaton_state;
41   xbt_dynar_t atomic_propositions;
42   size_t heap_bytes_used;
43   int nb_processes;
44   int acceptance_removed;
45   int visited_removed;
46 } s_mc_visited_pair_t, *mc_visited_pair_t;
47
48 XBT_PRIVATE mc_pair_t MC_pair_new(void);
49 XBT_PRIVATE void MC_pair_delete(mc_pair_t);
50 XBT_PRIVATE mc_visited_pair_t MC_visited_pair_new(int pair_num, xbt_automaton_state_t automaton_state, xbt_dynar_t atomic_propositions, mc_state_t graph_state);
51 XBT_PRIVATE void MC_visited_pair_delete(mc_visited_pair_t p);
52
53 int MC_modelcheck_liveness(void);
54 XBT_PRIVATE void MC_show_stack_liveness(xbt_fifo_t stack);
55 XBT_PRIVATE void MC_dump_stack_liveness(xbt_fifo_t stack);
56
57 XBT_PRIVATE extern xbt_dynar_t visited_pairs;
58 XBT_PRIVATE int is_visited_pair(mc_visited_pair_t visited_pair, mc_pair_t pair);
59
60 SG_END_DECL()
61
62 #endif