The net package

Routines for access internal data structure.



Routines for access internal data structure. Note: all the internal data structure fields MUST be accessed by using access functions and iterators by other packages. The hierarchy is constituted of four node TYPES (all represented by the same C type, net_node_t), defining the enumerated type net_node_e.
  - COMP is an instance of one of the types below. Actual/formal variables
  are matched by type and index.
  - FUNC is a user-defined combinational entity computing a function 
  or producing a constant value. Built-in functions, such as arithmetic
  functions, do not have a behavior (trel field) but only a name.
  - CFSM is a Finite State Machine
  - NET is a netlist of COMP nodes 
  
Each node can belong to at most one member for the following implementation classes, defining the enumerated type net_node_impl_e.
  - HW/SW determines the implementation technology.
  - USER/INTERFACE determines whether the node was part of the initial SHIFT
  specification or it was added by the partitioning procedures.
  
The implementation is implicitly propagated to all the descendants. This type is defined so that a SET of flag values can be associated with each node. Membership can be tested with the net_node_implem function. The only valid combinations are between the first and second class (e.g., HW + USER, not HW + SW). Each node has the following fields:
  - char *name;
  - net_node_e type;
  - implem_e implem;
  - st_table *attributes;	
        Symbol table of attributes (except for implem) defined in SHIFT with the
	%attr_name=attr_value syntax.
  - array_t *variables;	
	Array of net_var_t*, all listed together.
	Use the appropriate access functions to get those of a
	particular type.
  - trel_t *trel;
	Specification of the behavior of CFSM and FUNC nodes (it must be
	NIL for built-in FUNC nodes). It uses MDDs to represent a relation between
	CFSM input and state variables and a SINGLE variable, called _select.
	The _select value yelded under a given input combination by the MDD is used
	to index the outputs array. 
	Note that this representation supports NON_DETERMINISTIC CFSMs, but
	synthesis generally requires a DETERMINISTIC specification to operate
	correctly.
	The trel_t structure has the following fields.
     - mdd_manager *manager;
     - mdd_t *trel;
     - array_t *init;
		May be NIL.
		Indexed by net_node_trans_out_index, returns an array of
		int. The latter array is indexed by the output/state
		variable index (as returned by net_node_trans_out_index) and
		gives the set of initial values for each output.
     - array_t *outputs;
		Indexed by value of _select, returns an array of trel_out_t *.
		The latter array is indexed by the output/state
		variable index (as returned by net_node_trans_out_index) and contains
		either the constant value or the assignment source variable.
		The trel_out_t structure has the following fields.
         - trel_out_e type;
			May be CONST or VAR (for assignment)
		 - int value;
			Decoded symbolic value, if CONST.
	     - net_var_t *var;
			Source of assignment, if VAR.
  - array_t *comp;
	Array of net_node_t*.
	Contains the components of a NET node, NIL otherwise.
  - net_node_t *parent;	
	Pointer to the (unique) NET containing this node (only for COMP nodes).
	It is the inverse of the comp array.
  - array_t *instances;	
	Array of net_node_t* that use this node as model.
  - net_node_t *model;	
	Pointer to the model of this node (only for COMP nodes).
	It is the inverse of the instances array.
  - int flag;
	Utility flag used by traversal routines.
  - net_node_t *copy;
	Used during hierarchy duplication.
   - slots_t *slots;
	Pointer array that can be used to store any information other
	packages may need. Each package is initialized by registering its slot
	and receives back a unique integer identifier it can use as offset in the
	slots array. See also the documentation of the misc/daemon package.
  
The following masks are defined for selection in the various iterators: #define ALL_NODE_TYPE (NONE|NET|CFSM|FUNC|COMP) #define ALL_NODE_IMPL (NONE|HW|SW|USER|INTERFACE) Each variable can belong to at most one of each the following classes, defining the net_var_e type.
  - INPUT, OUTPUT, CONSTANT (hardy a variable, but allows uniform handling),
    INT (for internal variables of a NET), ST (for state variable of a CFSM).
  - VALUE (associated with an event, or pure value), EVENT (associated with a
    value, or pure event).
  - FORMAL (formal parameter of a CFSM, FUNC, or NET node; must be INPUT or 
	OUTPUT), ACTUAL (actual parameter of a COMP node).
  
Valid combinations include one member for each class (e.g., INPUT + VALUE + ACTUAL, not VALUE + EVENT). Each variable has the following fields.
  - char *name;
  - net_var_e type;
  - net_node_t *node;	
	Node to which the variable belongs (inverse of the variables array).
  - net_var_t *fanin;	
	Driving variable (non-NIL only for INPUT and INT variables within a NET).
  - array_t *fanout;  
	Driven variables (non-NIL only for OUTPUT variables within a NET).
  - net_var_t *assoc_var;
	Associated event or event carrier variable.
  - int id;		
	Unique identifier within transition relation MDD (NEVER use it directly,
	but only through access functions such as net_node_trans_in_by_index).
  - int index;	    
	Unique within each class (NEVER use it directly, but only through access 
	functions such as net_node_var_index, net_node_fanin_index, etc.)
  - int nval;	       	
	Number of values (zero for variables of COMP nodes).
  - array_t *values;	
	Array of strings giving symbolic value names (NIL if no symbolic names are
	defined or for variables of COMP nodes).
  - int value;	        
	Value (valid only for CONSTANTs).
  - net_var_t *copy;
	Used during hierarchy duplication.
  - slots_t *slots;
	Slots are pointer arrays that can be used to store any
	information other packages may need. Each package is
	initialized by registering ist slot and receives back a unique
	integer identifier it can use as offset in the slots
	array. See comment for node slots.
  
The following masks are defined for selection in the various iterators: #define ALL_VAR_TYPE (NONE|INPUT|OUTPUT|CONSTANT|INT|ST|VALUE|EVENT|FORMAL|ACTUAL|ACKNOWLEDGE)

debug_t * 
net_alloc_debug(
    
)
Allocates a new debug_t structure. It gives the following default values to the fields: orig_name=NIL(char), src_line=NIL(array_t).

See Also net_free_debug net_dup_debug
file_line_t * 
net_alloc_file_line(
    
)
Allocates a new file_line_t structure. It gives the following default values to the fields: file_name=NIL(char), file_type=NIL(char), line_num=0.

See Also net_free_file_line net_dup_file_line
net_node_t * 
net_alloc_node(
    
)
Allocates a new net_node_t structure. It gives the following default values to the fields: name=NIL(char), type=NONE, implementation is NONE, variables=NIL(array_t), var_table=NIL(st_table), trel=NIL(trel_t), comp=NIL(array_t), parent=NIL(net_node_t), instances=NIL(array_t), model=NIL(net_node_t), flag=DOWN, debug=NIL(debug_t), copy=NIL(net_node_t). It also allocates all slots of net_node_t.

See Also net_free_node net_dup_node
trel_out_t * 
net_alloc_trel_out(
    
)
Allocates a new trel_out_t structure. It gives the following default values to the fields: type=CONST, value=0, var=NIL(net_var_t).

See Also net_free_trel_out net_alloc_trel
trel_t * 
net_alloc_trel(
    
)
Allocates a new trel_t structure. It gives the following default values to the fields: trel=NIL(mdd_t), init=NIL(array_t), outputs=NIL(array_t).

See Also net_free_trel net_dup_trel
net_var_t * 
net_alloc_var(
    
)
Allocates a new net_var_t structure. It gives the following default values to the fields: name=NIL(char), type=NONE, node=NIL(net_node_t), fanin=NIL(net_var_t), fanout=NIL(array_t), assoc_var=NIL(net_var_t), id=0, index=0, nbit=1, nval=2, values=NIL(array_t), value=(-1), debug=NIL(debug_t), copy=NIL(net_var_t). It also allocates all slots of net_var_t.

See Also net_free_var net_dup_var net_dup_var_without_slot
array_t * 
net_dup_array_of_char(
  array_t * array 
)
Duplicates an array of strings. Strings themselves are also duplicated. If the function is called on a NIL array then it returns NIL.

See Also net_free_array_of_char
array_t * 
net_dup_array_of_file_line(
  array_t * array 
)
Duplicates an array of file_line_t structures. file_line_t structures themselves are also duplicated. If the function is called on a NIL array then it returns NIL.

See Also net_free_array_of_file_line
array_t * 
net_dup_array_of_node_pointer(
  array_t * array 
)
Duplicates an array of pointers to nodes. Nodes themselves are not duplicated. If the function is called on a NIL array then it returns NIL.

See Also net_free_array_of_node_pointer
st_table * 
net_dup_attributes(
  st_table * attr_table 
)
Duplicates the symbol table of attributes. Attribute names and values themselves are also duplicated. If the function is called on a NIL attr_table then it returns NIL.

See Also net_free_attributes
debug_t * 
net_dup_debug(
  debug_t * debug_inf 
)
Duplicates the debug_t structure. All fields of debug_t are also duplicated. If the function is called on a NIL debug information then it returns NIL.

See Also net_alloc_debug net_free_debug
file_line_t * 
net_dup_file_line(
  file_line_t * file_line 
)
Duplicates a file_line_t structure. All fields of file_line_t structures are also duplicated. If the function is called on a NIL file_line_t then it returns NIL.

See Also net_alloc_file_line net_free_file_line
net_node_t * 
net_dup_get_node_copy(
  net_node_t * node 
)
Returns the copy node. If the function is called on a NIL node then it returns a NIL.

See Also net_dup_get_node_original
net_node_t * 
net_dup_get_node_original(
  net_node_t * node 
)
Returns the original node. If the function is called on a NIL node then it returns a NIL.

