svf-lib 1.0.2510 → 1.0.2512

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.
Files changed (34) hide show
  1. package/SVF-linux-aarch64/bin/ae +0 -0
  2. package/SVF-linux-aarch64/bin/cfl +0 -0
  3. package/SVF-linux-aarch64/bin/dvf +0 -0
  4. package/SVF-linux-aarch64/bin/mta +0 -0
  5. package/SVF-linux-aarch64/bin/saber +0 -0
  6. package/SVF-linux-aarch64/bin/svf-ex +0 -0
  7. package/SVF-linux-aarch64/bin/wpa +0 -0
  8. package/SVF-linux-aarch64/include/AE/Core/AbstractState.h +1 -1
  9. package/SVF-linux-aarch64/include/DDA/DDAVFSolver.h +4 -4
  10. package/SVF-linux-aarch64/include/Graphs/SVFG.h +16 -16
  11. package/SVF-linux-aarch64/include/Graphs/SVFGOPT.h +6 -6
  12. package/SVF-linux-aarch64/include/Graphs/VFG.h +39 -36
  13. package/SVF-linux-aarch64/include/Graphs/VFGNode.h +117 -37
  14. package/SVF-linux-aarch64/include/MemoryModel/AccessPath.h +5 -4
  15. package/SVF-linux-aarch64/include/SABER/SaberSVFGBuilder.h +1 -1
  16. package/SVF-linux-aarch64/include/SVFIR/SVFIR.h +24 -14
  17. package/SVF-linux-aarch64/include/SVFIR/SVFStatements.h +65 -33
  18. package/SVF-linux-aarch64/lib/libSvfCore.so.3.3 +0 -0
  19. package/SVF-linux-aarch64/lib/libSvfLLVM.so.3.3 +0 -0
  20. package/SVF-osx/bin/ae +0 -0
  21. package/SVF-osx/bin/svf-ex +0 -0
  22. package/SVF-osx/include/AE/Core/AbstractState.h +1 -1
  23. package/SVF-osx/include/DDA/DDAVFSolver.h +4 -4
  24. package/SVF-osx/include/Graphs/SVFG.h +16 -16
  25. package/SVF-osx/include/Graphs/SVFGOPT.h +6 -6
  26. package/SVF-osx/include/Graphs/VFG.h +39 -36
  27. package/SVF-osx/include/Graphs/VFGNode.h +117 -37
  28. package/SVF-osx/include/MemoryModel/AccessPath.h +5 -4
  29. package/SVF-osx/include/SABER/SaberSVFGBuilder.h +1 -1
  30. package/SVF-osx/include/SVFIR/SVFIR.h +24 -14
  31. package/SVF-osx/include/SVFIR/SVFStatements.h +65 -33
  32. package/SVF-osx/lib/libSvfCore.3.3.dylib +0 -0
  33. package/SVF-osx/lib/libSvfLLVM.3.3.dylib +0 -0
  34. package/package.json +1 -1
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -78,7 +78,7 @@ public:
78
78
  AddressValue getGepObjAddrs(u32_t pointer, IntervalValue offset);
79
79
 
80
80
  // initObjVar
81
- void initObjVar(ObjVar* objVar);
81
+ void initObjVar(const ObjVar* objVar);
82
82
  // getElementIndex
83
83
  IntervalValue getElementIndex(const GepStmt* gep);
84
84
  // getByteOffset
@@ -344,9 +344,9 @@ protected:
344
344
  }
345
345
  }
346
346
  /// GetDefinition SVFG
347
- inline const SVFGNode* getDefSVFGNode(const PAGNode* pagNode) const
347
+ inline const SVFGNode* getDefSVFGNode(const ValVar* valVar) const
348
348
  {
349
- return getSVFG()->getDefSVFGNode(pagNode);
349
+ return getSVFG()->getDefSVFGNode(valVar);
350
350
  }
351
351
  /// Backward traverse along indirect value flows
352
352
  void backtraceAlongIndirectVF(CPtSet& pts, const DPIm& oldDpm)
@@ -497,7 +497,7 @@ protected:
497
497
  {
498
498
  NodeID funPtr = _pag->getFunPtr(cbn);
499
499
  DPIm funPtrDpm(dpm);
500
- funPtrDpm.setLocVar(getSVFG()->getDefSVFGNode(_pag->getSVFVar(funPtr)),funPtr);
500
+ funPtrDpm.setLocVar(getSVFG()->getDefSVFGNode(_pag->getValVar(funPtr)),funPtr);
501
501
  findPT(funPtrDpm);
502
502
  }
