A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
model-checker : udpate debug information
[simgrid.git]
/
src
/
mc
/
mc_state.c
diff --git
a/src/mc/mc_state.c
b/src/mc/mc_state.c
index
29621f1
..
c7ff71c
100644
(file)
--- a/
src/mc/mc_state.c
+++ b/
src/mc/mc_state.c
@@
-1,4
+1,4
@@
-/* Copyright (c) 2008-201
2
Da SimGrid Team. All rights reserved. */
+/* Copyright (c) 2008-201
3
Da SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
@@
-18,20
+18,8
@@
mc_state_t MC_state_new()
state->max_pid = simix_process_maxpid;
state->proc_status = xbt_new0(s_mc_procstate_t, state->max_pid);
state->system_state = NULL;
state->max_pid = simix_process_maxpid;
state->proc_status = xbt_new0(s_mc_procstate_t, state->max_pid);
state->system_state = NULL;
-
- mc_stats->expanded_states++;
- return state;
-}
-
-mc_state_t MC_state_pair_new(void)
-{
- mc_state_t state = NULL;
+ state->num = ++mc_stats->expanded_states;
- state = xbt_new0(s_mc_state_t, 1);
- state->max_pid = simix_process_maxpid;
- state->proc_status = xbt_new0(s_mc_procstate_t, state->max_pid);
-
- //mc_stats->expanded_states++;
return state;
}
return state;
}
@@
-121,12
+109,11
@@
void MC_state_set_executed_request(mc_state_t state, smx_simcall_t req, int valu
case SIMCALL_MC_RANDOM:
state->internal_req = *req;
case SIMCALL_MC_RANDOM:
state->internal_req = *req;
- simcall_mc_random__set__result(&state->internal_req, value);
- if(value == 0){
+ if(value != simcall_mc_random__get__max(req)){
xbt_swag_foreach(process, simix_global->process_list){
procstate = &state->proc_status[process->pid];
if(process->pid == req->issuer->pid){
xbt_swag_foreach(process, simix_global->process_list){
procstate = &state->proc_status[process->pid];
if(process->pid == req->issuer->pid){
- procstate->state = MC_MORE_INTERLEAVE;
+ procstate->state = MC_MORE_INTERLEAVE;
break;
}
}
break;
}
}
@@
-212,8
+199,10
@@
smx_simcall_t MC_state_get_request(mc_state_t state, int *value)
case SIMCALL_MC_RANDOM:
if(procstate->state == MC_INTERLEAVE)
*value = 0;
case SIMCALL_MC_RANDOM:
if(procstate->state == MC_INTERLEAVE)
*value = 0;
- else
- *value = 1;
+ else{
+ if(state->req_num < simcall_mc_random__get__max(&process->simcall))
+ *value = state->req_num + 1;
+ }
procstate->state = MC_DONE;
return &process->simcall;
break;
procstate->state = MC_DONE;
return &process->simcall;
break;