See Also net_dup_get_node_copy
net_var_t * 
net_dup_get_var_copy(
  net_var_t * var 
)
Returns the copy variable. If the function is called on a NIL variable then it returns a NIL.

See Also net_dup_get_var_original
net_var_t * 
net_dup_get_var_original(
  net_var_t * var 
)
Returns the original variable. If the function is called on a NIL variable then it returns a NIL.

See Also net_dup_get_var_copy
net_node_t * 
net_dup_node_hierarchy(
  net_node_t * root_node 
)
Duplicates the hierarchy pointed by a node. All fields of all nodes in the hierarchy are also duplicated. If the function is called on a NIL node then it returns a NIL.

See Also net_dup_node net_free_node_hierarchy
void 
net_dup_node_pointer(
  net_node_t * node 
)
Duplicates all fields of a node which are pointers to other nodes or variables. The pointer fields of all variables of the node are also duplicated. The duplicated node is in node->copy field. Before calling this routine the user should call net_dup_node_struct routine for begining the duplication. If the function is called on a NIL var then it does not do anything.

See Also net_dup_node_struct
void 
net_dup_node_struct(
  net_node_t * node 
)
Duplicates all fields of a node which are not pointers to other nodes. The non pointer fields of all variables of the node are also duplicated. The duplicated node is in node->copy field. After calling this routine the user should call net_dup_node_pointer routine too for completing the duplication. If the function is called on a NIL node then it does not do anything.

See Also net_dup_node_pointer
net_node_t * 
net_dup_node(
  net_node_t * node 
)
Duplicates the node. All fields of node are also duplicated except for those related to the hierarchy: components, parent, instances, model. It does not duplicate the hierarchy. If the function is called on a NIL node then it returns a NIL.

See Also net_alloc_node net_free_node net_dup_node_hierarchy
array_t * 
net_dup_trel_init(
  array_t * init 
)
Duplicates the table of initial values of outputs of transition relation. Initial values themselves are also duplicated. If the function is called on a NIL init then it returns NIL.

See Also net_free_trel_init
trel_t * 
net_dup_trel(
  trel_t * trel 
)
Duplicates a trel_t structure. It duplicates the mdd manager, the transition relation, and the output functions. If the function is called on a NIL trel then it returns NIL.

See Also net_alloc_trel net_free_trel
void 
net_dup_var_pointer(
  net_var_t * var 
)
Duplicates all fields of a variable which are pointers to other nodes or variables. The duplicated var is in var->copy field. Before calling this routine the user should call net_dup_var_struct routine for begining the duplication. If the function is called on a NIL var then it does not do anything.

See Also net_dup_var_struct
void 
net_dup_var_struct(
  net_var_t * var 
)
Duplicates all fields of a variable which are not pointers to other nodes or variables. The duplicated var is in var->copy field. After calling this routine the user should call net_dup_var_pointer routine too for completing the duplication. If the function is called on a NIL var then it does not do anything.

See Also net_dup_var_pointer
net_var_t * 
net_dup_var_without_slot(
  net_var_t * var 
)
Duplicates the variable. All fields of variable are also duplicated except for slots. If the function is called on a NIL var then it returns a NIL.

See Also net_dup_var net_alloc_var net_free_var
net_var_t * 
net_dup_var(
  net_var_t * var 
)
Duplicates the variable. All fields of variable are also duplicated. If the function is called on a NIL var then it returns a NIL.

See Also net_dup_var_without_slot net_alloc_var net_free_var
void 
net_free_array_of_char(
  array_t * array 
)
Frees an array of strings. Strings themselves are also freed. If the function is called on a NIL array then it does not do anything.

See Also net_dup_array_of_char
void 
net_free_array_of_file_line(
  array_t * array 
)
Frees an array of file_line_t structures. file_line_t structures themselves are also freed. If the function is called on a NIL array then it does not do anything.

See Also net_dup_array_of_file_line
void 
net_free_array_of_inst(
  array_t * array 
)
Frees an array of instances. Instances themselves are not freed. Instances' model fields are deleted. If the function is called on a NIL array then it does not do anything.

void 
net_free_array_of_node_pointer(
  array_t * array 
)
Frees an array of pointers to nodes. Nodes themselves are not freed. If the function is called on a NIL array then it does not do anything.

See Also net_dup_array_of_node_pointer
void 
net_free_array_of_node(
  array_t * array 
)
Frees an array of net_node_t structures. net_node_t structures themselves and the hierarchies rooted by them are also freed. If the function is called on a NIL array then it does not do anything.

void 
net_free_array_of_trel_out(
  array_t * array 
)
Frees an array of trel_out_t structures. trel_out_t structures themselves are also freed. If the function is called on a NIL array then it does not do anything.

void 
net_free_array_of_var_pointer(
  array_t * array 
)
Frees an array of pointers to variables. Variables themselves are not freed. If the function is called on a NIL array then it does not do anything.

void 
net_free_array_of_var(
  array_t * array 
)
Frees an array of net_var_t structures. net_var_t structures themselves are also freed. If the function is called on a NIL array then it does not do anything.

void 
net_free_attributes(
  st_table * attr_table 
)
Frees the symbol table of attributes. Attribute names and values themselves are also freed. If the function is called on a NIL attr_table then it does not do anything.

See Also net_dup_attributes
void 
net_free_debug(
  debug_t * debug_inf 
)
Frees the debug_t structure. All fields of debug_t are also freed. If the function is called on a NIL debug information then it does not do anything.

See Also net_alloc_debug net_dup_debug
void 
net_free_file_line(
  file_line_t * file_line 
)
Frees a file_line_t structure. All fields of file_line_t structures are also freed. If the function is called on a NIL file_line then it does not do anything.

See Also net_alloc_file_line net_dup_file_line
void 
net_free_node_hierarchy(
  net_node_t * node 
)
Frees the hierarchy pointed by a node. All fields of all nodes in the hierarchy are also freed. If the function is called on a NIL node then it does not do anything.

See Also net_alloc_node net_dup_node_hierarchy
void 
net_free_node(
  net_node_t * node 
)
Frees the node. All fields of node are also freed. It does not free the hierarchy. If the function is called on a NIL node then it does not do anything.

See Also net_free_node_hierarchy net_alloc_node net_dup_node
void 
net_free_trel_init(
  array_t * init 
)
Frees the table of initial values of outputs of transition relation. Initial values themselves are also freed. If the function is called on a NIL init then it does not do anything.

See Also net_dup_trel_init
void 
net_free_trel_out(
  trel_out_t * trel_out 
)
Frees a trel_out_t structure. If the function is called on a NIL trel_out_t then it does not do anything.

See Also net_alloc_trel_out
void 
net_free_trel(
  trel_t * trel 
)
Frees a trel_t structure. If the function is called on a NIL trel then it does not do anything.

See Also net_alloc_trel net_dup_trel
void 
net_free_var(
  net_var_t * var 
)
Frees the variable. All fields of variable are also freed. It does not free the hierarchy. If the function is called on a NIL var then it does not do anything.

See Also net_alloc_var net_dup_var
void 
net_node_add_attribute_value(
  net_node_t * node, 
  char * attr_name, 
  char * attr_value 
)
Adds an attribute value to the node. User has to allocate attr_value string. If the function is called on a NIL parameter then it does not do anything.

See Also net_node_has_attribute_value net_node_reset_attribute_value
int 
net_node_add_comp(
  net_node_t * parent_node, 
  net_node_t * comp_node 
)
Adds a component to the node. The list of components dinamically grows getting the new component at the last position. It returns the index of the new component. If a component with the same name has already been added to the list then it returns (-2) and does not insert it. If the function is called on a NIL parameter then it returns (-1).

Side Effects The parent field of component node gets set.

See Also net_node_del_comp net_node_number_of_comp
int 
net_node_add_inst(
  net_node_t * model_node, 
  net_node_t * inst_node 
)
Adds a instance to the node. The list of instances dinamically grows getting the new instance at the last position. It returns the index of the new instance. If a instance with the same name has already been added to the list then it returns (-2) and does not insert it. If the function is called on a NIL parameter then it returns (-1).

Side Effects The model field of instance node gets set.

See Also net_node_del_inst net_node_number_of_inst
int 
net_node_add_trel_init(
  net_node_t * node, 
  net_var_t * var_out, 
  array_t * init_values 
)
Adds the array of initial values of a transition relation for a variable. If the function is called on a NIL parameter then it does not do anything. If initial values have already been given then it overwrites the old values and returns (-1), else 0.

See Also net_node_trel_init net_node_set_trel_init
int 
net_node_add_var(
  net_node_t * node, 
  net_var_t * var 
)
Adds a variable to the node. The list of variables dinamically grows getting the new variable at the last position. It returns the index of the new variable. If a variable with the same name has already been added to the list then it returns (-2) and does not insert it. If the function is called on a NIL parameter then it returns (-1).

Side Effects It also sets the index of the new variable.

See Also net_node_del_var net_node_var_by_index net_node_var_by_name net_node_number_of_var
net_node_t * 
net_node_comp_by_index(
  net_node_t * node, 
  int  comp_index 
)
Returns the indexed component of a node. The index gives the position of the component in the array of components of node. If the function is called on a NIL node or the given index is out of range then it returns NIL.

See Also net_node_comp_by_name net_node_number_of_comp
net_node_t * 
net_node_comp_by_name(
  net_node_t * node, 
  char * comp_name 
)
Returns the named component of a node. If the function is called on a NIL parameter or the component does not exist then it returns NIL.

