Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Access memory from another process
[simgrid.git] / src / mc / mc_liveness.h
1 /* Copyright (c) 2007-2014. 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 MC_LIVENESS_H
8 #define 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 "mc_state.h"
17
18 SG_BEGIN_DECL()
19
20 extern xbt_automaton_t _mc_property_automaton;
21
22 typedef struct 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 } s_mc_pair_t, *mc_pair_t;
30
31 typedef struct s_mc_visited_pair{
32   int num;
33   int other_num; /* Dot output for */
34   int acceptance_pair;
35   mc_state_t graph_state; /* System state included */
36   xbt_automaton_state_t automaton_state;
37   xbt_dynar_t atomic_propositions;
38   size_t heap_bytes_used;
39   int nb_processes;
40   int acceptance_removed;
41   int visited_removed;
42 } s_mc_visited_pair_t, *mc_visited_pair_t;
43
44 mc_pair_t MC_pair_new(void);
45 void MC_pair_delete(mc_pair_t);
46 void mc_pair_free_voidp(void *p);
47 mc_visited_pair_t MC_visited_pair_new(int pair_num, xbt_automaton_state_t automaton_state, xbt_dynar_t atomic_propositions);
48 void MC_visited_pair_delete(mc_visited_pair_t p);
49
50 void MC_pre_modelcheck_liveness(void);
51 void MC_modelcheck_liveness(void);
52 void MC_show_stack_liveness(xbt_fifo_t stack);
53 void MC_dump_stack_liveness(xbt_fifo_t stack);
54
55 extern xbt_dynar_t visited_pairs;
56 int is_visited_pair(mc_visited_pair_t pair, int pair_num, xbt_automaton_state_t automaton_state, xbt_dynar_t atomic_propositions);
57
58 SG_END_DECL()
59
60 #endif