svf-lib 1.0.951 → 1.0.954

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.
@@ -448,10 +448,10 @@ protected:
448
448
  assert(obj && "object not found!!");
449
449
  if(obj->isStack())
450
450
  {
451
- if(const AllocaInst* local = SVFUtil::dyn_cast<AllocaInst>(obj->getValue()))
451
+ if(const Function* fun = _pag->getGNode(id)->getFunction())
452
452
  {
453
- const SVFFunction* fun = LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(local->getFunction());
454
- return _callGraphSCC->isInCycle(_callGraph->getCallGraphNode(fun)->getId());
453
+ const SVFFunction* svffun = LLVMModuleSet::getLLVMModuleSet()->getSVFFunction(fun);
454
+ return _callGraphSCC->isInCycle(_callGraph->getCallGraphNode(svffun)->getId());
455
455
  }
456
456
  }
457
457
  return false;
@@ -431,6 +431,9 @@ public:
431
431
  /// Get the number of elements of this object
432
432
  u32_t getNumOfElements() const;
433
433
 
434
+ /// Set the number of elements of this object
435
+ void setNumOfElements(u32_t num);
436
+
434
437
  /// Get max field offset limit
435
438
  u32_t getMaxFieldOffsetLimit() const;
436
439
 
@@ -202,6 +202,10 @@ public:
202
202
  return condMgr->isEquivalentBranchCond(lhs, rhs);
203
203
  }
204
204
 
205
+ inline ICFG* getICFG() const {
206
+ return PAG::getPAG()->getICFG();
207
+ }
208
+
205
209
  private:
206
210
 
207
211
  /// Allocate path condition for every basic block
@@ -223,9 +227,9 @@ private:
223
227
  /// Evaluate loop exit branch
224
228
  Condition* evaluateLoopExitBranch(const BasicBlock * bb, const BasicBlock *succ);
225
229
  /// Return branch condition after evaluating test null like expression
226
- Condition* evaluateTestNullLikeExpr(const BranchInst* brInst, const BasicBlock *succ);
230
+ Condition* evaluateTestNullLikeExpr(const BranchStmt* branchStmt, const BasicBlock *succ);
227
231
  /// Return condition when there is a branch calls program exit
228
- Condition* evaluateProgExit(const BranchInst* brInst, const BasicBlock *succ);
232
+ Condition* evaluateProgExit(const BranchStmt* branchStmt, const BasicBlock *succ);
229
233
  /// Collect basic block contains program exit function call
230
234
  void collectBBCallingProgExit(const BasicBlock& bb);
231
235
  bool isBBCallsProgExit(const BasicBlock* bb);
@@ -269,6 +273,8 @@ private:
269
273
  }
270
274
  //@}
271
275
 
276
+
277
+
272
278
  /// Release memory
273
279
  void destroy(){
274
280
 
@@ -30,7 +30,7 @@
30
30
  #ifndef SABERANNOTATOR_H_
31
31
  #define SABERANNOTATOR_H_
32
32
 
33
- #include "Util/BasicTypes.h"
33
+ #include <MemoryModel/SVFStatements.h>
34
34
  #include "Util/Annotator.h"
35
35
 
36
36
  namespace SVF
@@ -60,10 +60,10 @@ public:
60
60
  //@{
61
61
  void annotateSource();
62
62
  void annotateSinks();
63
- void annotateFeasibleBranch(const BranchInst *brInst, u32_t succPos);
64
- void annotateInfeasibleBranch(const BranchInst *brInst, u32_t succPos);
63
+ void annotateFeasibleBranch(const BranchStmt *branchStmt, u32_t succPos);
64
+ void annotateInfeasibleBranch(const BranchStmt *branchStmt, u32_t succPos);
65
65
 
66
- void annotateSwitch(SwitchInst *brInst, u32_t succPos);
66
+ void annotateSwitch(const BranchStmt *swithStmt, u32_t succPos);
67
67
  //@}
68
68
  };
69
69
 
Binary file
@@ -202,6 +202,10 @@ public:
202
202
  return condMgr->isEquivalentBranchCond(lhs, rhs);
203
203
  }
204
204
 
205
+ inline ICFG* getICFG() const {
206
+ return PAG::getPAG()->getICFG();
207
+ }
208
+
205
209
  private:
206
210
 
207
211
  /// Allocate path condition for every basic block
@@ -223,9 +227,9 @@ private:
223
227
  /// Evaluate loop exit branch
224
228
  Condition* evaluateLoopExitBranch(const BasicBlock * bb, const BasicBlock *succ);
225
229
  /// Return branch condition after evaluating test null like expression
226
- Condition* evaluateTestNullLikeExpr(const BranchInst* brInst, const BasicBlock *succ);
230
+ Condition* evaluateTestNullLikeExpr(const BranchStmt* branchStmt, const BasicBlock *succ);
227
231
  /// Return condition when there is a branch calls program exit
228
- Condition* evaluateProgExit(const BranchInst* brInst, const BasicBlock *succ);
232
+ Condition* evaluateProgExit(const BranchStmt* branchStmt, const BasicBlock *succ);
229
233
  /// Collect basic block contains program exit function call
230
234
  void collectBBCallingProgExit(const BasicBlock& bb);
231
235
  bool isBBCallsProgExit(const BasicBlock* bb);
@@ -269,6 +273,8 @@ private:
269
273
  }
270
274
  //@}
271
275
 
276
+
277
+
272
278
  /// Release memory
273
279
  void destroy(){
274
280
 
@@ -30,7 +30,7 @@
30
30
  #ifndef SABERANNOTATOR_H_
31
31
  #define SABERANNOTATOR_H_
32
32
 
33
- #include "Util/BasicTypes.h"
33
+ #include <MemoryModel/SVFStatements.h>
34
34
  #include "Util/Annotator.h"
35
35
 
36
36
  namespace SVF
@@ -60,10 +60,10 @@ public:
60
60
  //@{
61
61
  void annotateSource();
62
62
  void annotateSinks();
63
- void annotateFeasibleBranch(const BranchInst *brInst, u32_t succPos);
64
- void annotateInfeasibleBranch(const BranchInst *brInst, u32_t succPos);
63
+ void annotateFeasibleBranch(const BranchStmt *branchStmt, u32_t succPos);
64
+ void annotateInfeasibleBranch(const BranchStmt *branchStmt, u32_t succPos);
65
65
 
66
- void annotateSwitch(SwitchInst *brInst, u32_t succPos);
66
+ void annotateSwitch(const BranchStmt *swithStmt, u32_t succPos);
67
67
  //@}
68
68
  };
69
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.951",
3
+ "version": "1.0.954",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {