/* 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 <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");
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_t
atomic_propositions)
{
-
- int raw_mem_set = (mmalloc_get_current_heap() == mc_heap);
-
- MC_SET_MC_HEAP;
+ xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
mc_visited_pair_t pair = NULL;
pair = MC_visited_pair_new(pair_num, automaton_state, atomic_propositions);
fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n",
initial_global_state->prev_pair, pair_test->num,
initial_global_state->prev_req);
-
- if (!raw_mem_set)
- MC_SET_STD_HEAP;
-
+ mmalloc_set_current_heap(heap);
return NULL;
}
}
}
}
-
- if (!raw_mem_set)
- MC_SET_STD_HEAP;
-
+ mmalloc_set_current_heap(heap);
return pair;
-
}
static void remove_acceptance_pair(int pair_num)
{
-
- int raw_mem_set = (mmalloc_get_current_heap() == mc_heap);
-
- MC_SET_MC_HEAP;
+ xbt_mheap_t heap = mmalloc_set_current_heap(mc_heap);
unsigned int cursor = 0;
mc_visited_pair_t pair_test = NULL;
MC_visited_pair_delete(pair_test);
}
- if (!raw_mem_set)
- MC_SET_STD_HEAP;
+ mmalloc_set_current_heap(heap);
}
MC_SET_MC_HEAP;
else
MC_SET_STD_HEAP;
-
-
}
void MC_modelcheck_liveness()
{
-
smx_process_t process;
mc_pair_t current_pair = NULL;