Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Move mc_liveness code in simgrid::mc
[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 SG_END_DECL()
22
23 namespace simgrid {
24 namespace mc {
25
26 extern XBT_PRIVATE xbt_automaton_t property_automaton;
27
28 struct XBT_PRIVATE Pair {
29   int num;
30   int search_cycle;
31   mc_state_t graph_state; /* System state included */
32   xbt_automaton_state_t automaton_state;
33   xbt_dynar_t atomic_propositions;
34   int requests;
35   int depth;
36   int exploration_started;
37   int visited_pair_removed;
38 };
39
40 struct XBT_PRIVATE VisitedPair {
41   int num;
42   int other_num; /* Dot output for */
43   int acceptance_pair;
44   mc_state_t graph_state; /* System state included */
45   xbt_automaton_state_t automaton_state;
46   xbt_dynar_t atomic_propositions;
47   size_t heap_bytes_used;
48   int nb_processes;
49   int acceptance_removed;
50   int visited_removed;
51 };
52
53 XBT_PRIVATE simgrid::mc::Pair* pair_new(void);
54 XBT_PRIVATE void pair_delete(simgrid::mc::Pair*);
55 XBT_PRIVATE simgrid::mc::VisitedPair* visited_pair_new(int pair_num, xbt_automaton_state_t automaton_state, xbt_dynar_t atomic_propositions, mc_state_t graph_state);
56 XBT_PRIVATE void visited_pair_delete(simgrid::mc::VisitedPair* p);
57
58 int modelcheck_liveness(void);
59 XBT_PRIVATE void show_stack_liveness(xbt_fifo_t stack);
60 XBT_PRIVATE void dump_stack_liveness(xbt_fifo_t stack);
61
62 XBT_PRIVATE extern xbt_dynar_t visited_pairs;
63 XBT_PRIVATE int is_visited_pair(simgrid::mc::VisitedPair* visited_pair, simgrid::mc::Pair* pair);
64
65 }
66 }
67
68 #endif