From ca1d6845a105833b182ffa3a962750b06f5fe1a5 Mon Sep 17 00:00:00 2001 From: Marion Guthmuller Date: Thu, 14 Jun 2012 23:19:21 +0200 Subject: [PATCH] model-checker : remove unused files --- examples/msg/mc/automaton.h | 115 ------- examples/msg/mc/automatonparse_promela.h | 26 -- examples/msg/mc/parserPromela.lex | 78 ----- examples/msg/mc/parserPromela.yacc | 76 ----- src/xbt/automaton.c | 366 ----------------------- src/xbt/automatonparse_promela.c | 101 ------- 6 files changed, 762 deletions(-) delete mode 100644 examples/msg/mc/automaton.h delete mode 100644 examples/msg/mc/automatonparse_promela.h delete mode 100644 examples/msg/mc/parserPromela.lex delete mode 100644 examples/msg/mc/parserPromela.yacc delete mode 100644 src/xbt/automaton.c delete mode 100644 src/xbt/automatonparse_promela.c diff --git a/examples/msg/mc/automaton.h b/examples/msg/mc/automaton.h deleted file mode 100644 index f140ed2e82..0000000000 --- a/examples/msg/mc/automaton.h +++ /dev/null @@ -1,115 +0,0 @@ -#ifndef _XBT_AUTOMATON_H -#define _XBT_AUTOMATON_H - -#include -#include -#include -#include -#include - -SG_BEGIN_DECL() - -typedef struct xbt_state { - char* id; - int type; /* -1 = init, 0 = inter, 1 = final */ - xbt_dynar_t in; - xbt_dynar_t out; -} s_xbt_state; - -typedef struct xbt_state* xbt_state_t; - -typedef struct xbt_automaton { - xbt_dynar_t propositional_symbols; - xbt_dynar_t transitions; - xbt_dynar_t states; - xbt_state_t current_state; -} s_xbt_automaton; - -typedef struct xbt_automaton* xbt_automaton_t; - -typedef struct xbt_exp_label{ - enum{or=0, and=1, not=2, predicat=3, one=4} type; - union{ - struct{ - struct xbt_exp_label* left_exp; - struct xbt_exp_label* right_exp; - }or_and; - struct xbt_exp_label* exp_not; - char* predicat; - }u; -} s_xbt_exp_label; - -typedef struct xbt_exp_label* xbt_exp_label_t; - - -typedef struct xbt_transition { - xbt_state_t src; - xbt_state_t dst; - xbt_exp_label_t label; -} s_xbt_transition; - -typedef struct xbt_transition* xbt_transition_t; - - -typedef struct xbt_propositional_symbol{ - char* pred; - void* function; -} s_xbt_propositional_symbol; - -typedef struct xbt_propositional_symbol* xbt_propositional_symbol_t; - - -XBT_PUBLIC(xbt_automaton_t) xbt_automaton_new_automaton(void); - -XBT_PUBLIC(xbt_state_t) xbt_automaton_new_state(xbt_automaton_t a, int type, char* id); - -XBT_PUBLIC(xbt_transition_t) xbt_automaton_new_transition(xbt_automaton_t a, xbt_state_t src, xbt_state_t dst, xbt_exp_label_t label); - -XBT_PUBLIC(xbt_exp_label_t) xbt_automaton_new_label(int type, ...); - -XBT_PUBLIC(xbt_dynar_t) xbt_automaton_get_states(xbt_automaton_t a); - -XBT_PUBLIC(xbt_dynar_t) xbt_automaton_get_transitions(xbt_automaton_t a); - -XBT_PUBLIC(xbt_transition_t) xbt_automaton_get_transition(xbt_automaton_t a, xbt_state_t src, xbt_state_t dst); - -XBT_PUBLIC(void) xbt_automaton_free_automaton(xbt_automaton_t a, void_f_pvoid_t transition_free_function); - -XBT_PUBLIC(void) xbt_automaton_free_state(xbt_automaton_t a, xbt_state_t s, void_f_pvoid_t transition_free_function); - -XBT_PUBLIC(void) xbt_automaton_free_transition(xbt_automaton_t a, xbt_transition_t t, void_f_pvoid_t transition_free_function); - -XBT_PUBLIC(xbt_state_t) xbt_automaton_transition_get_source(xbt_transition_t t); - -XBT_PUBLIC(xbt_state_t) xbt_automaton_transition_get_destination(xbt_transition_t t); - -XBT_PUBLIC(void) xbt_automaton_transition_set_source(xbt_transition_t t, xbt_state_t src); - -XBT_PUBLIC(void) xbt_automaton_transition_set_destination(xbt_transition_t t, xbt_state_t dst); - -XBT_PUBLIC(xbt_dynar_t) xbt_automaton_state_get_out_transitions(xbt_state_t s); - -XBT_PUBLIC(xbt_dynar_t) xbt_automaton_state_get_in_transitions(xbt_state_t s); - -XBT_PUBLIC(xbt_state_t) xbt_automaton_state_exists(xbt_automaton_t a, char *id); - -XBT_PUBLIC(void) xbt_automaton_display(xbt_automaton_t a); - -XBT_PUBLIC(void) xbt_automaton_display_exp(xbt_exp_label_t l); - -XBT_PUBLIC(xbt_propositional_symbol_t) xbt_new_propositional_symbol(xbt_automaton_t a, const char* id, void* fct); - -XBT_PUBLIC(xbt_state_t) xbt_automaton_get_current_state(xbt_automaton_t a); - -XBT_PUBLIC(int) automaton_state_compare(xbt_state_t s1, xbt_state_t s2); - -XBT_PUBLIC(int) propositional_symbols_compare_value(xbt_dynar_t s1, xbt_dynar_t s2); - -XBT_PUBLIC(int) automaton_transition_compare(const void *t1, const void *t2); - -XBT_PUBLIC(int) automaton_label_transition_compare(xbt_exp_label_t l1, xbt_exp_label_t l2); - - -SG_END_DECL() - -#endif diff --git a/examples/msg/mc/automatonparse_promela.h b/examples/msg/mc/automatonparse_promela.h deleted file mode 100644 index c80c34db2b..0000000000 --- a/examples/msg/mc/automatonparse_promela.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef _XBT_AUTOMATONPARSE_PROMELA_H -#define _XBT_AUTOMATONPARSE_PROMELA_H - -#include -#include -#include "xbt/automaton.h" - -SG_BEGIN_DECL() - -XBT_PUBLIC_DATA(xbt_automaton_t) automaton; - -XBT_PUBLIC(void) init(void); - -XBT_PUBLIC(void) new_state(char* id, int src); - -XBT_PUBLIC(void) new_transition(char* id, xbt_exp_label_t label); - -XBT_PUBLIC(xbt_exp_label_t) new_label(int type, ...); - -XBT_PUBLIC(xbt_automaton_t) get_automaton(void); - -XBT_PUBLIC(void) display_automaton(void); - -SG_END_DECL() - -#endif diff --git a/examples/msg/mc/parserPromela.lex b/examples/msg/mc/parserPromela.lex deleted file mode 100644 index f4c913280e..0000000000 --- a/examples/msg/mc/parserPromela.lex +++ /dev/null @@ -1,78 +0,0 @@ -%option noyywrap - -%{ - - -#include -#include "y.tab.h" - - extern YYSTYPE yylval; - -%} - -blancs [ \t]+ -espace [ ]+ -nouv_ligne [ \n] - -chiffre [0-9] -entier {chiffre}+ -reel {entier}("."{entier}) -caractere [a-zA-Z0-9_] - -numl \n - -chaine \"({caractere}*|\n|\\|\"|{espace}*)*\" - -commentaire "/*"([^\*\/]*{nouv_ligne}*[^\*\/]*)*"*/" - -%% - -"never" { printf("%s", yytext); return (NEVER); } -"if" { printf("%s", yytext); return (IF); } -"fi" { printf("%s", yytext); - return (FI); } -"->" { printf("%s", yytext); return (IMPLIES); } -"goto" { printf("%s", yytext); return (GOTO); } -"&&" { printf("%s", yytext); return (AND); } -"||" { printf("%s", yytext); return (OR); } -"!" { printf("%s", yytext); return (NOT); } -"(" { printf("%s", yytext); return (LEFT_PAR); } -")" { printf("%s", yytext); return (RIGHT_PAR); } -"::" { printf("%s", yytext); return (CASE); } -":" { printf("%s", yytext); return (COLON); } -";" { printf("%s", yytext); return (SEMI_COLON); } -"1" { printf("%s", yytext); return (CASE_TRUE); } -"{" { printf("%s", yytext); return (LEFT_BRACE); } -"}" { printf("%s", yytext); return (RIGHT_BRACE); } - - -{commentaire} { printf(" ");} - -{blancs} { printf("%s",yytext); } - - -{reel} { printf("%s",yytext); - sscanf(yytext,"%lf",&yylval.real); - return (LITT_REEL); } - -{entier} { printf("%s",yytext); - sscanf(yytext,"%d",&yylval.integer); - return (LITT_ENT); } - -{chaine} { printf("%s",yytext); - yylval.string=(char *)malloc(strlen(yytext)+1); - sscanf(yytext,"%s",yylval.string); - return (LITT_CHAINE); } - -[a-zA-Z]{caractere}* { printf("%s",yytext); - yylval.string=(char *)malloc(strlen(yytext)+1); - sscanf(yytext,"%s",yylval.string); - return (ID); } - -{numl} { printf("\n"); } - -. { printf("caractère inconnu\n"); } - -%% - - diff --git a/examples/msg/mc/parserPromela.yacc b/examples/msg/mc/parserPromela.yacc deleted file mode 100644 index f018f80d86..0000000000 --- a/examples/msg/mc/parserPromela.yacc +++ /dev/null @@ -1,76 +0,0 @@ -%{ - -#include "automaton.h" -#include "automatonparse_promela.h" -#include "lex.yy.c" - -void yyerror(const char *s); - -%} - -%union{ - double real; - int integer; - char* string; - xbt_exp_label_t label; -} - -%token NEVER -%token IF -%token FI -%token IMPLIES -%token GOTO -%token AND -%token OR -%token NOT -%token LEFT_PAR -%token RIGHT_PAR -%token CASE -%token COLON -%token SEMI_COLON -%token CASE_TRUE -%token LEFT_BRACE -%token RIGHT_BRACE -%token LITT_ENT -%token LITT_CHAINE -%token LITT_REEL -%token ID - -%type