Logo AND Algorithmique Numérique Distribuée

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