Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
add a test of the creation of a parallel task graph from a dot file
[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 _sg_do_model_check; /* please don't use directly: we inline MC_is_active, but that's what you should use */
18
19 #define MC_is_active() _sg_do_model_check
20
21 XBT_PUBLIC(void) MC_assert(int);
22 XBT_PUBLIC(int) MC_random(int min, int max);
23 XBT_PUBLIC(void) MC_automaton_new_propositional_symbol(const char* id, void* fct);
24 XBT_PUBLIC(void *) MC_snapshot(void);
25 XBT_PUBLIC(int) MC_compare_snapshots(void *s1, void *s2);
26
27 #else
28
29 #define MC_assert(a) xbt_assert(a)
30 #define MC_is_active() 0
31
32 #endif
33
34
35
36 #endif /* SIMGRID_MODELCHECKER_H */