ROSE
0.9.6a
|
#include <Slicing.h>
Static Public Member Functions | |
static void | completeSlice (SgProject *sgproject) |
Interface 1: Performs a complete slice, that is slices the input file and produces a compilable output file. More... | |
static void | sliceOnlyStmtWithControl (SgProject *sgproject, set< SgNode * > &stmt) |
Interface 2: This function performs the same slicing as sliceOnlyStmts, however in addition this function includes statements connected to the control structure as well as return statements. More... | |
static void | sliceOnlyStmts (SgProject *sgproject, set< SgNode * > &stmt_in_slice) |
Interface 3: This function finds only the statements that directly affect the slicing criterion. This function gives the same statements as the definition use associations gives. The protected function "onlyStmts" does the actual work, while this function is supposed to be the public one, which is called. More... | |
Static Protected Member Functions | |
static void | init (SgProject *sgproject, set< SgStatement * > &slicing_criterion, SgFunctionDefinition *&func_defn) |
This function initiates the slicing process by finding the slicing criterion and the function definition in which the slicing criterion is, from the SgProject. More... | |
static void | onlyStmts (set< SgStatement * > slicing_criterion, SgFunctionDefinition *func_defn, set< SgNode * > &stmt_in_slice) |
This function finds only the statements that directly affect the slicing criterion. This function gives the same statements as the definition use associations gives. More... | |
static void | addControlStmts (SgProject *sgproject, MarkingNodes &v, SgFunctionDefinition *func_defn, set< SgNode * > &stmt_in_slice) |
This function, called after a call to "onlyStmts", adds the control structure around the statements from the call on "onlyStmts". More... | |
static void | keepNeededFunc (SgProject *sgproject, MarkingNodes v, SgFunctionDefinition *func_defn) |
This function finds all needed functions and "unmarks" (that is remove the keep attribute from) the AST function declaration nodes that are not needed for the slice. More... | |
static void | FindSlicingCriterion (SgGlobal *root, set< SgStatement * > &stmts) |
This function finds the statements between the pragma declarations. This is done using a traversal starting in the node "root" and collecting all the statements that are between the pragmas in the return variable " set<SgStatement*> stmts". More... | |
static void | writeStatements (set< SgStatement * > stmts, string heading) |
Useful debugging function that writes the statements of a set to screen. More... | |
static void | writeNodes (set< SgNode * > stmts, string heading) |
Useful debugging function that writes the nodes of a set to screen. More... | |
static bool | isInList (SgNode *node, list< SgFunctionDeclaration * > funclist) |
This function returns a boolean value according to whether a SgNode is in a list of SgFunctionDeclarations. This function is used for including functions that are called in the slice, and to not include functions not called. More... | |
This class controls the different parts of the slicing process: From the input of a SgProject object to the removal of nodes.
The slicing is divided into the following steps:
|
static |
Interface 1: Performs a complete slice, that is slices the input file and produces a compilable output file.
|
static |
Interface 2: This function performs the same slicing as sliceOnlyStmts, however in addition this function includes statements connected to the control structure as well as return statements.
|
static |
Interface 3: This function finds only the statements that directly affect the slicing criterion. This function gives the same statements as the definition use associations gives. The protected function "onlyStmts" does the actual work, while this function is supposed to be the public one, which is called.
|
staticprotected |
This function initiates the slicing process by finding the slicing criterion and the function definition in which the slicing criterion is, from the SgProject.
|
staticprotected |
This function finds only the statements that directly affect the slicing criterion. This function gives the same statements as the definition use associations gives.
|
staticprotected |
This function, called after a call to "onlyStmts", adds the control structure around the statements from the call on "onlyStmts".
|
staticprotected |
This function finds all needed functions and "unmarks" (that is remove the keep attribute from) the AST function declaration nodes that are not needed for the slice.
|
staticprotected |
This function finds the statements between the pragma declarations. This is done using a traversal starting in the node "root" and collecting all the statements that are between the pragmas in the return variable " set<SgStatement*> stmts".
|
staticprotected |
Useful debugging function that writes the statements of a set to screen.
...
|
staticprotected |
Useful debugging function that writes the nodes of a set to screen.
|
staticprotected |
This function returns a boolean value according to whether a SgNode is in a list of SgFunctionDeclarations. This function is used for including functions that are called in the slice, and to not include functions not called.