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
[mc] Add some FIXMEs for cross-process support
[simgrid.git]
/
src
/
mc
/
mc_liveness.c
diff --git
a/src/mc/mc_liveness.c
b/src/mc/mc_liveness.c
index
2c5ded0
..
f927f2f
100644
(file)
--- a/
src/mc/mc_liveness.c
+++ b/
src/mc/mc_liveness.c
@@
-4,10
+4,17
@@
/* 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. */
-#include "mc_private.h"
#include <unistd.h>
#include <sys/wait.h>
#include <unistd.h>
#include <sys/wait.h>
+#include <xbt/dynar.h>
+#include <xbt/automaton.h>
+
+#include "mc_request.h"
+#include "mc_liveness.h"
+#include "mc_private.h"
+#include "mc_record.h"
+
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_liveness, mc,
"Logging specific to algorithms for liveness properties verification");
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(mc_liveness, mc,
"Logging specific to algorithms for liveness properties verification");
@@
-26,7
+33,7
@@
static xbt_dynar_t get_atomic_propositions_values()
unsigned int cursor = 0;
xbt_automaton_propositional_symbol_t ps = NULL;
xbt_dynar_t values = xbt_dynar_new(sizeof(int), NULL);
unsigned int cursor = 0;
xbt_automaton_propositional_symbol_t ps = NULL;
xbt_dynar_t values = xbt_dynar_new(sizeof(int), NULL);
-
+ // FIXME, cross-process support
xbt_dynar_foreach(_mc_property_automaton->propositional_symbols, cursor, ps) {
f = (int_f_void_t) ps->function;
res = f();
xbt_dynar_foreach(_mc_property_automaton->propositional_symbols, cursor, ps) {
f = (int_f_void_t) ps->function;
res = f();
@@
-216,9
+223,6
@@
void MC_pre_modelcheck_liveness(void)
MC_wait_for_requests();
MC_wait_for_requests();
- MC_ignore_heap(simix_global->process_to_run->data, 0);
- MC_ignore_heap(simix_global->process_that_ran->data, 0);
-
MC_SET_MC_HEAP;
acceptance_pairs = xbt_dynar_new(sizeof(mc_visited_pair_t), NULL);
MC_SET_MC_HEAP;
acceptance_pairs = xbt_dynar_new(sizeof(mc_visited_pair_t), NULL);
@@
-243,7
+247,7
@@
void MC_pre_modelcheck_liveness(void)
initial_pair->graph_state = MC_state_new();
initial_pair->atomic_propositions = get_atomic_propositions_values();
initial_pair->graph_state = MC_state_new();
initial_pair->atomic_propositions = get_atomic_propositions_values();
- /* Get enabled process
and insert it
in the interleave set of the graph_state */
+ /* Get enabled process
es and insert them
in the interleave set of the graph_state */
xbt_swag_foreach(process, simix_global->process_list) {
if (MC_process_is_enabled(process)) {
MC_state_interleave_process(initial_pair->graph_state, process);
xbt_swag_foreach(process, simix_global->process_list) {
if (MC_process_is_enabled(process)) {
MC_state_interleave_process(initial_pair->graph_state, process);
@@
-255,7
+259,7
@@
void MC_pre_modelcheck_liveness(void)
initial_pair->search_cycle = 0;
xbt_fifo_unshift(mc_stack, initial_pair);
initial_pair->search_cycle = 0;
xbt_fifo_unshift(mc_stack, initial_pair);
-
+
MC_SET_STD_HEAP;
MC_modelcheck_liveness();
MC_SET_STD_HEAP;
MC_modelcheck_liveness();
@@
-301,7
+305,6
@@
void MC_modelcheck_liveness()
int value;
smx_simcall_t req = NULL;
int value;
smx_simcall_t req = NULL;
- char *req_str;
xbt_automaton_transition_t transition_succ;
unsigned int cursor = 0;
xbt_automaton_transition_t transition_succ;
unsigned int cursor = 0;
@@
-373,12
+376,7
@@
void MC_modelcheck_liveness()
}
MC_SET_STD_HEAP;
}
MC_SET_STD_HEAP;
- /* Debug information */
- if (XBT_LOG_ISENABLED(mc_liveness, xbt_log_priority_debug)) {
- req_str = MC_request_to_string(req, value);
- XBT_DEBUG("Execute: %s", req_str);
- xbt_free(req_str);
- }
+ MC_LOG_REQUEST(mc_liveness, req, value);
MC_SET_MC_HEAP;
if (dot_output != NULL) {
MC_SET_MC_HEAP;
if (dot_output != NULL) {
@@
-394,7
+392,7
@@
void MC_modelcheck_liveness()
mc_stats->executed_transitions++;
/* Answer the request */
mc_stats->executed_transitions++;
/* Answer the request */
- SIMIX_simcall_
pr
e(req, value);
+ SIMIX_simcall_
handl
e(req, value);
/* Wait for requests (schedules processes) */
MC_wait_for_requests();
/* Wait for requests (schedules processes) */
MC_wait_for_requests();
@@
-426,7
+424,7
@@
void MC_modelcheck_liveness()
next_pair->automaton_state = transition_succ->dst;
next_pair->atomic_propositions = get_atomic_propositions_values();
next_pair->automaton_state = transition_succ->dst;
next_pair->atomic_propositions = get_atomic_propositions_values();
- /* Get enabled process
and insert it
in the interleave set of the next graph_state */
+ /* Get enabled process
es and insert them
in the interleave set of the next graph_state */
xbt_swag_foreach(process, simix_global->process_list) {
if (MC_process_is_enabled(process)) {
MC_state_interleave_process(next_pair->graph_state, process);
xbt_swag_foreach(process, simix_global->process_list) {
if (MC_process_is_enabled(process)) {
MC_state_interleave_process(next_pair->graph_state, process);