Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
ed3a990d936acd59fcd43d91711527551703ef8a
[simgrid.git] / src / include / mc / mc.h
1 /* Copyright (c) 2008-2012. Da SimGrid Team. All rights reserved.           */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #ifndef _MC_MC_H
7 #define _MC_MC_H
8
9 #include "xbt/misc.h"
10 #include "xbt/fifo.h"
11 #include "xbt/dict.h"
12 #include "xbt/function_types.h"
13 #include "mc/datatypes.h"
14 #include "simgrid/simix.h"
15 #include "simgrid/modelchecker.h" /* our public interface (and definition of HAVE_MC) */
16 #include "xbt/automaton.h"
17 #include "xbt/dynar.h"
18
19 #define STD_HEAP_SIZE   20480000        /* Maximum size of the system's heap */
20
21 SG_BEGIN_DECL()
22
23 extern char*_surf_mc_property_file; /* fixme: better location? */
24
25 extern xbt_dynar_t mc_heap_comparison_ignore;
26 extern xbt_dynar_t stacks_areas;
27
28 /********************************* Global *************************************/
29 void _mc_cfg_cb_reduce(const char *name, int pos);
30 void _mc_cfg_cb_checkpoint(const char *name, int pos);
31 void _mc_cfg_cb_property(const char *name, int pos);
32 void _mc_cfg_cb_timeout(const char *name, int pos);
33 void _mc_cfg_cb_max_depth(const char *name, int pos);
34 void _mc_cfg_cb_visited(const char *name, int pos);
35
36 XBT_PUBLIC(void) MC_do_the_modelcheck_for_real(void);
37
38 XBT_PUBLIC(void) MC_init(void);
39 XBT_PUBLIC(void) MC_exit(void);
40 XBT_PUBLIC(void) MC_exit_liveness(void);
41 XBT_PUBLIC(void) MC_modelcheck_safety(void);
42 XBT_PUBLIC(void) MC_modelcheck_liveness(void);
43 XBT_PUBLIC(void) MC_process_clock_add(smx_process_t, double);
44 XBT_PUBLIC(double) MC_process_clock_get(smx_process_t);
45 void MC_automaton_load(const char *file);
46
47 /****************************** MC ignore **********************************/
48 XBT_PUBLIC(void) MC_ignore_heap(void *address, size_t size);
49 XBT_PUBLIC(void) MC_ignore_stack(const char *var_name, const char *frame);
50 XBT_PUBLIC(void) MC_ignore_data_bss(void *address, size_t size);
51 void MC_new_stack_area(void *stack, char *name, void *context, size_t size);
52
53 /********************************* Memory *************************************/
54 XBT_PUBLIC(void) MC_memory_init(void);  /* Initialize the memory subsystem */
55 XBT_PUBLIC(void) MC_memory_exit(void);
56
57 /* Trigger for state equality detection (check potential cycle in application) */
58 void MC_compare(void);
59
60 SG_END_DECL()
61
62 #endif                          /* _MC_MC_H */