See Also net_node_comp_by_index net_node_number_of_comp
net_var_t * 
net_node_const_by_index(
  net_node_t * node, 
  int  var_index 
)
Returns the indexed constant variable of a node. The index gives the position of the constant variable in a fictitious array of constant variables of node. If the function is called on a NIL node or the given index is out of range then it returns NIL.

See Also net_node_var_index net_node_var_by_index net_node_fanin_by_index net_node_fanout_by_index net_node_internal_by_index net_node_state_by_index net_node_trans_in_by_index net_node_trans_out_by_index
net_var_t * 
net_node_const_by_name(
  net_node_t * node, 
  char * name 
)
Returns the named constant variable of a node. If the function is called on a NIL parameter or the variable does not exist then it returns NIL.

See Also net_var_name net_var_set_name net_node_var_by_name net_node_fanin_by_name net_node_fanout_by_name net_node_internal_by_name net_node_state_by_name net_node_trans_in_by_name net_node_trans_out_by_name
int 
net_node_const_index(
  net_node_t * node, 
  net_var_t * var 
)
Returns the index of a constant variable of a node. The index gives the position of the constant variable in a fictitious array of constant variables of node. If the function is called on a NIL parameter then it returns (-1).

See Also net_node_var_by_index net_node_var_index net_node_fanin_index net_node_fanout_index net_node_internal_index net_node_state_index net_node_trans_in_index net_node_trans_out_index
void 
net_node_create_set_trel(
  net_node_t * node, 
  array_t * table 
)
Creates and sets the transition relation structure of a node. User has to give CFSM look-up table in a 2-dimension array which can be freed after the function call. The coloumns of this table correspond to CFSM variables in the following order: inputs, states => outputs, outputed states, not outputed states. The rows of this table correspond to the transitions of CFSM. An element of this table has to be a string and has to correspond to a value (a certain non or symbolic value, a don't care or an assigment for outputs only) of a variable. The value must not be out of range.

void 
net_node_debug_add_file_line(
  debug_t * node_debug, 
  file_line_t * file_line 
)
Adds a file_line structure to the debug structure. The list of file_line's dinamically grows getting the new structure at the last position. If the function is called on a NIL node then it does not do anything.

See Also net_node_file_line_set_file_name net_node_file_line_set_file_type net_node_file_line_set_line_num net_node_set_debug
char * 
net_node_debug_orig_name(
  debug_t * node_debug 
)
Returns the original name of a debug structure of a node. If the function is called on a NIL debug then it returns NIL.

See Also net_node_debug_set_orig_name
int 
net_node_debug_set_orig_name(
  debug_t * node_debug, 
  char * orig_name 
)
Sets the original name of a debug structure of a node. If the function is called on a NIL parameter then it does not do anything. If it is already set then it returns (-1), else 0.

See Also net_node_debug_orig_name net_node_set_debug
debug_t * 
net_node_debug(
  net_node_t * node 
)
Returns the debug structure of a node. If the function is called on a NIL node then it returns NIL.

See Also net_node_set_debug net_node_debug_orig_name
void 
net_node_del_comp(
  net_node_t * parent_node, 
  net_node_t * comp_node 
)
Deletes a component from the node. The list of components dinamically contracts. It does not free the component, it is the user's responsibility. The component node does not get freed. If the function is called on a NIL parameter then it does not do anything.

Side Effects The parent field of component node gets set to NIL.

See Also net_node_add_comp net_node_number_of_comp
void 
net_node_del_inst(
  net_node_t * model_node, 
  net_node_t * inst_node 
)
Deletes a instance from the node. The list of instances dinamically contracts. It does not free the instance, it is the user's responsibility. If the function is called on a NIL parameter then it does not do anything.

Side Effects The model field of instance node gets set to NIL.

See Also net_node_add_inst net_node_number_of_inst
void 
net_node_del_var(
  net_node_t * node, 
  net_var_t * var 
)
Deletes a variable from the node. The list of variables dinamically contracts updating indeces of all variables. It does not free the variable, it is the user's responsibility. If the function is called on a NIL parameter then it does not do anything.

Side Effects It also resets the association of the variable.

See Also net_node_add_var net_node_number_of_var
net_var_t * 
net_node_fanin_by_index(
  net_node_t * node, 
  int  var_index 
)
Returns the indexed fanin variable of a node. The index gives the position of the fanin variable in a fictitious array of fanin variables of node. If the function is called on a NIL node or the given index is out of range then it returns NIL.

See Also net_node_var_index net_node_var_by_index net_node_fanout_by_index net_node_const_by_index net_node_internal_by_index net_node_state_by_index net_node_trans_in_by_index net_node_trans_out_by_index
net_var_t * 
net_node_fanin_by_name(
  net_node_t * node, 
  char * name 
)
Returns the named fanin variable of a node. If the function is called on a NIL parameter or the variable does not exist then it returns NIL.

See Also net_var_name net_var_set_name net_node_var_by_name net_node_fanout_by_name net_node_const_by_name net_node_internal_by_name net_node_state_by_name net_node_trans_in_by_name net_node_trans_out_by_name
int 
net_node_fanin_index(
  net_node_t * node, 
  net_var_t * var 
)
Returns the index of a fanin variable of a node. The index gives the position of the fanin variable in a fictitious array of fanin variables of node. If the function is called on a NIL parameter then it returns (-1).

See Also net_node_var_by_index net_node_var_index net_node_fanout_index net_node_const_index net_node_internal_index net_node_state_index net_node_trans_in_index net_node_trans_out_index
net_var_t * 
net_node_fanout_by_index(
  net_node_t * node, 
  int  var_index 
)
Returns the indexed fanout variable of a node. The index gives the position of the fanout variable in a fictitious array of fanout variables of node. If the function is called on a NIL node or the given index is out of range then it returns NIL.

See Also net_node_var_index net_node_var_by_index net_node_fanin_by_index net_node_const_by_index net_node_internal_by_index net_node_state_by_index net_node_trans_in_by_index net_node_trans_out_by_index
net_var_t * 
net_node_fanout_by_name(
  net_node_t * node, 
  char * name 
)
Returns the named fanout variable of a node. If the function is called on a NIL parameter or the variable does not exist then it returns NIL.

See Also net_var_name net_var_set_name net_node_var_by_name net_node_fanin_by_name net_node_const_by_name net_node_internal_by_name net_node_state_by_name net_node_trans_in_by_name net_node_trans_out_by_name
int 
net_node_fanout_index(
  net_node_t * node, 
  net_var_t * var 
)
Returns the index of a fanout variable of a node. The index gives the position of the fanout variable in a fictitious array of fanout variables of node. If the function is called on a NIL parameter then it returns (-1).

See Also net_node_var_by_index net_node_var_index net_node_fanin_index net_node_const_index net_node_internal_index net_node_state_index net_node_trans_in_index net_node_trans_out_index
char * 
net_node_file_line_file_name(
  file_line_t * file_line 
)
Returns the file name of a file_line structure. If the function is called on a NIL node then it returns NIL.

See Also net_node_file_line_set_file_name
char * 
net_node_file_line_file_type(
  file_line_t * file_line 
)
Returns the file type of a file_line structure. If the function is called on a NIL node then it returns NIL.

See Also net_node_file_line_set_file_type
int 
net_node_file_line_line_num(
  file_line_t * file_line 
)
Returns the line number of a file_line structure. If the function is called on a NIL node then it returns NIL.

See Also net_node_file_line_set_line_num
int 
net_node_file_line_set_file_name(
  file_line_t * file_line, 
  char * file_name 
)
Sets the file name of a file_line structure. If the function is called on a NIL node then it does not do anything. If it is already set then it returns (-1), else 0.

See Also net_node_file_line_file_name net_node_debug_add_file_line
int 
net_node_file_line_set_file_type(
  file_line_t * file_line, 
  char * file_type 
)
Sets the file type of a file_line structure. If the function is called on a NIL node then it does not do anything. If it is already set then it returns (-1), else 0.

See Also net_node_file_line_file_type net_node_debug_add_file_line
int 
net_node_file_line_set_line_num(
  file_line_t * file_line, 
  int  line_num 
)
Sets the line number of a file_line structure. If the function is called on a NIL node then it does not do anything. If it is already set then it returns (-1), else 0.

See Also net_node_file_line_line_num net_node_debug_add_file_line
int 
net_node_flag(
  net_node_t * node 
)
Returns the flag of a node. If the function is called on a NIL node then it returns DOWN.

See Also net_node_set_flag net_node_reset_flag
enum st_retval 
net_node_free_st_key(
  char * key, 
  char * value, 
  char * arg 
)
Frees symbol table key. Returns ST_DELETE.

array_t * 
net_node_get_attribute_value_list(
  net_node_t * node, 
  char * attr_name 
)
Returns the array of values of an attribute of a node. User must not free this array. If the function is called on a NIL parameter or the given attribute does not exist then it returns NIL.

See Also net_node_set_attribute_value_list
char * 
net_node_get_first_attribute_value(
  net_node_t * node, 
  char * attr_name 
)
Returns the first value of an attribute of a node. User must not free this string. If the function is called on a NIL parameter or the given attribute does not exist then it returns NIL.

See Also net_node_add_attribute_value net_node_reset_attribute_value net_node_has_attribute_value
net_var_t * 
net_node_get_formal_variable(
  net_var_t * var 
)
Returns the formal variable of a variable. The given variable should be a variable of an instance (COMP) node. If the function is called on a NIL variable or the formal variable does not exist then it returns NIL.

int 
net_node_has_attribute_value(
  net_node_t * node, 
  char * attr_name, 
  char * attr_value 
)
Returns 1 if a node has the given attribute and value, else returns 0. If the function is called on a NIL parameter then it returns 0.

See Also net_node_add_attribute_value net_node_reset_attribute_value
char * 
net_node_implem_e_to_str(
  implem_e  impl_value 
)
Converts implementation given as an implem_e type number into string. The return string is not allocated.

See Also net_node_str_to_implem_e
int 
net_node_implem(
  net_node_t * node, 
  int  implem_mask 
)
Returns the value of a masked implementation of a node. The following implementations or their combination (e.g. HW|INTERFACE) are possible: NONE, HW, SW, USER and INTERFACE. User can also get the list of implementations by calling net_node_get_attribute_value( node,"impl"). If the function is called on a NIL node then it returns NONE.

See Also net_node_set_implem net_node_reset_implem net_node_get_attribute_value
net_node_t * 
net_node_inst_by_index(
  net_node_t * node, 
  int  inst_index 
)
Returns the indexed instance of a node. The index gives the position of the instance in the array of instances of node. If the function is called on a NIL node or the given index is out of range then it returns NIL.

See Also net_node_inst_by_name net_node_number_of_inst
net_node_t * 
net_node_inst_by_name(
  net_node_t * node, 
  char * inst_name 
)
Returns the named instance of a node. If the function is called on a NIL parameter or the instance does not exist then it returns NIL.

See Also net_node_inst_by_index net_node_inst_of_comp
net_var_t * 
net_node_internal_by_index(
  net_node_t * node, 
  int  var_index 
)
Returns the indexed internal variable of a node. The index gives the position of the internal variable in a fictitious array of internal variables of node. If the function is called on a NIL node or the given index is out of range then it returns NIL.

See Also net_node_var_index net_node_var_by_index net_node_fanin_by_index net_node_fanout_by_index net_node_const_by_index net_node_state_by_index net_node_trans_in_by_index net_node_trans_out_by_index
net_var_t * 
net_node_internal_by_name(
  net_node_t * node, 
  char * name 
)
Returns the named internal variable of a node. If the function is called on a NIL parameter or the variable does not exist then it returns NIL.

See Also net_var_name net_var_set_name net_node_var_by_name net_node_fanin_by_name net_node_fanout_by_name net_node_const_by_name net_node_state_by_name net_node_trans_in_by_name net_node_trans_out_by_name
int 
net_node_internal_index(
  net_node_t * node, 
  net_var_t * var 
)
Returns the index of a internal variable of a node. The index gives the position of the internal variable in a fictitious array of internal variables of node. If the function is called on a NIL parameter then it returns (-1).

See Also net_node_var_by_index net_node_var_index net_node_fanin_index net_node_fanout_index net_node_const_index net_node_state_index net_node_trans_in_index net_node_trans_out_index
net_node_t * 
net_node_model(
  net_node_t * node 
)
Returns the model node of a node. If the function is called on a NIL node then it returns NIL.

See Also net_node_set_model
char * 
net_node_name(
  net_node_t * node 
)
Returns the name of a node. User must not free this string. If the function is called on a NIL node then it returns NIL.

See Also net_node_set_name
int 
net_node_number_of_comp(
  net_node_t * node 
)
Returns the number of components of a node. If the function is called on a NIL node then it returns 0.

See Also net_node_comp_by_name net_node_comp_by_index net_node_add_comp net_node_del_comp
int 
net_node_number_of_const(
  net_node_t * node 
)
Returns the number of constant variables of a node. If the function is called on a NIL node then it returns 0.

See Also net_node_add_var net_node_number_of_var net_node_number_of_fanin net_node_number_of_fanout net_node_number_of_internal net_node_number_of_state net_node_number_of_trans_in net_node_number_of_trans_out
int 
net_node_number_of_fanin(
  net_node_t * node 
)
Returns the number of fanin variables of a node. If the function is called on a NIL node then it returns 0.

See Also net_node_add_var net_node_number_of_var net_node_number_of_fanout net_node_number_of_const net_node_number_of_internal net_node_number_of_state net_node_number_of_trans_in net_node_number_of_trans_out
int 
net_node_number_of_fanout(
  net_node_t * node 
)
Returns the number of fanout variables of a node. If the function is called on a NIL node then it returns 0.

See Also net_node_add_var net_node_number_of_var net_node_number_of_fanin net_node_number_of_const net_node_number_of_internal net_node_number_of_state net_node_number_of_trans_in net_node_number_of_trans_out
int 
net_node_number_of_inst(
  net_node_t * node 
)
Returns the number of instances of a node. If the function is called on a NIL node then it returns 0.

See Also net_node_inst_by_name net_node_inst_by_index net_node_add_inst net_node_del_inst
int 
net_node_number_of_internal(
  net_node_t * node 
)
Returns the number of internal variables of a node. If the function is called on a NIL node then it returns 0.

See Also net_node_add_var net_node_number_of_var net_node_number_of_fanin net_node_number_of_fanout net_node_number_of_const net_node_number_of_state net_node_number_of_trans_in net_node_number_of_trans_out
int 
net_node_number_of_state(
  net_node_t * node 
)
Returns the number of state variables of a node. If the function is called on a NIL node then it returns 0.

See Also net_node_add_var net_node_number_of_var net_node_number_of_fanin net_node_number_of_fanout net_node_number_of_const net_node_number_of_internal net_node_number_of_trans_in net_node_number_of_trans_out
int 
net_node_number_of_trans_in(
  net_node_t * node 
)
Returns the number of transition input variables (fanin or state) of a node. If the function is called on a NIL node then it returns 0.

See Also net_node_add_var net_node_number_of_var net_node_number_of_fanin net_node_number_of_fanout net_node_number_of_const net_node_number_of_internal net_node_number_of_state net_node_number_of_trans_out
int 
net_node_number_of_trans_out(
  net_node_t * node 
)
Returns the number of transition output variables (fanout or state) of a node. If the function is called on a NIL node then it returns 0.

See Also net_node_add_var net_node_number_of_var net_node_number_of_fanin net_node_number_of_fanout net_node_number_of_const net_node_number_of_internal net_node_number_of_state net_node_number_of_trans_in
int 
net_node_number_of_var(
  net_node_t * node 
)
Returns the number of variables of a node. If the function is called on a NIL node then it returns 0.

See Also net_node_add_var net_node_number_of_fanin net_node_number_of_fanout net_node_number_of_const net_node_number_of_internal net_node_number_of_state net_node_number_of_trans_in net_node_number_of_trans_out
net_node_t * 
net_node_parent(
  net_node_t * node 
)
Returns the parent node of a node. If the function is called on a NIL node then it returns NIL.

See Also net_node_set_parent
int 
net_node_reset_attribute_value(
  net_node_t * node, 
  char * attr_name, 
  char * attr_value 
)
Resets an attribute value from the node. If the function is called on a NIL parameter or the given attribute value does not exist then it returns (-1), else 1.

See Also net_node_add_attribute_value net_node_has_attribute_value
void 
net_node_reset_copy_all_var(
  net_node_t * root_node 
)
Resets copy flags of nodes and variables of the entire hierarchy. If the function is called on a NIL parameter then it does not do anything.

See Also net_node_reset_copy net_node_reset_copy_all
void 
net_node_reset_copy_all(
  net_node_t * node 
)
Resets the copy flags of a node and its all variables. If the function is called on a NIL parameter then it does not do anything.

See Also net_node_reset_copy net_node_reset_copy_all_var
void 
net_node_reset_copy(
  net_node_t * node 
)
Resets the copy flag of a node. If the function is called on a NIL parameter then it does not do anything.

See Also net_node_reset_copy_all net_node_reset_copy_all_var
void 
net_node_reset_flag_all(
  net_node_t * root_node, 
  int  type_mask, 
  int  implem_mask 
)
Resets flags of nodes of the entire hierarchy. Nodes are given by masks for type and implementation. If the function is called on a NIL parameter then it does not do anything.

See Also net_node_flag net_node_set_flag net_node_reset_flag
void 
net_node_reset_flag(
  net_node_t * node 
)
Resets the flag of a node. If the function is called on a NIL parameter then it does not do anything.

See Also net_node_flag net_node_set_flag net_node_reset_flag_all
void 
net_node_reset_implem(
  net_node_t * node, 
  int  implem_value 
)
Resets the implementation of a node. The following implementations or their combination (e.g. HW|INTERFACE) can be given: NONE, HW, SW, USER and INTERFACE. User also can reset the implementations by calling net_node_reset_attribute_value(node, "impl","value"). If the function is called on a NIL node then it does not do anything.

See Also net_node_implem net_node_set_implem net_node_reset_attribute_value
int 
net_node_set_attribute_value_list(
  net_node_t * node, 
  char * attr_name, 
  array_t * attr_list 
)
Sets the array of values of an attribute of a node. If the function is called on a NIL parameter it returns (-1), if the given attribute value already exists then it returns 1 else 0.

See Also net_node_get_attribute_value_list
int 
net_node_set_debug(
  net_node_t * node, 
  debug_t * node_debug 
)
Sets the debug structure of a node. If the function is called on a NIL parameter then it does not do anything. If it is already set then it returns (-1), else 0.

See Also net_node_debug net_node_debug_set_orig_name net_node_debug_add_file_line
void 
net_node_set_flag(
  net_node_t * node, 
  int  flag 
)
Sets the flag of a node. If the function is called on a NIL parameter then it does not do anything.

See Also net_node_flag net_node_reset_flag
void 
net_node_set_implem(
  net_node_t * node, 
  int  implem_value 
)
Sets the implementation of a node. The following implementations or their combination (e.g. HW|INTERFACE) are possible: NONE, HW, SW, USER and INTERFACE. NONE implementation gets deleted. User also can set the implementations by calling net_node_add_attribute_value(node, "impl","value"). If the function is called on a NIL node then it does not do anything.

See Also net_node_implem net_node_reset_implem net_node_add_attribute_value
void 
net_node_set_model(
  net_node_t * node, 
  net_node_t * model_node 
)
Sets the model node of a node. If the function is called on a NIL parameter then it does not do anything.

See Also net_node_model
void 
net_node_set_name(
  net_node_t * node, 
  char * name 
)
Sets the name of a node. User has to allocate this string. If the node already has got a name then it frees the old name. If the function is called on a NIL node then it does not do anything.

See Also net_node_name
void 
net_node_set_parent(
  net_node_t * node, 
  net_node_t * parent_node 
)
Sets the parent node of a node. If the function is called on a NIL parameter then it does not do anything.

See Also net_node_parent
void 
net_node_set_trel_init(
  trel_t * trel, 
  array_t * init 
)
Sets the table of initial values of a transition relation. If the function is called on a NIL parameter then it does not do anything.

See Also net_node_trel_init net_node_add_trel_init
void 
net_node_set_trel_manager(
  trel_t * trel, 
  mdd_manager * manager 
)
Sets the MDD manager of a transition relation. If the function is called on a NIL parameter then it does not do anything.

See Also net_node_trel_manager
void 
net_node_set_trel_out_table(
  trel_t * trel, 
  array_t * outputs 
)
Sets the table of trel_out structures of a transititon relation. If the function is called on a NIL parameter then it does not do anything.

See Also net_node_trel_out_table
void 
net_node_set_trel_out_type(
  trel_out_t * trel_out, 
  trel_out_e  type 
)
Sets the type of a trel_out structure. If the function is called on a NIL trel_out structure then it does not do anything.

See Also net_node_trel_out_type
void 
net_node_set_trel_out_value(
  trel_out_t * trel_out, 
  int  value 
)
Sets the value of a trel_out structure. If the function is called on a NIL trel_out structure then it does not do anything.

See Also net_node_trel_out_value
void 
net_node_set_trel_out_var(
  trel_out_t * trel_out, 
  net_var_t * var 
)
Sets the assigned variable of a trel_out structure. If the function is called on a parameter then it does not do anything.

See Also net_node_trel_out_var
void 
net_node_set_trel_out(
  net_node_t * node, 
  trel_out_t * trel_out, 
  int  var_index, 
  int  select_value 
)
Sets the trel_out (indexed by a _select value) of a CFSM output variable. If the function is called on a NIL parameter then it does not do anything.

See Also net_node_trel_out
void 
net_node_set_trel_trel(
  trel_t * trel, 
  mdd_t * func 
)
Sets the MDD representation of a transition relation. If the function is called on a parameter then it does not do anything.

See Also net_node_trel_trel
void 
net_node_set_trel(
  net_node_t * node, 
  trel_t * trel 
)
Sets the transition relation structure to a node. If the function is called on a NIL node then it does not do anything.

See Also net_node_trel
void 
net_node_set_type(
  net_node_t * node, 
  net_node_e  type 
)
Sets the type of a node. The following types can be given: NONE, NET, CFSM, FUNC and COMP. Old type gets overwritten. If the function is called on a NIL node then it does not do anything.

See Also net_node_type
net_var_t * 
net_node_state_by_index(
  net_node_t * node, 
  int  var_index 
)
Returns the indexed state variable of a node. The index gives the position of the state variable in a fictitious array of state variables of node. If the function is called on a NIL node or the given index is out of range then it returns NIL.

See Also net_node_var_index net_node_var_by_index net_node_fanin_by_index net_node_fanout_by_index net_node_const_by_index net_node_internal_by_index net_node_trans_in_by_index net_node_trans_out_by_index
net_var_t * 
net_node_state_by_name(
  net_node_t * node, 
  char * name 
)
Returns the named state variable of a node. If the function is called on a NIL parameter or the variable does not exist then it returns NIL.

See Also net_var_name net_var_set_name net_node_var_by_name net_node_fanin_by_name net_node_fanout_by_name net_node_const_by_name net_node_internal_by_name net_node_trans_in_by_name net_node_trans_out_by_name
int 
net_node_state_index(
  net_node_t * node, 
  net_var_t * var 
)
Returns the index of a state variable of a node. The index gives the position of the state variable in a fictitious array of state variables of node. If the function is called on a NIL parameter then it returns (-1).

See Also net_node_var_by_index net_node_var_index net_node_fanin_index net_node_fanout_index net_node_const_index net_node_internal_index net_node_trans_in_index net_node_trans_out_index
implem_e 
net_node_str_to_implem_e(
  char * impl_char 
)
Converts implementation given as a string into implem_e type. If the function is called on a NIL impl then it returns 0.

See Also net_node_implem_e_to_str
net_var_t * 
net_node_trans_in_by_index(
  net_node_t * node, 
  int  var_index 
)
Returns the indexed transition input variable of a node. The index gives the position of the transition input variable in a fictitious array includes fanin and state variables. If the function is called on a NIL node or the given index is out of range then it returns NIL.

See Also net_node_var_index net_node_var_by_index net_node_fanin_by_index net_node_fanout_by_index net_node_const_by_index net_node_internal_by_index net_node_state_by_index net_node_trans_out_by_index
net_var_t * 
net_node_trans_in_by_name(
  net_node_t * node, 
  char * name 
)
Returns the named transition input variable (fanin or state) of a node. If the function is called on a NIL parameter or the variable does not exist then it returns NIL.

See Also net_var_name net_var_set_name net_node_var_by_name net_node_fanin_by_name net_node_fanout_by_name net_node_const_by_name net_node_internal_by_name net_node_state_by_name net_node_trans_out_by_name
int 
net_node_trans_in_index(
  net_node_t * node, 
  net_var_t * var 
)
Returns the index of a transition input variable of a node. The index gives the position of the transition input variable in a fictitious array includes fanin and state variables. If the function is called on a NIL parameter then it returns (-1).

See Also net_node_var_by_index net_node_var_index net_node_fanin_index net_node_fanout_index net_node_const_index net_node_internal_index net_node_state_index net_node_trans_out_index
net_var_t * 
net_node_trans_out_by_index(
  net_node_t * node, 
  int  var_index 
)
Returns the indexed transition output variable of a node. The index gives the position of the transition output variable in a fictitious array includes fanout, outputed state not outputed state variables. If the function is called on a NIL node or the given index is out of range then it returns NIL.

See Also net_node_var_index net_node_var_by_index net_node_fanin_by_index net_node_fanout_by_index net_node_const_by_index net_node_internal_by_index net_node_state_by_index net_node_trans_in_by_index
net_var_t * 
net_node_trans_out_by_name(
  net_node_t * node, 
  char * name 
)
Returns the named transition output variable (fanout or state) of a node. If the function is called on a NIL parameter or the variable does not exist then it returns NIL.

See Also net_var_name net_var_set_name net_node_var_by_name net_node_fanin_by_name net_node_fanout_by_name net_node_const_by_name net_node_internal_by_name net_node_state_by_name net_node_trans_in_by_name
int 
net_node_trans_out_index(
  net_node_t * node, 
  net_var_t * var 
)
Returns the index of a transition output variable of a node. The index gives the position of the transition output variable in a fictitious array includes fanout, outputed state and not outputed state variables. If the function is called on a NIL parameter then it returns (-1).

See Also net_node_var_by_index net_node_var_index net_node_fanin_index net_node_fanout_index net_node_const_index net_node_internal_index net_node_state_index net_node_trans_in_index
array_t * 
net_node_trel_init(
  trel_t * trel 
)
Returns the table of initial values of a transition relation. If the function is called on a NIL transition relation then it returns NIL.

See Also net_node_set_trel_init net_node_add_trel_init
mdd_manager * 
net_node_trel_manager(
  trel_t * trel 
)
Returns the MDD manager of a transition relation. If the function is called on a NIL transition relation then it returns NIL.

See Also net_node_set_trel_manager
array_t * 
net_node_trel_out_table(
  trel_t * trel 
)
Returns the table of trel_out structures of a transititon relation. If the function is called on a NIL transititon relation then it returns NIL.

See Also net_node_set_trel_out_table
trel_out_e 
net_node_trel_out_type(
  trel_out_t * trel_out 
)
Returns the type of a trel_out structure. If the function is called on a NIL trel_out structure then it returns NONE.

See Also net_node_set_trel_out_type
int 
net_node_trel_out_value(
  trel_out_t * trel_out 
)
Returns the value of a trel_out structure. If the function is called on a NIL trel_out structure then it returns (-1).

See Also net_node_set_trel_out_value
net_var_t * 
net_node_trel_out_var(
  trel_out_t * trel_out 
)
Returns the assigned variable of a trel_out structure. If the function is called on a NIL trel_out structure then it returns (-1).

See Also net_node_set_trel_out_var
trel_out_t * 
net_node_trel_out(
  net_node_t * node, 
  int  var_index, 
  int  select_value 
)
Returns the trel_out (indexed by a _select value) of a CFSM output variable. If the function is called on a NIL node or the indexed trel_out does not exist then it returns NIL.

See Also net_node_set_trel_out
mdd_t * 
net_node_trel_trel(
  trel_t * trel 
)
Returns the MDD representation of a transition relation. If the function is called on a NIL transition relation then it returns NIL.

See Also net_node_set_trel_trel
trel_t * 
net_node_trel(
  net_node_t * node 
)
Returns the transition relation structure of a node. If the function is called on a NIL node or the transition relation does not exist then it returns NIL.

See Also net_node_set_trel
net_node_e 
net_node_type(
  net_node_t * node 
)
Returns the type of a node. The following types are possible: NONE, NET, CFSM, FUNC, and COMP. If the function is called on a NIL node then it returns NONE.

See Also net_node_set_type
net_var_t * 
net_node_var_by_index(
  net_node_t * node, 
  int  var_index 
)
Returns the indexed variable of a node. The index gives the position of the variable in the array of variables of node. If the function is called on a NIL node or the given index is out of range then it returns NIL.

See Also net_node_var_index net_node_fanin_by_index net_node_fanout_by_index net_node_const_by_index net_node_internal_by_index net_node_state_by_index net_node_trans_in_by_index net_node_trans_out_by_index
net_var_t * 
net_node_var_by_name(
  net_node_t * node, 
  char * var_name 
)
Returns the named variable of a node. If the function is called on a NIL parameter or the variable does not exist then it returns NIL.

See Also net_var_name net_var_set_name net_node_fanin_by_name net_node_fanout_by_name net_node_const_by_name net_node_internal_by_name net_node_state_by_name net_node_trans_in_by_name net_node_trans_out_by_name
int 
net_node_var_index(
  net_node_t * node, 
  net_var_t * var 
)
Returns the index of a variable of a node. The index gives the position of the variable in the array of variables of node. If the function is called on a NIL parameter then it returns (-1).

See Also net_node_var_by_index net_node_fanin_index net_node_fanout_index net_node_const_index net_node_internal_index net_node_state_index net_node_trans_in_index net_node_trans_out_index
void 
net_print_node_atrb(
  FILE * print_out, 
  net_node_t * node 
)
Prints the attributes of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_comp(
  FILE * print_out, 
  net_node_t * node 
)
Prints the components of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_const(
  FILE * print_out, 
  net_node_t * node 
)
Prints the constant variables of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_fanin(
  FILE * print_out, 
  net_node_t * node 
)
Prints the fanin variables of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_fanout(
  FILE * print_out, 
  net_node_t * node 
)
Prints the fanout variables of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_hierarchy_short(
  FILE * print_out, 
  net_node_t * root_node 
)
Prints the entire data structure in a short way of hierarchy rooted by a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_hierarchy(
  FILE * print_out, 
  net_node_t * root_node 
)
Prints the entire data structure of hierarchy rooted by a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_implem(
  FILE * print_out, 
  net_node_t * node 
)
Prints the implementation of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_instance(
  FILE * print_out, 
  net_node_t * node 
)
Prints the instances of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_internal(
  FILE * print_out, 
  net_node_t * node 
)
Prints the internal variables of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_model(
  FILE * print_out, 
  net_node_t * node 
)
Prints the model node of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_name(
  FILE * print_out, 
  net_node_t * node 
)
Prints the name of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_parent(
  FILE * print_out, 
  net_node_t * node 
)
Prints the parent node of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_short(
  FILE * print_out, 
  net_node_t * node 
)
Prints the data structure in a short way of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_state(
  FILE * print_out, 
  net_node_t * node 
)
Prints the state variables of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_trel(
  FILE * print_out, 
  net_node_t * node 
)
Prints the look-up table of transition relation of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node_type(
  FILE * print_out, 
  net_node_t * node 
)
Prints the type of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_node(
  FILE * print_out, 
  net_node_t * node 
)
Prints the entire data structure of a node. If the function is called on a NIL node then it does not do anything.

void 
net_print_var_assoc(
  FILE * print_out, 
  net_var_t * var 
)
Prints the association of a variable. If the function is called on a NIL var then it does not do anything.

void 
net_print_var_const_value(
  FILE * print_out, 
  net_var_t * var 
)
Prints the value of a constant variable. If the function is called on a NIL var or it is not a constant then it does not do anything.

void 
net_print_var_fanin(
  FILE * print_out, 
  net_var_t * var 
)
Prints the fanin variable of a variable. If the function is called on a NIL var then it does not do anything.

void 
net_print_var_fanout(
  FILE * print_out, 
  net_var_t * var 
)
Prints the fanout variables of a variable. If the function is called on a NIL var then it does not do anything.

void 
net_print_var_id(
  FILE * print_out, 
  net_var_t * var 
)
Prints the identifier of a variable. If the function is called on a NIL var then it does not do anything.

void 
net_print_var_index(
  FILE * print_out, 
  net_var_t * var 
)
Prints the index of a variable. If the function is called on a NIL var then it does not do anything.

void 
net_print_var_name(
  FILE * print_out, 
  net_var_t * var 
)
Prints the name of a variable. If the function is called on a NIL var then it does not do anything.

void 
net_print_var_nbit(
  FILE * print_out, 
  net_var_t * var 
)
Prints the number of representing bits of a variable. If the function is called on a NIL var then it does not do anything.

void 
net_print_var_node(
  FILE * print_out, 
  net_var_t * var 
)
Prints the node the variable belongs to. If the function is called on a NIL var then it does not do anything.

void 
net_print_var_nval(
  FILE * print_out, 
  net_var_t * var 
)
Prints the number of values of a variable. If the function is called on a NIL var then it does not do anything.

void 
net_print_var_short(
  FILE * print_out, 
  net_var_t * var, 
  int * nc 
)
Prints the data structure in a short way of a variable. If the function is called on a NIL var then it does not do anything.

void 
net_print_var_type(
  FILE * print_out, 
  net_var_t * var 
)
Prints the type of a variable. If the function is called on a NIL var then it does not do anything.

void 
net_print_var(
  FILE * print_out, 
  net_var_t * var 
)
Prints the entire data structure of a variable. If the function is called on a NIL var then it does not do anything.

implem_e 
net_util_all_comp_implem(
  net_node_t * model_node 
)
Returns the common implementation of subcomponents of a component NET node. If they are different then it returns NONE.

int 
net_util_build_hierarchy(
  st_table * models, 
  net_node_t * node 
)
Builds up the network of hierarchy of net nodes from a list of models. The root of hierarchy is the given node. If an error occurs it returns (-1), else 0.

char * 
net_util_cat_path_names(
  char * string1, 
  char * string2 
)
Concatenates two strings inserting '/' between them.

char * 
net_util_cat_string(
  array_t * array, 
  int  string_index 
)
Concatenates items of array of strings from an index.

int 
net_util_cluster_comp(
  net_node_t * root_node, 
  char * cluster_comp_name, 
  char * cluster_model_name, 
  net_node_t * comp_node, 
  int  absorb_const, 
  int  not_simpl 
)
Cluster the component node into a NET model node. If the NET model node does not exist then it creates a new one. If absorb_const is TRUE then constants which drives fanin of component node is copied inside the NET. If not_simpl is TRUE then it does not optimize the fanin and fanout variables of NET model node after clustering. Returns the common implementation of subcomponents of a component NET node. If the clustering is successful then it returns TRUE, else FALSE with an error message to the output of polis error.

See Also net_util_opt_comp_var net_util_cluster_root
int 
net_util_cluster_root(
  net_node_t * root_node 
)
Cluster the components of root into two partitions "part_hw" and "part_sw". It groups them according to the implementation ( HW, SW ) of component. If the clustering is successful then it returns TRUE, otherwise FALSE with an error message to the output of polis error.

See Also net_util_cluster_comp net_util_partition
int 
net_util_comp_range(
  net_var_t * driver, 
  net_var_t * sink 
)
Compares the ranges of two variables. The driver's range should be less than or equal to the sink's range. If it is not then it returns (-1), if there is a type mismatch then it returns (-2), else 0.

See Also net_util_range_check_hierarchy
int 
net_util_comp_trel_out(
  trel_out_t *t1, * t2 
)
Compares two transition relation outputs. If they are equal then it returns 0, else a non zero value.

int 
net_util_conn_check_hierarchy(
  net_node_t * root_node 
)
Checks connectivities of NET nodes in the hierarchy. It looks for not used, not driven or not properly driven variables. If the network is correct then it returns 0, else (-1).

See Also net_util_sem_check_hierarchy
array_t * 
net_util_create_array_of_vars(
  net_node_t * node, 
  int  type_mask 
)
Returns the array of variables have the given type. If the function is called on a NIL node or there is no such type variable then it returns NIL.

st_table * 
net_util_create_output_pattern_table(
  array_t * look_up_table, 
  int  first_out_index 
)
Converts the outputs of look-up table into symbol table. For the same outputs there is only one item in the table, therefore the number of _select values is minimized.

int 
net_util_deterministic_cfsm_hierarchy(
  net_node_t * root_node 
)
Checks determinism of CFSM nodes of the hierarchy. If there is a non deterministic CFSM then it returns (-1), else 0.

See Also net_util_deterministic_cfsm
int 
net_util_deterministic_cfsm(
  net_node_t * cfsm_node 
)
Checks determinism of a CFSM node. If it is deterministic then it returns 1, else 0.

See Also net_util_deterministic_cfsm_hierarchy
int 
net_util_event_present_cfsm_hierarchy(
  net_node_t * root_node 
)
Checks presence of event variables in CFSM nodes of the hierarchy. If there is no a state variable in a CFSM node then it returns (-1), else 0.

See Also net_util_state_present_not_cfsm_hierarchy net_util_sem_check_hierarchy
void 
net_util_flatten_comp(
  net_node_t * comp_node 
)
Flattens a NET component node. It deletes the original component node moving all its subcomponents one level up in the hierarchy. It prefixes the names of subcomponents and their connections by the deleted component's name.

Side Effects The component node is deleted from the list of instances of its model node.

See Also net_util_flatten_hierarchy net_util_part_flatten
void 
net_util_flatten_hierarchy(
  net_node_t * root_node 
)
Flattens the hierarchy rotted by a node. It deletes all NET component node of the entire hierarchy. It prefixes the names of subcomponents and their connections by the path they are reached in the original hierarchy.

See Also net_util_flatten_comp net_util_part_flatten
int 
net_util_ilog2(
  int  n 
)
Returns the minimum number of bits required to encode the input.

See Also net_util_min_power_two
int 
net_util_index_of_var_by_type(
  net_node_t * node, 
  net_var_t * var, 
  int  var_type 
)
Returns the index of specified type variable of a node. If the function is called on a NIL node or the variable does not exist then it returns (-1).

int 
net_util_is_dont_care(
  array_t * array, 
  int  first_index, 
  int  length 
)
Tests don't care in a section of array. Returns TRUE if all bits of a section of array are don't care (=2), else FALSE.

int 
net_util_map_var_value(
  net_node_t * node, 
  char * var_name, 
  char * sym_value 
)
Maps the symbolic value into integer of a variable. If value is don't care "-" then it returns (-1). If symbolic value is not defined then it returns (-2).

See Also net_util_remap_var_value
int 
net_util_max_length_input_var_value(
  net_var_t * var 
)
Returns the maximum number of characters of possible values and name of a variable. The variable is considered to be an input of the transition look-up table. It can be used for tabulation of look-up table in printing. If the function is called on a NIL var then it returns 0.

See Also net_util_max_length_output_var_value
int 
net_util_max_length_output_var_value(
  net_node_t * node, 
  int  var_index 
)
Returns the maximum number of characters of values, assignments and name of the indexed variable. The variable is considered to be an output of the transition look-up table. It can be used for tabulation of look-up table in printing. If the function is called on a NIL node or var_index is out of range then it returns 0.

See Also net_util_max_length_input_var_value
void 
net_util_mdd_cube_to_look_up_table(
  mdd_manager * manager, 
  array_t * lit_cube, 
  array_t * look_up_table 
)
Converts MDD cube into a set of multi valued cubes of look-up table. It allocates and inserts new rows into look-up table. It supposes the natural ordering of encoded variables. An example:
  Variable ranges:			2	4	3	6
 					---------------------------
  Encoded binary cube:			0	21	22	101
 					---------------------------
  New encoded binary cubes:		0	01	22	101
 					0	11	22	101
					---------------------------
  Generated multi valued cubes:	        0	1	-	5
 					0	3	-	5

See Also net_util_mdd_to_multi_cube
mdd_t * 
net_util_mdd_literal(
  mdd_manager * manager, 
  int  var_value, 
  int  var_index 
)
Returns the MDD of (variable=value) expression. If value is don't care (-1) then it returns the MDD of 1.

int 
net_util_mdd_to_multi_cube(
  array_t * look_up_table, 
  mdd_manager * manager, 
  array_t * mdd_lit_cube, 
  array_t * new_cube1, 
  array_t * new_cube2 
)
Converts MDD cube into multi valued cube. If the conversion is successfull then it returns TRUE inserting the multi valued cube into look-up table. A not succesfull conversation is caused by such an MDD cube, where not all but some bits of a value is dont't care. In this case it returns FALSE creating two new MDD cubes by splitting the first don't care bit into 0 and 1. It supposes the natural ordering of encoded variables.

See Also net_util_mdd_cube_to_look_up_table
int 
net_util_min_power_two(
  int  value 
)
Returns the minimum power of two which contains the input.

See Also net_util_ilog2
net_node_t * 
net_util_node_by_index(
  array_t * array, 
  int  node_index 
)
Returns indexed node located in array. If the function is called on a NIL array or the given index is out of range then it returns NIL.

See Also net_util_node_by_name
net_node_t * 
net_util_node_by_name(
  array_t * array, 
  char * name 
)
Returns named node located in array. If the function is called on a NIL array or the node does not exist then it returns NIL.

See Also net_util_node_by_index
int 
net_util_number_of_var_by_type(
  net_node_t * node, 
  int  var_type 
)
Returns the number of specified type variables of a node. If the function is called on a NIL node then it returns 0.

void 
net_util_opt_comp_var(
  net_node_t * comp_node, 
  int  absorb_const 
)
Optimizes the fanin and fanout variables of a component NET node. It eliminates redundant variables: external feed-backs, inputs driven by the same variable. If absorb_const is TRUE then fanin variables driven by constants are eliminated making copies of constants inside the component NET node. It is tipically used after clustering.

See Also net_util_cluster_comp
int 
net_util_part_flatten(
  net_node_t * root_node 
)
Partition the hierarchy. NET component nodes which have subcomponents with different implementation is flattened. If a non NET component node without implementation is found then an error occurs and it returns FALSE, else TRUE.

See Also net_util_flatten_comp net_util_flatten_hierarchy
int 
net_util_partition(
  net_node_t * root_node 
)
Partition the given hierarchy into HW and SW. It firstly propagates implementation down in the hierarchy, secondly flattens NET nodes which do not have implementation, and finally regroups components into HW_PART and SW_PART. If partitioning is successful then it returns TRUE, otherwise FALSE.

See Also net_util_flatten_hierarchy net_util_part_flatten
int 
net_util_propagate_attribute_all_hierarchy(
  net_node_t * root_node 
)
Propagates all attributes in the hierarchy. An attribute becomes propagated: 1. NET node -> COMP node, if there is attribute specified in NET but not in COMP node; 2. COMP node -> its model node, if there is attribute specified in COMP but not in its model node and all instances of that model node have the same attribute specified. If the propagation is successful then returns 0, otherwise (-1).

See Also net_util_propagate_attribute_hierarchy
int 
net_util_propagate_attribute_hierarchy(
  net_node_t * root_node, 
  array_t * atrb_list_name 
)
Propagates a set of attributes in the hierarchy. An attribute becomes propagated: 1. NET node -> COMP node, if there is attribute specified in NET but not in COMP node; 2. COMP node -> its model node, if there is attribute specified in COMP but not in its model node and all instances of that model node have the same attribute specified. If the propagation is successful then returns 0, otherwise (-1).

See Also net_util_propagate_attribute_all_hierarchy
void 
net_util_push_node_into_stack(
  net_node_t * node, 
  array_t * stack, 
  op_e  op, 
  st_table * visited 
)
Pushes a node into stack. If op==INS_CHECK then it checks if the node is already in stack. If op==INS_NOCHECK then it does not check.

int 
net_util_range_check_hierarchy(
  net_node_t * root_node 
)
Compares the ranges of variables connected to each other in the hierarchy. If ranges do not fit then it returns (-1), if there is a type mismatch then it returns (-2), else 0.

See Also net_util_comp_range net_util_sem_check_hierarchy
char * 
net_util_remap_var_value(
  net_node_t * node, 
  char * var_name, 
  int  var_value 
)
Remaps the integer value into symbolic value of a variable. If value is (-1) then it returns don't care "-". If value is out of range then it returns NIL.

See Also net_util_map_var_value
mdd_t * 
net_util_row_item_mdd_and(
  mdd_manager * manager, 
  array_t * line 
)
Returns the MDD representation of a row of CFSM look-up table. The MDD representation is the logic AND relation between the MDDs of (variable=value) expressions.

See Also net_util_row_mdd_or
mdd_t * 
net_util_row_mdd_or(
  mdd_manager * manager, 
  array_t * look_up_table 
)
Returns the MDD representation of a CFSM look-up table. The MDD representation is the logic OR relation between the MDDs of rows.

See Also net_util_row_item_mdd_and
int 
net_util_sem_check_hierarchy(
  net_node_t * root_node 
)
Performs semantic checks in the hierarchy. The are the followings: connection and range check, presence of event variable in CFSM nodes, presence of state in not CFSM nodes, non detewrminism of CFSM nodes. If the network is correct then it returns 0, else a negative number.

See Also net_util_conn_check_hierarchy net_util_range_check_hierarchy net_util_event_present_cfsm_hierarchy net_util_state_present_not_cfsm_hierarchy net_util_deterministic_cfsm_hierarchy
void 
net_util_set_constant_range(
  net_var_t * const_var, 
  char * const_sym_value 
)
Sets the range of a constant variable. If the value of constant variable is symbolic then it does not do anything, else it sets the minimum power of two which is greater than the given value.

int 
net_util_state_present_not_cfsm_hierarchy(
  net_node_t * root_node 
)
Checks presence of state variable in non CFSM nodes of the hierarchy. If there is a state variable somewhere in not CFSM node then it returns (-1), else 0.

See Also net_util_event_present_cfsm_hierarchy net_util_sem_check_hierarchy
void 
net_util_traversal_recur(
  net_node_t * node, 
  array_t * stack, 
  int  type_mask, 
  int  implem_mask, 
  op_e  op, 
  st_table * visited 
)
Traverses the network of nodes given by root in a recursive way. It puts visited nodes have the given type and implementation into a stack. If op==INS_CHECK then it checks if the node is already in stack.

See Also net_util_traversal
void 
net_util_traversal(
  net_node_t * node, 
  array_t * stack, 
  int  type_mask, 
  int  implem_mask, 
  op_e  op 
)
Traverses the network of nodes given by root. It puts visited nodes have the given type and implementation into a stack. If op==INS_CHECK then it checks if the node is already in stack.

See Also net_util_traversal_recur
net_var_t * 
net_util_var_by_index(
  array_t * array, 
  int  var_index 
)
Returns indexed variable located in array. If the function is called on a NIL array or the given index is out of range then it returns NIL.

See Also net_util_var_by_name
net_var_t * 
net_util_var_by_name(
  array_t * array, 
  char * var_name 
)
Returns named variable located in array. If the function is called on a NIL array or the variable does not exist then it returns NIL.

See Also net_util_var_by_index
net_var_t * 
net_util_var_by_type_by_index(
  net_node_t * node, 
  int  var_type, 
  int  var_index 
)
Returns indexed, specified type variable of a node. If the function is called on a NIL array or the given index is out of range then it returns NIL.

See Also net_util_var_by_type_by_name
net_var_t * 
net_util_var_by_type_by_name(
  net_node_t * node, 
  int  var_type, 
  char * var_name 
)
Returns named, specified type variable of a node. If the function is called on a NIL array or the node does not exist then it returns NIL.

See Also net_util_var_by_type_by_index
int 
net_var_add_fanout(
  net_var_t * var, 
  net_var_t * fanout_var 
)
Adds a fanout variable to the variable. The list of variables dinamically grows getting the new variable at the last position. If the function is called on a NIL parameter then it returns (-1).

See Also net_var_del_fanout net_var_del_fanout_all net_var_fanout_by_index net_var_fanout_by_name net_var_number_of_fanout
net_var_t * 
net_var_assoc_var(
  net_var_t * var 
)
Returns the associated variable of a variable. If the function is called on a NIL var then it does not do anything.

See Also net_var_set_assoc_pair net_var_reset_assoc_pair
int 
net_var_const_value(
  net_var_t * var 
)
Returns the value of a variable. If the function is called on a NIL var or on a not CONSTANT then it returns (-1).

See Also net_var_set_const_value
char * 
net_var_debug_orig_name(
  debug_t * var_debug 
)
Returns the original name of a debug structure of a variable. If the function is called on a NIL node then it returns NIL.

See Also net_var_debug_set_orig_name
int 
net_var_debug_set_orig_name(
  debug_t * var_debug, 
  char * orig_name 
)
Sets the original name of a debug structure of a variable. If the function is called on a NIL parameter then it does not do anything. If it is already set then it returns (-1), else 0.

See Also net_var_debug_orig_name net_var_set_debug
debug_t * 
net_var_debug(
  net_var_t * var 
)
Returns the debug structure of a variable. If the function is called on a NIL var then it returns NIL.

See Also net_var_set_debug net_var_debug_orig_name
void 
net_var_del_fanout_all(
  net_var_t * var 
)
Deletes all fanout variables from the variable. It does not free fanout variables, it is the user's responsibility. If the function is called on a NIL parameter then it does not do anything.

See Also net_var_add_fanout net_var_del_fanout net_var_fanout_by_index net_var_fanout_by_name net_var_number_of_fanout
void 
net_var_del_fanout(
  net_var_t * var, 
  net_var_t * fanout_var 
)
Deletes a fanout variable from the variable. The list of variables dinamically contracts. It does not free the fanout variable, it is the user's responsibility. If the function is called on a NIL parameter then it does not do anything.

See Also net_var_add_fanout net_var_del_fanout_all net_var_fanout_by_index net_var_fanout_by_name net_var_number_of_fanout
net_var_t * 
net_var_fanin(
  net_var_t * var 
)
Returns the fanin variable of a variable. If the function is called on a NIL var then it returns NIL.

See Also net_var_set_fanin
net_var_t * 
net_var_fanout_by_index(
  net_var_t * var, 
  int  var_index 
)
Returns the indexed fanout variable of a variable. The index gives the position of the fanout variable in array of fanout variables of variable. If the function is called on a NIL var or the given index is out of range then it returns NIL.

See Also net_var_fanout_by_name net_var_add_fanout net_var_del_fanout net_var_del_fanout_all net_var_number_of_fanout
net_var_t * 
net_var_fanout_by_name(
  net_var_t * var, 
  char * name 
)
Returns the named fanout variable of a variable. If the function is called on a NIL parameter or the variable does not exist then it returns NIL.

See Also net_var_fanout_by_index net_var_add_fanout net_var_del_fanout net_var_del_fanout_all net_var_number_of_fanout
int 
net_var_id(
  net_var_t * var 
)
Returns the MDD identifier of a variable. If the function is called on a NIL var then it returns (-1).

See Also net_var_set_id
int 
net_var_index(
  net_var_t * var 
)
Returns the index of a variable. If the function is called on a NIL var then it returns (-1).

See Also net_var_set_index
char * 
net_var_name(
  net_var_t * var 
)
Returns the name of a variable. User must not free this string. If the function is called on a NIL var then it returns NIL.

See Also net_var_set_name
int 
net_var_nbit(
  net_var_t * var 
)
Returns the number of bits represent values of a variable. If the function is called on a NIL var then it returns (-1).

See Also net_var_set_nbit
net_node_t * 
net_var_node(
  net_var_t * var 
)
Returns the node of a variable belongs to. If the function is called on a NIL var then it returns NIL.

See Also net_var_set_node
int 
net_var_number_of_fanout(
  net_var_t * var 
)
Returns the number of fanout variables of a variable. If the function is called on a NIL node then it returns 0.

See Also net_var_add_fanout net_var_del_fanout net_var_del_fanout_all net_var_fanout_by_index net_var_fanout_by_name
int 
net_var_nval(
  net_var_t * var 
)
Returns the number of values of a variable. If the function is called on a NIL var then it returns (-1).

See Also net_var_set_nval
void 
net_var_reset_assoc_pair(
  net_var_t * var1, 
  net_var_t * var2 
)
Resets the association between two variables. If the function is called on a NIL parameter then it does not do anything.

See Also net_var_set_assoc_pair net_var_assoc_var
void 
net_var_reset_copy(
  net_var_t * var 
)
Resets the copy flag of a variable. If the function is called on a NIL parameter then it does not do anything.

void 
net_var_reset_type(
  net_var_t * var, 
  net_var_e  type 
)
Resets the type of a variable. The following types or their combination (e.g. INPUT|EVENT|ACTUAL) are possible: NONE, INPUT, OUTPUT, CONSTANT, INT, ST, VALUE, EVENT,FORMAL, ACTUAL, ACKNOWLEDGE, SIGNED, and UNSIGN. If the function is called on a NIL var then it does not do anything.

See Also net_var_type net_var_set_type
void 
net_var_set_assoc_pair(
  net_var_t * var1, 
  net_var_t * var2 
)
Sets the association between two variables. If the function is called on a NIL parameter then it does not do anything.

See Also net_var_reset_assoc_pair net_var_assoc_var
void 
net_var_set_const_value(
  net_var_t * var, 
  int  var_value 
)
Sets the value of a variable. If the function is called on a NIL var or on a not CONSTANT then it does not do anything.

See Also net_var_const_value
int 
net_var_set_debug(
  net_var_t * var, 
  debug_t * var_debug 
)
Sets the debug structure of a variable. If the function is called on a NIL parameter then it does not do anything. If it is already set then it returns (-1), else 0.

See Also net_var_debug net_var_debug_set_orig_name
void 
net_var_set_fanin(
  net_var_t * var, 
  net_var_t * fanin_var 
)
Sets the fanin variable of a variable. If the function is called on a NIL parameter then it does not do anything.

See Also net_var_fanin
void 
net_var_set_id(
  net_var_t * var, 
  int  var_id 
)
Sets the MDD identifier of a variable. If the function is called on a NIL var then it does not do anything.

See Also net_var_set_id
void 
net_var_set_index(
  net_var_t * var, 
  int  var_index 
)
Sets the index of a variable. If the function is called on a NIL var then it does not do anything.

See Also net_var_index
void 
net_var_set_name(
  net_var_t * var, 
  char * name 
)
Sets the name of a variable. User has to allocate this string. If the variable already has got a name then it frees the old name. If the function is called on a NIL var then it does not do anything.

See Also net_var_name
void 
net_var_set_nbit(
  net_var_t * var, 
  int  var_nbit 
)
Sets the number of bits represent values of a variable. If the function is called on a NIL var then it does not do anything.

See Also net_var_nbit
void 
net_var_set_node(
  net_var_t * var, 
  net_node_t * node 
)
Sets the node of a variable belongs to. If the function is called on a NIL parameter then it does not do anything.

See Also net_var_node
void 
net_var_set_nval(
  net_var_t * var, 
  int  var_nval 
)
Sets the number of values of a variable. If the function is called on a NIL var then it does not do anything.

See Also net_var_nval
void 
net_var_set_type(
  net_var_t * var, 
  net_var_e  var_type 
)
Sets the type of a variable. The following types or their combination (e.g. INPUT|EVENT|ACTUAL) are possible: NONE, INPUT, OUTPUT, CONSTANT, INT, ST, VALUE, EVENT,FORMAL, ACTUAL, ACKNOWLEDGE, SIGNED, and UNSIGN. NONE type gets deleted. If the function is called on a NIL var then it does not do anything.

See Also net_var_type net_var_reset_type
void 
net_var_set_values(
  net_var_t * var, 
  array_t * var_values 
)
Sets the array of symbolic values of a variable. If the function is called on a NIL var then it does not do anything.

See Also net_var_values
int 
net_var_type(
  net_var_t * var, 
  net_var_e  type_mask 
)
Returns the value of a masked type of a variable. The following types or their combination (e.g. INPUT|EVENT|ACTUAL) are possible: NONE, INPUT, OUTPUT, CONSTANT, INT, ST, VALUE, EVENT,FORMAL, ACTUAL, ACKNOWLEDGE, SIGNED, and UNSIGN. If the function is called on a NIL var then it returns NONE.

See Also net_var_set_type net_var_reset_type
array_t * 
net_var_values(
  net_var_t * var 
)
Returns the array of symbolic values of a variable. If the function is called on a NIL var then it returns NIL.

See Also net_var_set_values

Generated automatically by extdoc on 951023
Contact 
©2002-2018 U.C. Regents