503
503
  }
@@ -510,7 +510,7 @@ protected:
510
510
  {
511
511
  NodeID funPtr = _pag->getFunPtr(*it);
512
512
  DPIm funPtrDpm(dpm);
513
- funPtrDpm.setLocVar(getSVFG()->getDefSVFGNode(_pag->getSVFVar(funPtr)),funPtr);
513
+ funPtrDpm.setLocVar(getSVFG()->getDefSVFGNode(_pag->getValVar(funPtr)),funPtr);
514
514
  findPT(funPtrDpm);
515
515
  }
516
516
  }
@@ -74,7 +74,7 @@ class SVFG : public VFG
74
74
 
75
75
  public:
76
76
  typedef VFGNodeIDToNodeMapTy SVFGNodeIDToNodeMapTy;
77
- typedef Map<const SVFVar*, NodeID> SVFVarToDefMapTy;
77
+ typedef Map<const ValVar*, NodeID> ValVarToDefMapTy;
78
78
  typedef Map<const MRVer*, NodeID> MSSAVarToDefMapTy;
79
79
  typedef NodeBS ActualINSVFGNodeSet;
80
80
  typedef NodeBS ActualOUTSVFGNodeSet;
@@ -167,16 +167,16 @@ public:
167
167
  /// Connect SVFG nodes between caller and callee for indirect call site
168
168
  virtual void connectCallerAndCallee(const CallICFGNode* cs, const FunObjVar* callee, SVFGEdgeSetTy& edges);
169
169
 
170
- /// Given a svfVar, return its definition site
171
- inline const SVFGNode* getDefSVFGNode(const SVFVar* svfVar) const
170
+ /// Given a valVar, return its definition site
171
+ inline const SVFGNode* getDefSVFGNode(const ValVar* valVar) const
172
172
  {
173
- return getSVFGNode(getDef(svfVar));
173
+ return getSVFGNode(getDef(valVar));
174
174
  }
175
175
 
176
- /// Given a svfVar, return whether it has definition site
177
- inline bool hasDefSVFGNode(const SVFVar* svfVar) const
176
+ /// Given a valVar, return whether it has definition site
177
+ inline bool hasDefSVFGNode(const ValVar* valVar) const
178
178
  {
179
- return hasDef(svfVar) && hasSVFGNode(getDef(svfVar));
179
+ return hasDef(valVar) && hasSVFGNode(getDef(valVar));
180
180
  }
181
181
 
182
182
  /// Given a ValVar and its SVFGNode, find the definition-site ICFGNode
@@ -323,7 +323,7 @@ protected:
323
323
 
324
324
  /// Get inter value flow edges between indirect call site and callee.
325
325
  //@{
326
- virtual inline void getInterVFEdgeAtIndCSFromAPToFP(const SVFVar* cs_arg, const SVFVar* fun_arg, const CallICFGNode*, CallSiteID csId, SVFGEdgeSetTy& edges)
326
+ virtual inline void getInterVFEdgeAtIndCSFromAPToFP(const ValVar* cs_arg, const ValVar* fun_arg, const CallICFGNode*, CallSiteID csId, SVFGEdgeSetTy& edges)
327
327
  {
328
328
  SVFGNode* actualParam = getSVFGNode(getDef(cs_arg));
329
329
  SVFGNode* formalParam = getSVFGNode(getDef(fun_arg));
@@ -332,7 +332,7 @@ protected:
332
332
  edges.insert(edge);
333
333
  }
334
334
 
