ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Slicing.h
Go to the documentation of this file.
1 #ifndef Slicing_IS_DEFINED
2 #define Slicing_IS_DEFINED
3 
4 
5 #include "SlicingCriterion.h"
6 #include "FindStatements.h"
7 #include "MarkingNodes.h"
8 #include "RemovalOfNodes.h"
9 #include "CheckWhichAreMarked.h"
10 
11 //#define DEBUG_SLICING
34 class Slicing{
35 
36  public:
37 
42  static void completeSlice(SgProject* sgproject);
47  static void sliceOnlyStmtWithControl(SgProject* sgproject, set<SgNode*>& stmt);
48 
55  static void sliceOnlyStmts(SgProject* sgproject,set<SgNode*>& stmt_in_slice);
56  protected:
57 
63  static void init(SgProject* sgproject,
64  set<SgStatement*>& slicing_criterion, SgFunctionDefinition* &func_defn);
65 
71  static void onlyStmts(set<SgStatement*> slicing_criterion, SgFunctionDefinition* func_defn,
72  set<SgNode*>& stmt_in_slice);
73 
78  static void addControlStmts(SgProject* sgproject, MarkingNodes& v, SgFunctionDefinition* func_defn,
79  set<SgNode*>& stmt_in_slice);
80 
81 
86  static void keepNeededFunc(SgProject* sgproject, MarkingNodes v, SgFunctionDefinition* func_defn);
87 
88  // static set<SgNode*> return_stmt_in_slice;
89  // static set<SgNode*> return_stmt_in_slice_wo_controlstmts;
90 
95  static void FindSlicingCriterion(SgGlobal* root, set<SgStatement*>& stmts);
96 
99  //static void SliceWithControlStatements(SgProject* sgproject,
100  // set<SgNode*> slice, SgFunctionDefinition* defn);
101 
102 
107  static void writeStatements(set<SgStatement*> stmts, string heading);
108 
113  static void writeNodes(set<SgNode*> stmts, string heading);
114 
115 
120  static bool isInList(SgNode* node, list<SgFunctionDeclaration*> funclist);
121 };
122 
123 #endif