 
                 LOWER LEVEL FUNCTIONS OF THE SOFTWARE LIBRARY
                 -----------------------------------------
 
		          Himanshu A. Sanghavi 
		        Advisor : Dr. Vijay K. Garg 
	    Department of Electrical & Computer Engineering
		  The University of Texas at Austin 
		           Austin, Texas 78712.
			  August 1, 1991

		          Bharath S. Oruganti
		     Advisor : Dr. Ratnesh Kumar 
	           Department of Electrical Engineering 
		        University of Kentucky 
		     Lexington, Kentucky 40506.
			  August 1, 1997


                     	          Lower level functions:
                                      ----------------
 
 
int get_NTrans(ST_LIST*)
 
This function is used to compute the number of transitions in
a particular state of a FSM.  Its argument is a pointer to the
concerned state and it returns an integer corresponding to the
number of transitions in that state.
 
 
TR_LIST* find_trans(ST_LIST*, char*, char*)
 
This function is used to check if a particular transition
exists in a state.  The first argument is a pointer to the
state, the second is the name of the transition and the
third is the name of the state that the transition leads to.
It the transition exists, a pointer to it is returned.  If not,
a NULL pointer is returned.
 
 
TR_LIST* insert_trans(FSM*, ST_LIST*, char*, enum TYPE, char*)
 
This function inserts a transition in a state.  The first argument
is a pointer to the FSM and the second is a pointer to the state in
which the transition is to be inserted.  The third argument is the
name of the transition, the fourth is used to denote the type of the
transition (i.e. controllable or uncontrollable) and the last
argument is the name of the state that this transition leads to.
The function returns a pointer to the inserted transition.
 
 
void delete_trans(ST_LIST*, TR_LIST*)
 
This function is used to remove a transition from a particular state.
The first argument is a pointer to the concerned state and the second
argument is a pointer to the transition which is to be removed.
 
 
int get_NStates(FSM*)
 
This function is used to determine the number of states in a given
FSM.  A pointer to the FSM is given as its argument and the function
returns an integer corresponding to the number of states in the FSM.
 
 
ST_LIST* find_state(FSM*, char*)
 
This function is used to check if a particular state exists in a
state machine.  A pointer to the FSM and the name of the state
being searched for are the two arguments of the function.  It returns
a pointer to the state if it exists and a null pointer if it
does not.

ST_LIST* insert_state(FSM*, char*)
 
This function inserts a state in a FSM.  A pointer to the FSM in which
the state is to be inserted and the name of the state are given as
arguments to the function.  It returns a pointer to the inserted state.
 
 
void delete_state(FSM*, ST_LIST*)
 
This function is used to remove a state from a state machine.  The
first argument is a pointer to the FSM and the second argument is a
pointer to the state to be removed.
 
 
int find_name(NAME_LIST*, char*)
 
The reachability function returns a linked list of the names of
states which are reachable from the starting state.  This function
is used to check if a particular state exists in that list.  The
first argument is a pointer to the list and the second argument
is the name of the state being checked for.  The function returns
1 if the list contains the name of the state, 0 otherwise.
 
 
void delete_name(NAME_LIST**)
 
This function is used to delete the list of state names generated by
the reachability function.  It is used to free the storage used by
the list.
The function takes one argument which is a pointer to pointer to the
list of names.


Any comments, suggestions etc. are welcome.  Please direct them to:
 
Dr. Vijay K. Garg
Department of Electrical \& Computer Engineering
The University of Texas at Austin
Austin, TX 78712.
 
e-mail : vijay@pine.ece.utexas.edu
 
Dr. Ratnesh Kumar
Department of Electrical Engineering
University of Kentucky
Lexington, KY 40506.
 
e-mail : kumar@engr.uky.edu