335
- virtual inline void getInterVFEdgeAtIndCSFromFRToAR(const SVFVar* fun_ret, const SVFVar* cs_ret, CallSiteID csId, SVFGEdgeSetTy& edges)
335
+ virtual inline void getInterVFEdgeAtIndCSFromFRToAR(const ValVar* fun_ret, const ValVar* cs_ret, CallSiteID csId, SVFGEdgeSetTy& edges)
336
336
  {
337
337
  SVFGNode* formalRet = getSVFGNode(getDef(fun_ret));
338
338
  SVFGNode* actualRet = getSVFGNode(getDef(cs_ret));
@@ -363,19 +363,19 @@ protected:
363
363
  //@}
364
364
 
365
365
 
366
- /// Given a SVFVar, set/get its def SVFG node (definition of top level pointers)
366
+ /// Given a ValVar, set/get its def SVFG node (definition of top level pointers)
367
367
  //@{
368
- inline void setDef(const SVFVar* svfVar, const SVFGNode* node)
368
+ inline void setDef(const ValVar* valVar, const SVFGNode* node)
369
369
  {
370
- VFG::setDef(svfVar, node);
370
+ VFG::setDef(valVar, node);
371
371
  }
372
- inline NodeID getDef(const SVFVar* svfVar) const
372
+ inline NodeID getDef(const ValVar* valVar) const
373
373
  {
374
- return VFG::getDef(svfVar);
374
+ return VFG::getDef(valVar);
375
375
  }
376
- inline bool hasDef(const SVFVar* svfVar) const
376
+ inline bool hasDef(const ValVar* valVar) const
377
377
  {
378
- return VFG::hasDef(svfVar);
378
+ return VFG::hasDef(valVar);
379
379
  }
380
380
  //@}
381
381
 
@@ -95,7 +95,7 @@ protected:
95
95
 
96
96
  /// Connect SVFG nodes between caller and callee for indirect call sites
97
97
  //@{
98
- inline void connectAParamAndFParam(const SVFVar* cs_arg, const SVFVar* fun_arg, const CallICFGNode*, CallSiteID csId, SVFGEdgeSetTy& edges) override
98
+ inline void connectAParamAndFParam(const ValVar* cs_arg, const ValVar* fun_arg, const CallICFGNode*, CallSiteID csId, SVFGEdgeSetTy& edges) override
99
99
  {
100
100
  NodeID phiId = getDef(fun_arg);
101
101
  SVFGEdge* edge = addCallEdge(getDef(cs_arg), phiId, csId);
@@ -107,7 +107,7 @@ protected:
107
107
  }
108
108
  }
109
109
  /// Connect formal-ret and actual ret
110
- inline void connectFRetAndARet(const SVFVar* fun_ret, const SVFVar* cs_ret, CallSiteID csId, SVFGEdgeSetTy& edges) override
110
+ inline void connectFRetAndARet(const ValVar* fun_ret, const ValVar* cs_ret, CallSiteID csId, SVFGEdgeSetTy& edges) override
111
111
  {
112
112
  NodeID phiId = getDef(cs_ret);
113
113
  NodeID retdef = getDef(fun_ret);
@@ -244,7 +244,7 @@ private:
244
244
  return (inter1 && inter2);
245
245
  }
246
246
 
247
- inline void addInterPHIOperands(PHISVFGNode* phi, const SVFVar* operand)
247
+ inline void addInterPHIOperands(PHISVFGNode* phi, const ValVar* operand)
248
248
  {
249
249
  phi->setOpVer(phi->getOpVerNum(), operand);
250
250
  }
@@ -267,10 +267,10 @@ private:
267
267
  return sNode;
268
268
  }
269
269
 
270
- inline void resetDef(const SVFVar* svfVar, const SVFGNode* node)
270
+ inline void resetDef(const ValVar* valVar, const SVFGNode* node)
271
271
  {
272
- SVFVarToDefMapTy::iterator it = SVFVarToDefMap.find(svfVar);
273
- assert(it != SVFVarToDefMap.end() && "a SVFIR node doesn't have definition before");
272
+ ValVarToDefMapTy::iterator it = ValVarToDefMap.find(valVar);
273
+ assert(it != ValVarToDefMap.end() && "a SVFIR node doesn't have definition before");
274
274
  it->second = node->getId();
275
275
  }
276
276
 
@@ -59,7 +59,7 @@ public:
59
59
 
60
60
  typedef OrderedMap<NodeID, VFGNode *> VFGNodeIDToNodeMapTy;
61
61
  typedef Set<VFGNode*> VFGNodeSet;
62
- typedef Map<const SVFVar*, NodeID> SVFVarToDefMapTy;
62
+ typedef Map<const ValVar*, NodeID> ValVarToDefMapTy;
63
63
  typedef Map<std::pair<NodeID,const CallICFGNode*>, ActualParmVFGNode *> SVFVarToActualParmMapTy;
64
64
  typedef Map<const SVFVar*, ActualRetVFGNode *> SVFVarToActualRetMapTy;
65
65
  typedef Map<const SVFVar*, FormalParmVFGNode *> SVFVarToFormalParmMapTy;
@@ -86,7 +86,7 @@ public:
86
86
 
