Constructor for SgStatement attribute. The parameter t
is the type of the attribute, pt a pointer to the data and
size the size of the data (in bytes). This last parameter is
useful if no function is given for reading and saving the attributes.
The parameter st is the statement the attribute is attached to.
When an attribute is created this way, it does not appear in the
attributes list of the SgStatement node, but it can be added using the
addAttribute(SgAttribute *att) method.

SgAttribute(int t, void *pt, int size, SgSymbol &st, int filenum)

Constructor for SgSymbol attribute.

SgAttribute(int t, void *pt, int size, SgExpression &st, int filenum)

Constructor for SgExpression attribute.

SgAttribute(int t, void *pt, int size, SgType &st, int filenum)

Constructor for SgType attribute.

int getAttributeType()

Get the type of an attribute.

void setAttributeType(int t)

Set the type of an attribute.

void *getAttributeData()

Get the data field of an attribute.

void *setAttributeData(void *d)

Set the data field of an attribute.

int getAttributeSize()

Get the size of the data field of an attribute.

void setAttributeSize(int s)

Set the size of the data field of an attribute.

typenode getTypeNode()

Get the type of the node the attribute is attached to.
The type is an enumerate:

From the user's point of view, the preferred way to handle attributes
is by using the attribute methods of SgStatement, SgExpression, SgSymbol,
and SgType classes. The SgAttribute class is provided for those, who
need non-standard functionality. In particular, the SgAttribute
constructors should not be used directly. Instead,
addAttribute and getAttribute methods should be used.
For example, one might be tempted to write a code fragment like that:

No special initialization routines are necessary to use the attribute system.
However, only one .dep file can be processed at a time.
The selection of the file is done by the SgProject method
project->file(i) which sets the current file. As a consequence,
when adding an attribute to a node (for instance an SgStatement object) the
file that the node belongs to must be the current file. This limitation is
consistent with the multi-file behavior of Sage.

Warning: if the .dep file is modified before being saved,
the saving of the attributes must be done last so the node numbers are
consistent. Saving the database in a file modifies the identifiers of
Sage nodes.

Remove all the not referenced SgExpression nodes from a file.
The method returns the number of nodes deleted. The function also deletes
the attributes attached to low level nodes. The parameters are the following :

int deleteExpressionNode

If not zero, then allows one to remove the lower implementation of
the node from data base.

int verbose

If non-zero, then prints the message "garbage collection in process".

Because the system cannot be aware of all the SgExpression nodes in
the system (for instance node created but not yet referenced in the
data base), it is possible to avoid the deletion of those nodes by
adding an attribute with type NOGARBAGE_ATTRIBUTE.

The first function computes the data dependence for a full file,
and the second applies only on a function basis.
These two functions also initialize the annotation system.
The parameters are the following :

SgFile *file : the current file

SgStatement *func : the function

int printdep : display the data dependences if not zero

int printannotation : display the annotation found if not zero

int verbose : display the current function name

In order for dependence analysis to work, the following file needs
to be included:

#include "depInterfaceExt.h"

and the program must be linked with the library:

sage/Sage++/extentions/SageAnalysisTool/libDep.a

For example, here is the structure of a program (the full example
can be found in
sage/Sage++/extentions/DemoDataDep/analyze.c)