X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6b188a3ca7fe91cf125a08229fb4fe51eee26e6d..c5ad8ca1a68bbaa9152471c8d0eeb99d762f0d86:/src/mc/private.h diff --git a/src/mc/private.h b/src/mc/private.h index 21f6bfb65b..3c7006030e 100644 --- a/src/mc/private.h +++ b/src/mc/private.h @@ -18,6 +18,9 @@ #include "../simix/private.h" #include "xbt/automaton.h" #include "xbt/hash.h" +#include "msg/msg.h" +#include "msg/datatypes.h" +#include "simix/datatypes.h" /****************************** Snapshots ***********************************/ @@ -53,21 +56,21 @@ void MC_replay(xbt_fifo_t stack); 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_req_t req); -void MC_show_deadlock_stateful(smx_req_t req); +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); /********************************* Requests ***********************************/ -int MC_request_depend(smx_req_t req1, smx_req_t req2); -char* MC_request_to_string(smx_req_t req, int value); -unsigned int MC_request_testany_fail(smx_req_t req); +int MC_request_depend(smx_simcall_t req1, smx_simcall_t req2); +char* MC_request_to_string(smx_simcall_t req, int value); +unsigned int MC_request_testany_fail(smx_simcall_t req); /*int MC_waitany_is_enabled_by_comm(smx_req_t req, unsigned int comm);*/ -int MC_request_is_visible(smx_req_t req); -int MC_request_is_enabled(smx_req_t req); -int MC_request_is_enabled_by_idx(smx_req_t req, unsigned int idx); +int MC_request_is_visible(smx_simcall_t req); +int MC_request_is_enabled(smx_simcall_t req); +int MC_request_is_enabled_by_idx(smx_simcall_t req, unsigned int idx); int MC_process_is_enabled(smx_process_t process); @@ -91,8 +94,8 @@ typedef struct mc_state { unsigned long max_pid; /* Maximum pid at state's creation time */ mc_procstate_t proc_status; /* State's exploration status by process */ s_smx_action_t internal_comm; /* To be referenced by the internal_req */ - s_smx_req_t internal_req; /* Internal translation of request */ - s_smx_req_t executed_req; /* The executed request of the state */ + s_smx_simcall_t internal_req; /* Internal translation of request */ + 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 ) */ } s_mc_state_t, *mc_state_t; @@ -104,10 +107,10 @@ void MC_state_delete(mc_state_t state); void MC_state_interleave_process(mc_state_t state, smx_process_t process); unsigned int MC_state_interleave_size(mc_state_t state); int MC_state_process_is_done(mc_state_t state, smx_process_t process); -void MC_state_set_executed_request(mc_state_t state, smx_req_t req, int value); -smx_req_t MC_state_get_executed_request(mc_state_t state, int *value); -smx_req_t MC_state_get_internal_request(mc_state_t state); -smx_req_t MC_state_get_request(mc_state_t state, int *value); +void MC_state_set_executed_request(mc_state_t state, smx_simcall_t req, int value); +smx_simcall_t MC_state_get_executed_request(mc_state_t state, int *value); +smx_simcall_t MC_state_get_internal_request(mc_state_t state); +smx_simcall_t MC_state_get_request(mc_state_t state, int *value); /****************************** Statistics ************************************/ typedef struct mc_stats { @@ -221,6 +224,7 @@ typedef struct s_mc_pair_reached{ xbt_state_t automaton_state; xbt_dynar_t prop_ato; mc_snapshot_t system_state; + //xbt_dict_t rdv_points; }s_mc_pair_reached_t, *mc_pair_reached_t; typedef struct s_mc_pair_visited{ @@ -243,6 +247,8 @@ typedef struct s_mc_pair_reached_hash{ unsigned int *hash_regions; }s_mc_pair_reached_hash_t, *mc_pair_reached_hash_t; + + int MC_automaton_evaluate_label(xbt_exp_label_t l); mc_pair_t new_pair(mc_snapshot_t sn, mc_state_t sg, xbt_state_t st); @@ -259,6 +265,7 @@ void set_pair_visited(xbt_state_t st, int search_cycle); int visited_hash(xbt_state_t st, int search_cycle); void set_pair_visited_hash(xbt_state_t st, int search_cycle); unsigned int hash_region(char *str, int str_len); +int rdv_points_compare(xbt_dict_t d1, xbt_dict_t d2); /* **** Double-DFS stateless **** */ @@ -272,7 +279,7 @@ typedef struct s_mc_pair_stateless{ extern xbt_fifo_t mc_stack_liveness; mc_pair_stateless_t new_pair_stateless(mc_state_t sg, xbt_state_t st, int r); -void MC_ddfs_init(); +void MC_ddfs_init(void); void MC_ddfs(int search_cycle); void MC_show_stack_liveness(xbt_fifo_t stack); void MC_dump_stack_liveness(xbt_fifo_t stack);