87
87
  protected:
88
88
  NodeID totalVFGNode;
89
- SVFVarToDefMapTy SVFVarToDefMap; ///< map a pag node to its definition SVG node
89
+ ValVarToDefMapTy ValVarToDefMap; ///< map a pag node to its definition SVG node
90
90
  SVFVarToActualParmMapTy SVFVarToActualParmMap; ///< map a SVFVar to an actual parameter
91
91
  SVFVarToActualRetMapTy SVFVarToActualRetMap; ///< map a SVFVar to an actual return
92
92
  SVFVarToFormalParmMapTy SVFVarToFormalParmMap; ///< map a SVFVar to a formal parameter
@@ -185,10 +185,10 @@ public:
185
185
  }
186
186
  //@}
187
187
 
188
- /// Given a svfVar, return its definition site
189
- inline const VFGNode* getDefVFGNode(const SVFVar* svfVar) const
188
+ /// Given a valVar, return its definition site
189
+ inline const VFGNode* getDefVFGNode(const ValVar* valVar) const
190
190
  {
191
- return getVFGNode(getDef(svfVar));
191
+ return getVFGNode(getDef(valVar));
192
192
  }
193
193
 
194
194
  // Given an VFG node, return true if it has a left hand side top level pointer (PAGnode)
@@ -324,11 +324,11 @@ public:
324
324
  const FunObjVar* isFunEntryVFGNode(const VFGNode* node) const;
325
325
 
326
326
  /// Whether a SVFVar has a blackhole or const object as its definition
