Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
97e650dd371785b0b06a614b4d6c562c0e7d7c03
[simgrid.git] / include / simgrid / modelchecker.h
1 /* simgrid/modelchecker.h - Formal Verification made possible in SimGrid    */
2
3 /* Copyright (c) 2008-2012. The SimGrid Team. All rights reserved.          */
4
5 /* This program is free software; you can redistribute it and/or modify it
6  * under the terms of the license (GNU LGPL) which comes with this package. */
7
8 #include <simgrid_config.h> /* HAVE_MC ? */
9 #include <xbt.h>
10
11 #ifndef SIMGRID_MODELCHECKER_H
12 #define SIMGRID_MODELCHECKER_H
13
14 #ifdef HAVE_MC
15
16 extern int _surf_do_model_check;
17 #define MC_IS_ENABLED _surf_do_model_check
18
19 XBT_PUBLIC(void) MC_assert(int);
20 XBT_PUBLIC(void) MC_assert_stateful(int);
21 XBT_PUBLIC(int) MC_random(int min, int max);
22 XBT_PUBLIC(void) MC_diff(void);
23
24 #else
25
26 #define MC_IS_ENABLED 0
27 #define MC_assert(a) xbt_assert(a)
28 #define MC_assert_stateful(a) xbt_assert(a)
29
30 #endif
31
32
33
34 #endif /* SIMGRID_MODELCHECKER_H */