Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
use named type of functions
authorMartin Quinson <martin.quinson@loria.fr>
Sat, 25 Feb 2012 16:59:50 +0000 (17:59 +0100)
committerMartin Quinson <martin.quinson@loria.fr>
Sat, 25 Feb 2012 16:59:50 +0000 (17:59 +0100)
src/mc/mc_liveness.c

index 3f0b223..c7b280f 100644 (file)
@@ -135,13 +135,13 @@ int reached(xbt_state_t st){
     
     xbt_dynar_t prop_ato = xbt_dynar_new(sizeof(int), NULL);
     int res;
     
     xbt_dynar_t prop_ato = xbt_dynar_new(sizeof(int), NULL);
     int res;
-    int (*f)();
+    int_f_void_t f;
 
     /* Get values of propositional symbols */
     unsigned int cursor = 0;
     xbt_propositional_symbol_t ps = NULL;
     xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
 
     /* Get values of propositional symbols */
     unsigned int cursor = 0;
     xbt_propositional_symbol_t ps = NULL;
     xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
-      f = (int (*)())ps->function;
+      f = (int_f_void_t)ps->function;
       res = (*f)();
       xbt_dynar_push_as(prop_ato, int, res);
     }
       res = (*f)();
       xbt_dynar_push_as(prop_ato, int, res);
     }
@@ -364,10 +364,10 @@ void set_pair_reached(xbt_state_t st){
   unsigned int cursor = 0;
   xbt_propositional_symbol_t ps = NULL;
   int res;
   unsigned int cursor = 0;
   xbt_propositional_symbol_t ps = NULL;
   int res;
-  int (*f)(); 
+  int_f_void_t f;
 
   xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
 
   xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
-    f = (int (*)())ps->function;
+    f = (int_f_void_t)ps->function;
     res = (*f)();
     xbt_dynar_push_as(pair->prop_ato, int, res);
   }
     res = (*f)();
     xbt_dynar_push_as(pair->prop_ato, int, res);
   }
@@ -429,10 +429,10 @@ int reached_hash(xbt_state_t st){
     unsigned int cursor = 0;
     xbt_propositional_symbol_t ps = NULL;
     int res;
     unsigned int cursor = 0;
     xbt_propositional_symbol_t ps = NULL;
     int res;
-    int (*f)();
+    int_f_void_t f;
 
     xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
 
     xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
-      f = (int (*)())ps->function;
+      f = (int_f_void_t)ps->function;
       res = (*f)();
       xbt_dynar_push_as(prop_ato, int, res);
     }
       res = (*f)();
       xbt_dynar_push_as(prop_ato, int, res);
     }
@@ -503,10 +503,10 @@ void set_pair_reached_hash(xbt_state_t st){
   unsigned int cursor = 0;
   xbt_propositional_symbol_t ps = NULL;
   int res;
   unsigned int cursor = 0;
   xbt_propositional_symbol_t ps = NULL;
   int res;
-  int (*f)();
+  int_f_void_t f;
 
   xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
 
   xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
-    f = (int (*)())ps->function;
+    f = (int_f_void_t)ps->function;
     res = (*f)();
     xbt_dynar_push_as(pair->prop_ato, int, res);
   }
     res = (*f)();
     xbt_dynar_push_as(pair->prop_ato, int, res);
   }
@@ -540,10 +540,10 @@ int visited(xbt_state_t st, int sc){
     unsigned int cursor = 0;
     xbt_propositional_symbol_t ps = NULL;
     int res;
     unsigned int cursor = 0;
     xbt_propositional_symbol_t ps = NULL;
     int res;
-    int (*f)();
+    int_f_void_t f;
 
     xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
 
     xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
-      f = (int (*)())ps->function;
+      f = (int_f_void_t)ps->function;
       res = (*f)();
       xbt_dynar_push_as(prop_ato, int, res);
     }
       res = (*f)();
       xbt_dynar_push_as(prop_ato, int, res);
     }
@@ -615,10 +615,10 @@ int visited_hash(xbt_state_t st, int sc){
     unsigned int cursor = 0;
     xbt_propositional_symbol_t ps = NULL;
     int res;
     unsigned int cursor = 0;
     xbt_propositional_symbol_t ps = NULL;
     int res;
-    int (*f)();
+    int_f_void_t f;
 
     xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
 
     xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
-      f = (int (*)())ps->function;
+      f = (int_f_void_t)ps->function;
       res = (*f)();
       xbt_dynar_push_as(prop_ato, int, res);
     }
       res = (*f)();
       xbt_dynar_push_as(prop_ato, int, res);
     }
@@ -693,10 +693,10 @@ void set_pair_visited_hash(xbt_state_t st, int sc){
   unsigned int cursor = 0;
   xbt_propositional_symbol_t ps = NULL;
   int res;
   unsigned int cursor = 0;
   xbt_propositional_symbol_t ps = NULL;
   int res;
-  int (*f)();
+  int_f_void_t f;
 
   xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
 
   xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
-    f = (int (*)())ps->function;
+    f = (int_f_void_t)ps->function;
     res = (*f)();
     xbt_dynar_push_as(pair->prop_ato, int, res);
   }
     res = (*f)();
     xbt_dynar_push_as(pair->prop_ato, int, res);
   }
@@ -727,10 +727,10 @@ void set_pair_visited(xbt_state_t st, int sc){
   unsigned int cursor = 0;
   xbt_propositional_symbol_t ps = NULL;
   int res;
   unsigned int cursor = 0;
   xbt_propositional_symbol_t ps = NULL;
   int res;
-  int (*f)();
+  int_f_void_t f;
 
   xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
 
   xbt_dynar_foreach(automaton->propositional_symbols, cursor, ps){
-    f = (int (*)())ps->function;
+    f = (int_f_void_t)ps->function;
     res = (*f)();
     xbt_dynar_push_as(pair->prop_ato, int, res);
   }
     res = (*f)();
     xbt_dynar_push_as(pair->prop_ato, int, res);
   }
@@ -770,10 +770,10 @@ int MC_automaton_evaluate_label(xbt_exp_label_t l){
   case 3 : { 
     unsigned int cursor = 0;
     xbt_propositional_symbol_t p = NULL;
   case 3 : { 
     unsigned int cursor = 0;
     xbt_propositional_symbol_t p = NULL;
-    int (*f)();
+    int_f_void_t f;
     xbt_dynar_foreach(automaton->propositional_symbols, cursor, p){
       if(strcmp(p->pred, l->u.predicat) == 0){
     xbt_dynar_foreach(automaton->propositional_symbols, cursor, p){
       if(strcmp(p->pred, l->u.predicat) == 0){
-       f = (int (*)())p->function;
+       f = (int_f_void_t)p->function;
        return (*f)();
       }
     }
        return (*f)();
       }
     }