arc.h
Go to the documentation of this file.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 unsigned int fr_width,
00114 unsigned int to_width
00115 );
00116
00118 void arc_get_transitions(
00119 char*** from_states,
00120 char*** to_states,
00121 int** ids,
00122 int** excludes,
00123 char*** reasons,
00124 int* arc_size,
00125 const fsm_table* table,
00126 func_unit* funit,
00127 bool hit,
00128 bool any,
00129 unsigned int fr_width,
00130 unsigned int to_width
00131 );
00132
00134 bool arc_are_any_excluded(
00135 const fsm_table* table
00136 );
00137
00139 void arc_dealloc(
00140 fsm_table* table
00141 );
00142
00143 #endif
00144