Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

/Users/trevorw/projects/release/covered-0.7.4/src/arc.h

Go to the documentation of this file.
00001 #ifndef __ARC_H__
00002 #define __ARC_H__
00003 
00004 /*
00005  Copyright (c) 2006-2009 Trevor Williams
00006 
00007  This program is free software; you can redistribute it and/or modify
00008  it under the terms of the GNU General Public License as published by the Free Software
00009  Foundation; either version 2 of the License, or (at your option) any later version.
00010 
00011  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
00012  without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00013  See the GNU General Public License for more details.
00014 
00015  You should have received a copy of the GNU General Public License along with this program;
00016  if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
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   /*@out@*/ int*             state_hits,
00074   /*@out@*/ int*             state_total,
00075   /*@out@*/ int*             arc_hits,
00076   /*@out@*/ int*             arc_total,
00077   /*@out@*/ 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   /*@out@*/ char***          from_states,
00118   /*@out@*/ char***          to_states,
00119   /*@out@*/ int**            ids,
00120   /*@out@*/ int**            excludes,
00121   /*@out@*/ char***          reasons,
00122   /*@out@*/ 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   /*@only@*/ fsm_table* table
00137 );
00138 
00139 #endif
00140 

Generated on Wed Jun 17 22:19:19 2009 for Covered by doxygen 1.3.4