Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : lex and yacc parsing moved in src/xbt/automaton/
[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 #include "xbt/automaton.h"
11
12 #ifndef SIMGRID_MODELCHECKER_H
13 #define SIMGRID_MODELCHECKER_H
14
15 #ifdef HAVE_MC
16
17 extern int _surf_do_model_check;
18 #define MC_IS_ENABLED _surf_do_model_check
19
20 XBT_PUBLIC(void) MC_assert(int);
21 XBT_PUBLIC(void) MC_assert_stateful(int);
22 XBT_PUBLIC(int) MC_random(int min, int max);
23 XBT_PUBLIC(void) MC_diff(void);
24 XBT_PUBLIC(xbt_automaton_t) MC_create_automaton(const char *file);
25
26 #else
27
28 #define MC_IS_ENABLED 0
29 #define MC_assert(a) xbt_assert(a)
30 #define MC_assert_stateful(a) xbt_assert(a)
31
32 #endif
33
34
35
36 #endif /* SIMGRID_MODELCHECKER_H */