327
- inline bool hasBlackHoleConstObjAddrAsDef(const SVFVar* svfVar) const
327
+ inline bool hasBlackHoleConstObjAddrAsDef(const ValVar* valVar) const
328
328
  {
329
- if (hasDef(svfVar))
329
+ if (hasDef(valVar))
330
330
  {
331
- const VFGNode* defNode = getVFGNode(getDef(svfVar));
331
+ const VFGNode* defNode = getVFGNode(getDef(valVar));
332
332
  if (const AddrVFGNode* addr = SVFUtil::dyn_cast<AddrVFGNode>(defNode))
333
333
  {
334
334
  if (SVFIR::getPAG()->isBlkObjOrConstantObj(addr->getSVFStmt()->getSrcID()))
@@ -445,7 +445,7 @@ protected:
445
445
  /// Connect VFG nodes between caller and callee for indirect call site
446
446
  //@{
447
447
  /// Connect actual-param and formal param
448
- virtual inline void connectAParamAndFParam(const SVFVar* csArg, const SVFVar* funArg, const CallICFGNode* cbn, CallSiteID csId, VFGEdgeSetTy& edges)
448
+ virtual inline void connectAParamAndFParam(const ValVar* csArg, const ValVar* funArg, const CallICFGNode* cbn, CallSiteID csId, VFGEdgeSetTy& edges)
449
449
  {
450
450
  NodeID actualParam = getActualParmVFGNode(csArg, cbn)->getId();
451
451
  NodeID formalParam = getFormalParmVFGNode(funArg)->getId();
@@ -454,7 +454,7 @@ protected:
454
454
  edges.insert(edge);
455
455
  }
456
456
  /// Connect formal-ret and actual ret
457
- virtual inline void connectFRetAndARet(const SVFVar* funReturn, const SVFVar* csReturn, CallSiteID csId, VFGEdgeSetTy& edges)
457
+ virtual inline void connectFRetAndARet(const ValVar* funReturn, const ValVar* csReturn, CallSiteID csId, VFGEdgeSetTy& edges)
458
458
  {
459
459
  NodeID formalRet = getFormalRetVFGNode(funReturn)->getId();
460
460
  NodeID actualRet = getActualRetVFGNode(csReturn)->getId();
@@ -464,30 +464,30 @@ protected:
464
464
  }
465
465
  //@}
466
466
 
467
- /// Given a SVFVar, set/get its def VFG node (definition of top level pointers)
467
+ /// Given a ValVar, set/get its def VFG node (definition of top level pointers)
468
468
  //@{
469
- inline void setDef(const SVFVar* svfVar, const VFGNode* node)
469
+ inline void setDef(const ValVar* valVar, const VFGNode* node)
470
470
  {
471
- SVFVarToDefMapTy::iterator it = SVFVarToDefMap.find(svfVar);
472
- if(it == SVFVarToDefMap.end())
471
+ ValVarToDefMapTy::iterator it = ValVarToDefMap.find(valVar);
472
+ if(it == ValVarToDefMap.end())
473
473
  {
474
- SVFVarToDefMap[svfVar] = node->getId();
474
+ ValVarToDefMap[valVar] = node->getId();
475
475
  assert(hasVFGNode(node->getId()) && "not in the map!!");
476
476
  }
477
477
  else
478
478
  {
479
- assert((it->second == node->getId()) && "a SVFVar can only have unique definition ");
479
+ assert((it->second == node->getId()) && "a ValVar can only have unique definition ");
480
480
  }
481
481
  }
482
- inline NodeID getDef(const SVFVar* svfVar) const
482
+ inline NodeID getDef(const ValVar* valVar) const
483
483
  {
484
- SVFVarToDefMapTy::const_iterator it = SVFVarToDefMap.find(svfVar);
485
- assert(it!=SVFVarToDefMap.end() && "SVFVar does not have a definition??");
484
+ ValVarToDefMapTy::const_iterator it = ValVarToDefMap.find(valVar);
485
+ assert(it!=ValVarToDefMap.end() && "ValVar does not have a definition??");
486
486
  return it->second;
487
487
  }
488
- inline bool hasDef(const SVFVar* svfVar) const
488
+ inline bool hasDef(const ValVar* valVar) const
489
489
  {
490
- return (SVFVarToDefMap.find(svfVar) != SVFVarToDefMap.end());
490
+ return (ValVarToDefMap.find(valVar) != ValVarToDefMap.end());
491
491
  }
492
492
  //@}
493
493
 
@@ -544,7 +544,7 @@ protected:
544
544
  }
545
545
  /// Add a Dummy VFG node for null pointer definition
546
546
  /// To be noted for black hole pointer it has already has address edge connected
547
- inline void addNullPtrVFGNode(const SVFVar* svfVar)
547
+ inline void addNullPtrVFGNode(const ValVar* svfVar)
548
548
  {
549
549
  NullPtrVFGNode* sNode = new NullPtrVFGNode(totalVFGNode++,svfVar);
550
550
  addVFGNode(sNode, pag->getICFG()->getGlobalICFGNode());
@@ -555,7 +555,7 @@ protected:
555
555
  {
556
556
  AddrVFGNode* sNode = new AddrVFGNode(totalVFGNode++,addr);
557
557
  addStmtVFGNode(sNode, addr);
558
- setDef(addr->getLHSVar(),sNode);
558
+ setDef(SVFUtil::cast<ValVar>(addr->getLHSVar()),sNode);
559
559
  }
560
560
  /// Add a Copy VFG node
561
561
  inline void addCopyVFGNode(const CopyStmt* copy)
@@ -589,7 +589,7 @@ protected:
589
589
  /// Add an actual parameter VFG node
590
590
  /// To be noted that multiple actual parameters may have same value (SVFVar)
591
591
  /// So we need to make a pair <SVFVarID,CallSiteID> to find the right VFGParmNode
592
- inline void addActualParmVFGNode(const SVFVar* aparm, const CallICFGNode* cs)
592
+ inline void addActualParmVFGNode(const ValVar* aparm, const CallICFGNode* cs)
593
593
  {
594
594
  ActualParmVFGNode* sNode = new ActualParmVFGNode(totalVFGNode++,aparm,cs);
595
595
  addVFGNode(sNode, const_cast<CallICFGNode*>(cs));
@@ -597,7 +597,7 @@ protected:
597
597
  /// do not set def here, this node is not a variable definition
598
598
  }
599
599
  /// Add a formal parameter VFG node
600
- inline void addFormalParmVFGNode(const SVFVar* fparm, const FunObjVar* fun, CallPESet& callPEs)
600
+ inline void addFormalParmVFGNode(const ValVar* fparm, const FunObjVar* fun, CallPESet& callPEs)
601
601
  {
602
602
  FormalParmVFGNode* sNode = new FormalParmVFGNode(totalVFGNode++,fparm,fun);
603
603
  addVFGNode(sNode, pag->getICFG()->getFunEntryICFGNode(fun));
@@ -611,7 +611,7 @@ protected:
611
611
  /// Add a callee Return VFG node
612
612
  /// To be noted that here we assume returns of a procedure have already been unified into one
613
613
  /// Otherwise, we need to handle formalRet using <SVFVarID,CallSiteID> pair to find FormalRetVFG node same as handling actual parameters
614
- inline void addFormalRetVFGNode(const SVFVar* uniqueFunRet, const FunObjVar* fun, RetPESet& retPEs)
614
+ inline void addFormalRetVFGNode(const ValVar* uniqueFunRet, const FunObjVar* fun, RetPESet& retPEs)
615
615
  {
616
616
  FormalRetVFGNode *sNode = new FormalRetVFGNode(totalVFGNode++, uniqueFunRet, fun);
617
617
  addVFGNode(sNode, pag->getICFG()->getFunExitICFGNode(fun));
@@ -630,7 +630,7 @@ protected:
630
630
  }
631
631
  }
632
632
  /// Add a callsite Receive VFG node
633
- inline void addActualRetVFGNode(const SVFVar* ret,const CallICFGNode* cs)
633
+ inline void addActualRetVFGNode(const ValVar* ret,const CallICFGNode* cs)
634
634
  {
635
635
  ActualRetVFGNode* sNode = new ActualRetVFGNode(totalVFGNode++,ret,cs);
636
636
  addVFGNode(sNode, const_cast<RetICFGNode*>(cs->getRetICFGNode()));
@@ -640,7 +640,8 @@ protected:
640
640
  /// Add an llvm PHI VFG node
641
641
  inline void addIntraPHIVFGNode(const MultiOpndStmt* edge)
642
642
  {
643
- IntraPHIVFGNode* sNode = new IntraPHIVFGNode(totalVFGNode++,edge->getRes());
643
+ const ValVar* res = SVFUtil::cast<ValVar>(edge->getRes());
644
+ IntraPHIVFGNode* sNode = new IntraPHIVFGNode(totalVFGNode++,res);
644
645
  u32_t pos = 0;
645
646
  for(auto var : edge->getOpndVars())
646
647
  {
@@ -648,13 +649,14 @@ protected:
648
649
  pos++;
649
650
  }
650
651
  addVFGNode(sNode,edge->getICFGNode());
651
- setDef(edge->getRes(),sNode);
652
- SVFVarToIntraPHIVFGNodeMap[edge->getRes()] = sNode;
652
+ setDef(res,sNode);
653
+ SVFVarToIntraPHIVFGNodeMap[res] = sNode;
653
654
  }
654
655
  /// Add a Compare VFG node
655
656
  inline void addCmpVFGNode(const CmpStmt* edge)
656
657
  {
657
- CmpVFGNode* sNode = new CmpVFGNode(totalVFGNode++, edge->getRes());
658
+ const ValVar* res = SVFUtil::cast<ValVar>(edge->getRes());
659
+ CmpVFGNode* sNode = new CmpVFGNode(totalVFGNode++, res);
658
660
  u32_t pos = 0;
659
661
  for(auto var : edge->getOpndVars())
660
662
  {
@@ -662,13 +664,14 @@ protected:
662
664
  pos++;
663
665
  }
664
666
  addVFGNode(sNode,edge->getICFGNode());
665
- setDef(edge->getRes(),sNode);
666
- SVFVarToCmpVFGNodeMap[edge->getRes()] = sNode;
667
+ setDef(res,sNode);
668
+ SVFVarToCmpVFGNodeMap[res] = sNode;
667
669
  }
668
670
  /// Add a BinaryOperator VFG node
669
671
  inline void addBinaryOPVFGNode(const BinaryOPStmt* edge)
670
672
  {
671
- BinaryOPVFGNode* sNode = new BinaryOPVFGNode(totalVFGNode++, edge->getRes());
673
+ const ValVar* res = SVFUtil::cast<ValVar>(edge->getRes());
674
+ BinaryOPVFGNode* sNode = new BinaryOPVFGNode(totalVFGNode++, res);
672
675
  u32_t pos = 0;
673
676
  for(auto var : edge->getOpndVars())
674
677
  {
@@ -676,8 +679,8 @@ protected:
676
679
  pos++;
677
680
  }
678
681
  addVFGNode(sNode,edge->getICFGNode());
679
- setDef(edge->getRes(),sNode);
680
- SVFVarToBinaryOPVFGNodeMap[edge->getRes()] = sNode;
682
+ setDef(res,sNode);
683
+ SVFVarToBinaryOPVFGNodeMap[res] = sNode;
681
684
  }
682
685
  /// Add a UnaryOperator VFG node
683
686
  inline void addUnaryOPVFGNode(const UnaryOPStmt* edge)