svf-lib 1.0.768 → 1.0.772

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.
@@ -365,11 +365,11 @@ class CallBlockNode : public InterBlockNode
365
365
  {
366
366
 
367
367
  public:
368
- typedef std::vector<const SVFVar *> ActualParmVFGNodeVec;
368
+ typedef std::vector<const SVFVar *> ActualParmNodeVec;
369
369
  private:
370
370
  const Instruction* cs;
371
371
  const RetBlockNode* ret;
372
- ActualParmVFGNodeVec APNodes;
372
+ ActualParmNodeVec APNodes;
373
373
  public:
374
374
  CallBlockNode(NodeID id, const Instruction* c) : InterBlockNode(id, FunCallBlock), cs(c), ret(nullptr)
375
375
  {
@@ -415,7 +415,7 @@ public:
415
415
  }
416
416
 
417
417
  /// Return the set of actual parameters
418
- inline const ActualParmVFGNodeVec &getActualParms() const
418
+ inline const ActualParmNodeVec &getActualParms() const
419
419
  {
420
420
  return APNodes;
421
421
  }
@@ -45,6 +45,9 @@ class SVFVar;
45
45
  typedef GenericNode<SVFVar,SVFStmt> GenericPAGNodeTy;
46
46
  class SVFVar : public GenericPAGNodeTy
47
47
  {
48
+ friend class IRGraph;
49
+ friend class SVFIR;
50
+ friend class VFG;
48
51
 
49
52
  public:
50
53
  /// Nine kinds of SVFIR variables
@@ -162,13 +165,11 @@ public:
162
165
  {
163
166
  return InEdgeKindToSetMap[kind];
164
167
  }
165
-
166
168
  /// Get outgoing SVFIR statements (edges)
167
169
  inline SVFStmt::SVFStmtSetTy& getOutgoingEdges(SVFStmt::PEDGEK kind)
168
170
  {
169
171
  return OutEdgeKindToSetMap[kind];
170
172
  }
171
-
172
173
  /// Has incoming SVFIR statements (edges)
173
174
  inline bool hasIncomingEdges(SVFStmt::PEDGEK kind) const
174
175
  {
@@ -178,18 +179,16 @@ public:
178
179
  else
179
180
  return false;
180
181
  }
181
-
182
- /// Has incoming VariantGepEdges
183
- inline bool hasIncomingVariantGepEdge() const
182
+ /// Has outgoing SVFIR statements (edges)
183
+ inline bool hasOutgoingEdges(SVFStmt::PEDGEK kind) const
184
184
  {
185
- SVFStmt::KindToSVFStmtMapTy::const_iterator it = InEdgeKindToSetMap.find(SVFStmt::VariantGep);
186
- if (it != InEdgeKindToSetMap.end())
187
- {
185
+ SVFStmt::KindToSVFStmtMapTy::const_iterator it = OutEdgeKindToSetMap.find(kind);
186
+ if (it != OutEdgeKindToSetMap.end())
188
187
  return (!it->second.empty());
189
- }
190
- return false;
188
+ else
189
+ return false;
191
190
  }
192
-
191
+
193
192
  /// Get incoming SVFStmt iterator
194
193
  inline SVFStmt::SVFStmtSetTy::iterator getIncomingEdgesBegin(SVFStmt::PEDGEK kind) const
195
194
  {
@@ -206,16 +205,6 @@ public:
206
205
  return it->second.end();
207
206
  }
208
207
 
209
- /// Has outgoing SVFIR statements (edges)
210
- inline bool hasOutgoingEdges(SVFStmt::PEDGEK kind) const
211
- {
212
- SVFStmt::KindToSVFStmtMapTy::const_iterator it = OutEdgeKindToSetMap.find(kind);
213
- if (it != OutEdgeKindToSetMap.end())
214
- return (!it->second.empty());
215
- else
216
- return false;
217
- }
218
-
219
208
  /// Get outgoing SVFStmt iterator
220
209
  inline SVFStmt::SVFStmtSetTy::iterator getOutgoingEdgesBegin(SVFStmt::PEDGEK kind) const
221
210
  {
@@ -233,6 +222,7 @@ public:
233
222
  }
234
223
  //@}
235
224
 
225
+ private:
236
226
  /// add methods of the components
237
227
  //@{
238
228
  inline void addInEdge(SVFStmt* inEdge)
@@ -248,7 +238,18 @@ public:
248
238
  OutEdgeKindToSetMap[kind].insert(outEdge);
249
239
  addOutgoingEdge(outEdge);
250
240
  }
241
+ /// Has incoming VariantGepEdges
242
+ inline bool hasIncomingVariantGepEdge() const
243
+ {
244
+ SVFStmt::KindToSVFStmtMapTy::const_iterator it = InEdgeKindToSetMap.find(SVFStmt::VariantGep);
245
+ if (it != InEdgeKindToSetMap.end())
246
+ {
247
+ return (!it->second.empty());
248
+ }
249
+ return false;
250
+ }
251
251
 
252
+ public:
252
253
  virtual const std::string toString() const;
253
254
 
254
255
  /// Dump to console for debugging
Binary file
@@ -365,11 +365,11 @@ class CallBlockNode : public InterBlockNode
365
365
  {
366
366
 
367
367
  public:
368
- typedef std::vector<const SVFVar *> ActualParmVFGNodeVec;
368
+ typedef std::vector<const SVFVar *> ActualParmNodeVec;
369
369
  private:
370
370
  const Instruction* cs;
371
371
  const RetBlockNode* ret;
372
- ActualParmVFGNodeVec APNodes;
372
+ ActualParmNodeVec APNodes;
373
373
  public:
374
374
  CallBlockNode(NodeID id, const Instruction* c) : InterBlockNode(id, FunCallBlock), cs(c), ret(nullptr)
375
375
  {
@@ -415,7 +415,7 @@ public:
415
415
  }
416
416
 
417
417
  /// Return the set of actual parameters
418
- inline const ActualParmVFGNodeVec &getActualParms() const
418
+ inline const ActualParmNodeVec &getActualParms() const
419
419
  {
420
420
  return APNodes;
421
421
  }
@@ -45,6 +45,9 @@ class SVFVar;
45
45
  typedef GenericNode<SVFVar,SVFStmt> GenericPAGNodeTy;
46
46
  class SVFVar : public GenericPAGNodeTy
47
47
  {
48
+ friend class IRGraph;
49
+ friend class SVFIR;
50
+ friend class VFG;
48
51
 
49
52
  public:
50
53
  /// Nine kinds of SVFIR variables
@@ -162,13 +165,11 @@ public:
162
165
  {
163
166
  return InEdgeKindToSetMap[kind];
164
167
  }
165
-
166
168
  /// Get outgoing SVFIR statements (edges)
167
169
  inline SVFStmt::SVFStmtSetTy& getOutgoingEdges(SVFStmt::PEDGEK kind)
168
170
  {
169
171
  return OutEdgeKindToSetMap[kind];
170
172
  }
171
-
172
173
  /// Has incoming SVFIR statements (edges)
173
174
  inline bool hasIncomingEdges(SVFStmt::PEDGEK kind) const
174
175
  {
@@ -178,18 +179,16 @@ public:
178
179
  else
179
180
  return false;
180
181
  }
181
-
182
- /// Has incoming VariantGepEdges
183
- inline bool hasIncomingVariantGepEdge() const
182
+ /// Has outgoing SVFIR statements (edges)
183
+ inline bool hasOutgoingEdges(SVFStmt::PEDGEK kind) const
184
184
  {
185
- SVFStmt::KindToSVFStmtMapTy::const_iterator it = InEdgeKindToSetMap.find(SVFStmt::VariantGep);
186
- if (it != InEdgeKindToSetMap.end())
187
- {
185
+ SVFStmt::KindToSVFStmtMapTy::const_iterator it = OutEdgeKindToSetMap.find(kind);
186
+ if (it != OutEdgeKindToSetMap.end())
188
187
  return (!it->second.empty());
189
- }
190
- return false;
188
+ else
189
+ return false;
191
190
  }
192
-
191
+
193
192
  /// Get incoming SVFStmt iterator
194
193
  inline SVFStmt::SVFStmtSetTy::iterator getIncomingEdgesBegin(SVFStmt::PEDGEK kind) const
195
194
  {
@@ -206,16 +205,6 @@ public:
206
205
  return it->second.end();
207
206
  }
208
207
 
209
- /// Has outgoing SVFIR statements (edges)
210
- inline bool hasOutgoingEdges(SVFStmt::PEDGEK kind) const
211
- {
212
- SVFStmt::KindToSVFStmtMapTy::const_iterator it = OutEdgeKindToSetMap.find(kind);
213
- if (it != OutEdgeKindToSetMap.end())
214
- return (!it->second.empty());
215
- else
216
- return false;
217
- }
218
-
219
208
  /// Get outgoing SVFStmt iterator
220
209
  inline SVFStmt::SVFStmtSetTy::iterator getOutgoingEdgesBegin(SVFStmt::PEDGEK kind) const
221
210
  {
@@ -233,6 +222,7 @@ public:
233
222
  }
234
223
  //@}
235
224
 
225
+ private:
236
226
  /// add methods of the components
237
227
  //@{
238
228
  inline void addInEdge(SVFStmt* inEdge)
@@ -248,7 +238,18 @@ public:
248
238
  OutEdgeKindToSetMap[kind].insert(outEdge);
249
239
  addOutgoingEdge(outEdge);
250
240
  }
241
+ /// Has incoming VariantGepEdges
242
+ inline bool hasIncomingVariantGepEdge() const
243
+ {
244
+ SVFStmt::KindToSVFStmtMapTy::const_iterator it = InEdgeKindToSetMap.find(SVFStmt::VariantGep);
245
+ if (it != InEdgeKindToSetMap.end())
246
+ {
247
+ return (!it->second.empty());
248
+ }
249
+ return false;
250
+ }
251
251
 
252
+ public:
252
253
  virtual const std::string toString() const;
253
254
 
254
255
  /// Dump to console for debugging
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.768",
3
+ "version": "1.0.772",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {