00001 #ifndef __ARC_H__
00002 #define __ARC_H__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00026 #include <stdio.h>
00027
00028 #include "defines.h"
00029
00030
00034 fsm_table* arc_create();
00035
00037 void arc_add(
00038 fsm_table* table,
00039 const vector* fr_st,
00040 const vector* to_st,
00041 int hit,
00042 bool exclude
00043 );
00044
00046 int arc_find_from_state(
00047 const fsm_table* table,
00048 const vector* st
00049 );
00050
00052 int arc_find_to_state(
00053 const fsm_table* table,
00054 const vector* st
00055 );
00056
00058 int arc_find_arc(
00059 const fsm_table* table,
00060 unsigned int fr_index,
00061 unsigned int to_index
00062 );
00063
00065 int arc_find_arc_by_exclusion_id(
00066 const fsm_table* table,
00067 int id
00068 );
00069
00071 void arc_get_stats(
00072 const fsm_table* table,
00073 int* state_hits,
00074 int* state_total,
00075 int* arc_hits,
00076 int* arc_total,
00077 int* arc_excluded
00078 );
00079
00081 void arc_db_write(
00082 const fsm_table* table,
00083 FILE* file
00084 );
00085
00087 void arc_db_read(
00088 fsm_table** table,
00089 char** line
00090 );
00091
00093 void arc_db_merge(
00094 fsm_table* table,
00095 char** line
00096 );
00097
00099 void arc_merge(
00100 fsm_table* base,
00101 const fsm_table* other
00102 );
00103
00105 void arc_get_states(
00106 char*** fr_states,
00107 unsigned int* fr_state_size,
00108 char*** to_states,
00109 unsigned int* to_state_size,
00110 const fsm_table* table,
00111 bool hit,
00112 bool any
00113 );
00114
00116 void arc_get_transitions(
00117 char*** from_states,
00118 char*** to_states,
00119 int** ids,
00120 int** excludes,
00121 char*** reasons,
00122 int* arc_size,
00123 const fsm_table* table,
00124 func_unit* funit,
00125 bool hit,
00126 bool any
00127 );
00128
00130 bool arc_are_any_excluded(
00131 const fsm_table* table
00132 );
00133
00135 void arc_dealloc(
00136 fsm_table* table
00137 );
00138
00139 #endif
00140