X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/411e3479d19b1ccbd3ea92787646394a356e47e3..c0dc66a3644be860680e6df4092484c522e59d40:/src/mc/mc_private.h diff --git a/src/mc/mc_private.h b/src/mc/mc_private.h index a64ca64675..01ad368609 100644 --- a/src/mc/mc_private.h +++ b/src/mc/mc_private.h @@ -49,16 +49,13 @@ extern double *mc_time; #define MAX_DEPTH_LIVENESS 500 int MC_deadlock_check(void); -void MC_replay(xbt_fifo_t stack); +void MC_replay(xbt_fifo_t stack, int start); void MC_replay_liveness(xbt_fifo_t stack, int all_stack); void MC_wait_for_requests(void); void MC_get_enabled_processes(); void MC_show_deadlock(smx_simcall_t req); -void MC_show_deadlock_stateful(smx_simcall_t req); -void MC_show_stack_safety_stateless(xbt_fifo_t stack); -void MC_dump_stack_safety_stateless(xbt_fifo_t stack); -void MC_show_stack_safety_stateful(xbt_fifo_t stack); -void MC_dump_stack_safety_stateful(xbt_fifo_t stack); +void MC_show_stack_safety(xbt_fifo_t stack); +void MC_dump_stack_safety(xbt_fifo_t stack); /********************************* Requests ***********************************/ int MC_request_depend(smx_simcall_t req1, smx_simcall_t req2); @@ -95,6 +92,7 @@ typedef struct mc_state { s_smx_simcall_t executed_req; /* The executed request of the state */ int req_num; /* The request number (in the case of a multi-request like waitany ) */ + mc_snapshot_t system_state; /* Snapshot of system state */ } s_mc_state_t, *mc_state_t; extern xbt_fifo_t mc_stack_safety_stateless; @@ -137,7 +135,7 @@ void MC_print_statistics_pairs(mc_stats_pair_t); extern void *std_heap; extern void *raw_heap; -#define STD_HEAP_SIZE 20480000 /* Maximum size of the system's heap */ + /* FIXME: Horrible hack! because the mmalloc library doesn't provide yet of */ /* an API to query about the status of a heap, we simply call mmstats and */ @@ -152,7 +150,9 @@ struct mstats { }; #define MC_SET_RAW_MEM mmalloc_set_current_heap(raw_heap) -#define MC_UNSET_RAW_MEM mmalloc_set_current_heap(std_heap) +#define MC_UNSET_RAW_MEM mmalloc_set_current_heap(std_heap) + +int raw_mem_set; /******************************* MEMORY MAPPINGS ***************************/ /* These functions and data structures implements a binary interface for */ @@ -183,32 +183,24 @@ typedef struct s_memory_map { memory_map_t get_memory_map(void); -/********************************** DPOR for safety (stateless) **************************************/ +/********************************** DPOR for safety **************************************/ +typedef enum { + e_mc_reduce_unset, + e_mc_reduce_none, + e_mc_reduce_dpor +} e_mc_reduce_t; +extern e_mc_reduce_t mc_reduce_kind; + void MC_dpor_init(void); void MC_dpor(void); void MC_dpor_exit(void); - -/***** DPOR for safety (stateful) **** */ - -typedef struct s_mc_state_with_snapshot{ - mc_snapshot_t system_state; - mc_state_t graph_state; -}s_mc_state_ws_t, *mc_state_ws_t; - -extern xbt_fifo_t mc_stack_safety_stateful; - -void MC_init_stateful(void); -void MC_modelcheck_stateful(void); -mc_state_ws_t new_state_ws(mc_snapshot_t s, mc_state_t gs); -void MC_dpor_stateful_init(void); -void MC_dpor_stateful(void); -void MC_exit_stateful(void); +void MC_init_safety(void); /********************************** Double-DFS for liveness property**************************************/ extern mc_snapshot_t initial_snapshot_liveness; -extern xbt_automaton_t automaton; +extern xbt_automaton_t _mc_property_automaton; typedef struct s_mc_pair{ mc_snapshot_t system_state; @@ -283,5 +275,11 @@ void MC_show_stack_liveness(xbt_fifo_t stack); void MC_dump_stack_liveness(xbt_fifo_t stack); void MC_pair_stateless_delete(mc_pair_stateless_t pair); +/********************************** Configuration of MC **************************************/ +extern xbt_fifo_t mc_stack_safety; + +extern int _surf_mc_checkpoint; +extern char* _surf_mc_property_file; + #endif