Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
66fdadaaafc6ea2d9565758e8169e1ad7e39e088
[simgrid.git] / src / include / mc / mc.h
1 /* Copyright (c) 2008 Martin Quinson, Cristian Rosa.
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_MC_H
8 #define _MC_MC_H
9
10 #include "xbt/misc.h"
11 #include "xbt/fifo.h"
12 #include "xbt/dict.h"
13 #include "xbt/function_types.h"
14 #include "mc/datatypes.h"
15 #include "simix/datatypes.h"
16 #include "gras_config.h" /* Definition of HAVE_MC */
17 #include "xbt/automaton.h"
18
19 #ifdef HAVE_MC
20 extern int _surf_do_model_check;
21 #define MC_IS_ENABLED _surf_do_model_check
22 #else
23 #define MC_IS_ENABLED 0
24 #endif
25
26 SG_BEGIN_DECL()
27
28 /********************************* Global *************************************/
29 XBT_PUBLIC(void) MC_init_safety_stateless(void);
30 XBT_PUBLIC(void) MC_init_safety_stateful(void);
31 XBT_PUBLIC(void) MC_init_liveness_stateful(xbt_automaton_t a, char *prgm);
32 XBT_PUBLIC(void) MC_init_liveness_stateless(xbt_automaton_t a, char *prgm);
33 XBT_PUBLIC(void) MC_exit(void);
34 XBT_PUBLIC(void) MC_exit_liveness(void);
35 XBT_PUBLIC(void) MC_assert(int);
36 XBT_PUBLIC(void) MC_assert_stateful(int);
37 XBT_PUBLIC(void) MC_assert_pair_stateful(int);
38 XBT_PUBLIC(void) MC_assert_pair_stateless(int);
39 XBT_PUBLIC(void) MC_modelcheck(void);
40 XBT_PUBLIC(void) MC_modelcheck_stateful(void);
41 XBT_PUBLIC(void) MC_modelcheck_liveness_stateful(xbt_automaton_t a, char *prgm);
42 XBT_PUBLIC(void) MC_modelcheck_liveness_stateless(xbt_automaton_t a, char *prgm);
43 XBT_PUBLIC(int) MC_random(int, int);
44 XBT_PUBLIC(void) MC_process_clock_add(smx_process_t, double);
45 XBT_PUBLIC(double) MC_process_clock_get(smx_process_t);
46
47 /********************************* Memory *************************************/
48 XBT_PUBLIC(void) MC_memory_init(void);  /* Initialize the memory subsystem */
49 XBT_PUBLIC(void) MC_memory_exit(void);
50
51 SG_END_DECL()
52
53 #endif                          /* _MC_MC_H */