1 /* simgrid/modelchecker.h - Formal Verification made possible in SimGrid */
3 /* Copyright (c) 2008-2013. The SimGrid Team.
4 * All rights reserved. */
6 /* This program is free software; you can redistribute it and/or modify it
7 * under the terms of the license (GNU LGPL) which comes with this package. */
9 #include <simgrid_config.h> /* HAVE_MC ? */
11 #include "xbt/automaton.h"
13 #ifndef SIMGRID_MODELCHECKER_H
14 #define SIMGRID_MODELCHECKER_H
18 extern int _sg_do_model_check; /* please don't use directly: we inline MC_is_active, but that's what you should use */
19 extern int _sg_mc_visited;
21 #define MC_is_active() _sg_do_model_check
22 #define MC_visited_reduction() _sg_mc_visited
24 XBT_PUBLIC(void) MC_assert(int);
25 XBT_PUBLIC(int) MC_random(int min, int max);
26 XBT_PUBLIC(void) MC_automaton_new_propositional_symbol(const char* id, void* fct);
27 XBT_PUBLIC(void *) MC_snapshot(void);
28 XBT_PUBLIC(int) MC_compare_snapshots(void *s1, void *s2);
29 XBT_PUBLIC(void) MC_cut(void);
30 XBT_PUBLIC(void) MC_ignore(void *addr, size_t size);
34 #define MC_assert(a) xbt_assert(a)
35 #define MC_is_active() 0
36 #define MC_visited_reduction() 0
42 #endif /* SIMGRID_MODELCHECKER_H */