-#include "automatonparse_promela.h"
+#include "xbt/automatonparse_promela.h"
+xbt_automaton_t automaton;
char* state_id_src;
void init(){
char* id_state = strdup(id);
char* first_part = strtok(id,"_");
- int type = 0 ; // -1=état initial, 0=état intermédiaire, 1=état final, 2=état initial/final
+ int type = 0 ; // -1=état initial, 0=état intermédiaire, 1=état final
if(strcmp(first_part,"accept")==0){
- char* second_part = strtok(NULL,"_");
- if(strcmp(second_part,"init")==0){
- type = 2;
- }else{
- type = 1;
- }
-
+ type = 1;
}else{
char* second_part = strtok(NULL,"_");
if(strcmp(second_part,"init")==0){
state = xbt_automaton_new_state(automaton, type, id_state);
}
- if(type==-1 || type==2)
+ if(type==-1)
automaton->current_state = state;
if(src)
state_dst = xbt_automaton_state_exists(automaton, id_state);
xbt_state_t state_src = xbt_automaton_state_exists(automaton, state_id_src);
- xbt_transition_t trans = NULL;
- trans = xbt_automaton_new_transition(automaton, state_src, state_dst, label);
+ //xbt_transition_t trans = NULL;
+ xbt_automaton_new_transition(automaton, state_src, state_dst, label);
}
return automaton;
}
-void display_automaton(){
- xbt_automaton_display(automaton);
-}