Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
23f056f48e84e83e79e74b41ca914c7f894c3358
[simgrid.git] / src / include / mc / mc.h
1 /* Copyright (c) 2008-2017. The 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 <simgrid/forward.h>
10 #include <simgrid/modelchecker.h> /* our public interface (and definition of SIMGRID_HAVE_MC) */
11
12 /* Maximum size of the application heap.
13  *
14  * The model-checker heap is placed at this offset from the beginning of the application heap.
15  *
16  * In the current implementation, if the application uses more than this for the application heap the application heap
17  * will smash the beginning of the model-checker heap and bad things will happen.
18  *
19  * For 64 bits systems, we have a lot of virtual memory available so we wan use a much bigger value in order to avoid
20  * bad things from happening.
21  * */
22
23 #define STD_HEAP_SIZE   (sizeof(void*)<=4 ? (100*1024*1024) : (1ll*1024*1024*1024*1024))
24
25 SG_BEGIN_DECL()
26
27 /********************************** Configuration of MC **************************************/
28 extern XBT_PUBLIC(int) _sg_do_model_check;
29 extern XBT_PRIVATE int _sg_do_model_check_record;
30 extern XBT_PRIVATE int _sg_mc_checkpoint;
31 extern XBT_PUBLIC(int) _sg_mc_sparse_checkpoint;
32 extern XBT_PUBLIC(int) _sg_mc_ksm;
33 extern XBT_PUBLIC(char*) _sg_mc_property_file;
34 extern XBT_PRIVATE int _sg_mc_timeout;
35 extern XBT_PRIVATE int _sg_mc_hash;
36 extern XBT_PRIVATE int _sg_mc_max_depth;
37 extern XBT_PUBLIC(int) _sg_mc_max_visited_states;
38 extern XBT_PRIVATE char* _sg_mc_dot_output_file;
39 extern XBT_PUBLIC(int) _sg_mc_comms_determinism;
40 extern XBT_PUBLIC(int) _sg_mc_send_determinism;
41 extern XBT_PRIVATE int _sg_mc_snapshot_fds;
42 extern XBT_PRIVATE int _sg_mc_termination;
43
44 /********************************* Global *************************************/
45 XBT_PRIVATE void _mc_cfg_cb_reduce(const char *name);
46 XBT_PRIVATE void _mc_cfg_cb_checkpoint(const char *name);
47 XBT_PRIVATE void _mc_cfg_cb_sparse_checkpoint(const char *name);
48 XBT_PRIVATE void _mc_cfg_cb_ksm(const char *name);
49 XBT_PRIVATE void _mc_cfg_cb_property(const char *name);
50 XBT_PRIVATE void _mc_cfg_cb_timeout(const char *name);
51 XBT_PRIVATE void _mc_cfg_cb_snapshot_fds(const char *name);
52 XBT_PRIVATE void _mc_cfg_cb_hash(const char *name);
53 XBT_PRIVATE void _mc_cfg_cb_max_depth(const char *name);
54 XBT_PRIVATE void _mc_cfg_cb_visited(const char *name);
55 XBT_PRIVATE void _mc_cfg_cb_dot_output(const char *name);
56 XBT_PRIVATE void _mc_cfg_cb_comms_determinism(const char *name);
57 XBT_PRIVATE void _mc_cfg_cb_send_determinism(const char *name);
58 XBT_PRIVATE void _mc_cfg_cb_termination(const char *name);
59
60 XBT_PUBLIC(void) MC_run();
61 XBT_PUBLIC(void) MC_process_clock_add(smx_actor_t, double);
62 XBT_PUBLIC(double) MC_process_clock_get(smx_actor_t);
63 XBT_PRIVATE void MC_automaton_load(const char *file);
64
65 /********************************* Memory *************************************/
66 XBT_PUBLIC(void) MC_memory_init();  /* Initialize the memory subsystem */
67 XBT_PUBLIC(void) MC_memory_exit();
68 XBT_PUBLIC(void) MC_memory_init_server();
69
70 SG_END_DECL()
71
72 #endif