ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FindStatements Class Reference

#include <FindStatements.h>

Static Public Member Functions

static void FindStatementsForSlice (SgNode *func_defn, SgNode *slicing_criterion, set< SgNode * > &slice, AliasAnalysisInterface *alias)
 This function returns the set "slice" with all statements that affect the statement "slicing_criterion". These statements are found using Definition Use assosications. "func_defn" is the function definition of the function where the statements "slicing_criterion" appears in. More...
 

Static Protected Member Functions

static bool alreadyInSlice (set< SgNode * > slice, SgNode *node)
 
static void writeNodes (set< SgNode * > nodes, string heading)
 
static void writeDUnodes (set< DefUseChainNode * > nodes, string heading)
 

Detailed Description

This class finds all the statements that affect the given statement in the slicing criterion (SgNode* slicing_criterion). These statements are found using Definition-Use associations. A special traversal for finding statements affecting expressions (not statements), is provided in the class FindDefUseChainNode.

See Also
FindDefUseChainNode

Definition at line 51 of file FindStatements.h.

Member Function Documentation

static void FindStatements::FindStatementsForSlice ( SgNode func_defn,
SgNode slicing_criterion,
set< SgNode * > &  slice,
AliasAnalysisInterface *  alias 
)
static

This function returns the set "slice" with all statements that affect the statement "slicing_criterion". These statements are found using Definition Use assosications. "func_defn" is the function definition of the function where the statements "slicing_criterion" appears in.

Parameters
func_defn- the function definition from which the definition-use associations are built.
slicing_criterion- the statement that we want to find all affecting statements to.
slice- all the statements needed for the slice with repect to the slicing_criterion is stored here
alias-
static bool FindStatements::alreadyInSlice ( set< SgNode * >  slice,
SgNode node 
)
staticprotected

Function to check if "node" is alrady in the set "slice".

Parameters
slice- a set of SgNodes
node- the node that we want to check if is the set "slice".
Returns
A boolean value that is true if "node" is in "slice". Otherwise false.
static void FindStatements::writeNodes ( set< SgNode * >  nodes,
string  heading 
)
staticprotected

Output function used for testing code: outputs the contents of the set.

Parameters
nodes- the SgNodes that will be outputted to screen.
heading- the heading prior to the listing of the SgNode in the set "nodes"
static void FindStatements::writeDUnodes ( set< DefUseChainNode * >  nodes,
string  heading 
)
staticprotected

Output function used for testing code: outputs the contents of the set.

Parameters
nodes- the SgNodes that will be outputted to screen.
heading- the heading prior to the listing of the SgNode in the set "nodes"

The documentation for this class was generated from the following file: