Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Use optimized local implementation of libuwind (UNW_LOCAL_ONLY)
[simgrid.git] / src / include / mc / mc.h
1 /* Copyright (c) 2008-2013. The SimGrid Team.
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 "simgrid/simix.h"
16 #include "simgrid/modelchecker.h" /* our public interface (and definition of HAVE_MC) */
17 #include "xbt/automaton.h"
18 #include "xbt/dynar.h"
19
20 #define STD_HEAP_SIZE   20480000        /* Maximum size of the system's heap */
21
22 SG_BEGIN_DECL()
23
24 /********************************** Configuration of MC **************************************/ 
25 extern int _sg_do_model_check;
26 extern int _sg_mc_checkpoint;
27 extern char* _sg_mc_property_file;
28 extern int _sg_mc_timeout;
29 extern int _sg_mc_max_depth;
30 extern int _sg_mc_visited;
31 extern char* _sg_mc_dot_output_file;
32
33 extern xbt_dynar_t mc_heap_comparison_ignore;
34 extern xbt_dynar_t stacks_areas;
35 extern void *maestro_stack_start;
36 extern void *maestro_stack_end;
37
38 /********************************* Global *************************************/
39 void _mc_cfg_cb_reduce(const char *name, int pos);
40 void _mc_cfg_cb_checkpoint(const char *name, int pos);
41 void _mc_cfg_cb_property(const char *name, int pos);
42 void _mc_cfg_cb_timeout(const char *name, int pos);
43 void _mc_cfg_cb_max_depth(const char *name, int pos);
44 void _mc_cfg_cb_visited(const char *name, int pos);
45 void _mc_cfg_cb_dot_output(const char *name, int pos);
46
47 XBT_PUBLIC(void) MC_do_the_modelcheck_for_real(void);
48
49 XBT_PUBLIC(void) MC_init(void);
50 XBT_PUBLIC(void) MC_exit(void);
51 XBT_PUBLIC(void) MC_modelcheck_safety(void);
52 XBT_PUBLIC(void) MC_modelcheck_liveness(void);
53 XBT_PUBLIC(void) MC_process_clock_add(smx_process_t, double);
54 XBT_PUBLIC(double) MC_process_clock_get(smx_process_t);
55 void MC_automaton_load(const char *file);
56
57 /****************************** MC ignore **********************************/
58 XBT_PUBLIC(void) MC_ignore_heap(void *address, size_t size);
59 XBT_PUBLIC(void) MC_remove_ignore_heap(void *address, size_t size);
60 XBT_PUBLIC(void) MC_ignore_local_variable(const char *var_name, const char *frame);
61 XBT_PUBLIC(void) MC_ignore_global_variable(const char *var_name);
62 void MC_new_stack_area(void *stack, char *name, void *context, size_t size);
63
64 /********************************* Memory *************************************/
65 XBT_PUBLIC(void) MC_memory_init(void);  /* Initialize the memory subsystem */
66 XBT_PUBLIC(void) MC_memory_exit(void);
67
68 SG_END_DECL()
69
70 #endif                          /* _MC_MC_H */