svf-lib 1.0.1216 → 1.0.1219

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -155,6 +155,15 @@ public:
155
155
  /// Build Bidirectional graph by copying nodes and edges from any graph inherited from GenericGraph
156
156
  /// And transfer Load Store to copy edge and address edge to construct PEG style CFG
157
157
  CFLGraph* buildBiPEGgraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar, SVFIR* pag);
158
+
159
+ private:
160
+ void connectVGep(CFLGraph *cflGraph, ConstraintGraph *graph, ConstraintNode *src, ConstraintNode *dst, u32_t level, SVFIR* pag);
161
+
162
+ /// Handle edge except for the GEP
163
+ void addBiCFLEdge(CFLGraph *cflGraph, ConstraintNode* src, ConstraintNode* dst, CFLGrammar::Kind label);
164
+
165
+ /// Add Bidirectional GEP edge with attribute
166
+ void addBiGepCFLEdge(CFLGraph *cflGraph, ConstraintNode* src, ConstraintNode* dst, CFLGrammar::Attribute attri);
158
167
  };
159
168
 
160
169
  }// SVF
@@ -1,7 +1,7 @@
1
1
  Start:
2
2
  V
3
3
  Terminal:
4
- Addr Copy Store Load Gep Vgep
4
+ Addr Copy Store Load Gep
5
5
  Productions:
6
6
  F -> epsilon;
7
7
  M -> Addr V Addrbar;
@@ -14,15 +14,11 @@ Productions:
14
14
  Fbar -> epsilon;
15
15
  Fbar -> Copybar Fbar;
16
16
  Fbar -> M Copybar Fbar;
17
- Gep_1 -> Gep_0 F Vgep;
18
- Gepbar_1 -> Vgepbar Fbar Gepbar_0;
19
- Gepbarpath -> Gepbar_0 Gepbar_0;
20
- Gepbarpath -> Gepbarpath Gepbar_0;
21
- Gep_3 -> Gep_0;
22
- Gepbar_3 -> Gepbar_0;
17
+ ArrayPath -> Gepbar_0 Gepbar_0;
18
+ ArrayPath -> ArrayPath Gepbar_0;
23
19
  Memcpy -> Addrbar V Addr;
24
20
  Memcpy -> Gep_i Memcpy Gepbar_i;
25
21
  Memcpy -> F Memcpy Fbar;
26
22
  V -> Gepbar_i Memcpy Gep_i;
27
23
  V -> Gep_i Memcpy Gepbar_i;
28
- V -> Gepbarpath V Gep_0;
24
+ V -> ArrayPath V Gep_0;
Binary file
@@ -155,6 +155,15 @@ public:
155
155
  /// Build Bidirectional graph by copying nodes and edges from any graph inherited from GenericGraph
156
156
  /// And transfer Load Store to copy edge and address edge to construct PEG style CFG
157
157
  CFLGraph* buildBiPEGgraph(ConstraintGraph *graph, Kind startKind, GrammarBase *grammar, SVFIR* pag);
158
+
159
+ private:
160
+ void connectVGep(CFLGraph *cflGraph, ConstraintGraph *graph, ConstraintNode *src, ConstraintNode *dst, u32_t level, SVFIR* pag);
161
+
162
+ /// Handle edge except for the GEP
163
+ void addBiCFLEdge(CFLGraph *cflGraph, ConstraintNode* src, ConstraintNode* dst, CFLGrammar::Kind label);
164
+
165
+ /// Add Bidirectional GEP edge with attribute
166
+ void addBiGepCFLEdge(CFLGraph *cflGraph, ConstraintNode* src, ConstraintNode* dst, CFLGrammar::Attribute attri);
158
167
  };
159
168
 
160
169
  }// SVF
@@ -1,7 +1,7 @@
1
1
  Start:
2
2
  V
3
3
  Terminal:
4
- Addr Copy Store Load Gep Vgep
4
+ Addr Copy Store Load Gep
5
5
  Productions:
6
6
  F -> epsilon;
7
7
  M -> Addr V Addrbar;
@@ -14,15 +14,11 @@ Productions:
14
14
  Fbar -> epsilon;
15
15
  Fbar -> Copybar Fbar;
16
16
  Fbar -> M Copybar Fbar;
17
- Gep_1 -> Gep_0 F Vgep;
18
- Gepbar_1 -> Vgepbar Fbar Gepbar_0;
19
- Gepbarpath -> Gepbar_0 Gepbar_0;
20
- Gepbarpath -> Gepbarpath Gepbar_0;
21
- Gep_3 -> Gep_0;
22
- Gepbar_3 -> Gepbar_0;
17
+ ArrayPath -> Gepbar_0 Gepbar_0;
18
+ ArrayPath -> ArrayPath Gepbar_0;
23
19
  Memcpy -> Addrbar V Addr;
24
20
  Memcpy -> Gep_i Memcpy Gepbar_i;
25
21
  Memcpy -> F Memcpy Fbar;
26
22
  V -> Gepbar_i Memcpy Gep_i;
27
23
  V -> Gep_i Memcpy Gepbar_i;
28
- V -> Gepbarpath V Gep_0;
24
+ V -> ArrayPath V Gep_0;
@@ -302,6 +302,9 @@ public:
302
302
  // Does (F) reallocate a new object?
303
303
  bool is_realloc(const SVFFunction *F);
304
304
 
305
+ // Does (F) have the same return type(pointer or nonpointer) and same number of arguments
306
+ bool is_sameSignature(const SVFFunction *F);
307
+
305
308
  // Should (F) be considered "external" (either not defined in the program
306
309
  // or a user-defined version of a known alloc or no-op)?
307
310
  bool is_ext(const SVFFunction *F);