Go to the previous, next section.

Name Table Entry

A name_table_entry represents an individual name. Each name has a SUIF variable or a string as the name and an associated name_table_entry_kind.

The name_table_entry_kind describes the properties of the name. Valid kinds are:

No kind was assigned.

The name represents a symbolic constant.
The name represents a conditional variable.
The name represents a loop index variable.
The name represents an array dimension.
The name represents a loop index or a conditional that has been projected away.
An auxiliary variable. For auxiliary variables, there is no SUIF variable or string attached to it. Between systems of inequalities, no two auxiliary variables are equal, and thus do not require a name to identify them.

Even though two different names are of different kinds, they can match up if the names match. For example, name table entries NA and NB both have SUIF variable v as the name. But NA is a symbolic constant and NB is a loop index variable. When aligning, NA and NB will match up and the resulting name will be of loop index kind.

The following are functions and operations available on name_table_entry. In this list of functions, symbols nte, nte1 and nte2 are of the class name_table_entry, symbol knd is a name_table_entry_kind and im is of the class immed.

name_table_entry nte();
Initialize nte as a null entry.

name_table_entry nte(im);
Initialize nte using im. If im is a variable name (class var_sym) or character string, the kind will be a symbolic constant; otherwise no name is set and nte will be an auxiliary variable.

name_table_entry nte(knd, im);
nte.init(knd, im);
The name is extracted from im and the kind is set to knd. If knd is of auxiliary variable type, im is disregarded.

name_table_entry nte(nte1);
A copy of nte1 is made.

im = nte.name();
char * str = nte.string();
var_sym * vs = nte.var();
Get the name of the entry. While name() and string() will work for both character strings and SUIF variable symbols, var() can be used only on entries with SUIF variable symbol names. If the name table entry is of auxiliary variable kind, none of the above functions are applicable.

Set the name of the entry.

knd = nte.kind();
Get the name table entry kind.

Change the name table entry kind. If the kind is set to auxiliary variable, the name will be deleted.

nte1 == nte2
nte1 != nte2
Check if two entries are identical (both the name and the kind).

FILE * fp;
Print the name table entry.

Go to the previous, next section.