Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
abe55fac58c1b23176924504182a6e25c39bc143
[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(xbt_automaton_t a, char *prgm);
32 XBT_PUBLIC(void) MC_exit(void);
33 XBT_PUBLIC(void) MC_exit_liveness(void);
34 XBT_PUBLIC(void) MC_assert(int);
35 XBT_PUBLIC(void) MC_assert_stateful(int);
36 XBT_PUBLIC(void) MC_assert_pair(int);
37 XBT_PUBLIC(void) MC_modelcheck(void);
38 XBT_PUBLIC(void) MC_modelcheck_stateful(void);
39 XBT_PUBLIC(void) MC_modelcheck_liveness(xbt_automaton_t a, char *prgm);
40 XBT_PUBLIC(int) MC_random(int, int);
41 XBT_PUBLIC(void) MC_process_clock_add(smx_process_t, double);
42 XBT_PUBLIC(double) MC_process_clock_get(smx_process_t);
43
44 /********************************* Memory *************************************/
45 XBT_PUBLIC(void) MC_memory_init(void);  /* Initialize the memory subsystem */
46 XBT_PUBLIC(void) MC_memory_exit(void);
47
48 SG_END_DECL()
49
50 #endif                          /* _MC_MC_H */