svf-lib 1.0.2511 → 1.0.2513

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 (33) hide show
  1. package/SVF-linux-x86_64/bin/ae +0 -0
  2. package/SVF-linux-x86_64/bin/dvf +0 -0
  3. package/SVF-linux-x86_64/bin/mta +0 -0
  4. package/SVF-linux-x86_64/bin/saber +0 -0
  5. package/SVF-linux-x86_64/bin/svf-ex +0 -0
  6. package/SVF-linux-x86_64/bin/wpa +0 -0
  7. package/SVF-linux-x86_64/include/AE/Core/AbstractState.h +1 -1
  8. package/SVF-linux-x86_64/include/DDA/DDAVFSolver.h +4 -4
  9. package/SVF-linux-x86_64/include/Graphs/SVFG.h +16 -16
  10. package/SVF-linux-x86_64/include/Graphs/SVFGOPT.h +6 -6
  11. package/SVF-linux-x86_64/include/Graphs/VFG.h +39 -36
  12. package/SVF-linux-x86_64/include/Graphs/VFGNode.h +117 -37
  13. package/SVF-linux-x86_64/include/MemoryModel/AccessPath.h +5 -4
  14. package/SVF-linux-x86_64/include/SABER/SaberSVFGBuilder.h +1 -1
  15. package/SVF-linux-x86_64/include/SVFIR/SVFIR.h +24 -14
  16. package/SVF-linux-x86_64/include/SVFIR/SVFStatements.h +65 -33
  17. package/SVF-linux-x86_64/lib/libSvfCore.so.3.3 +0 -0
  18. package/SVF-linux-x86_64/lib/libSvfLLVM.so.3.3 +0 -0
  19. package/SVF-osx/bin/ae +0 -0
  20. package/SVF-osx/bin/svf-ex +0 -0
  21. package/SVF-osx/include/AE/Core/AbstractState.h +1 -1
  22. package/SVF-osx/include/DDA/DDAVFSolver.h +4 -4
  23. package/SVF-osx/include/Graphs/SVFG.h +16 -16
  24. package/SVF-osx/include/Graphs/SVFGOPT.h +6 -6
  25. package/SVF-osx/include/Graphs/VFG.h +39 -36
  26. package/SVF-osx/include/Graphs/VFGNode.h +117 -37
  27. package/SVF-osx/include/MemoryModel/AccessPath.h +5 -4
  28. package/SVF-osx/include/SABER/SaberSVFGBuilder.h +1 -1
  29. package/SVF-osx/include/SVFIR/SVFIR.h +24 -14
  30. package/SVF-osx/include/SVFIR/SVFStatements.h +65 -33
  31. package/SVF-osx/lib/libSvfCore.3.3.dylib +0 -0
  32. package/SVF-osx/lib/libSvfLLVM.3.3.dylib +0 -0
  33. package/package.json +1 -1
@@ -38,6 +38,8 @@ namespace SVF
38
38
  {
39
39
 
40
40
  class SVFVar;
41
+ class ValVar;
42
+ class ObjVar;
41
43
  class ICFGNode;
42
44
  class IntraICFGNode;
43
45
  class CallICFGNode;
@@ -423,6 +425,11 @@ public:
423
425
  {
424
426
  return true;
425
427
  }
428
+
429
+ const ValVar* getLHSVar() const;
430
+ const ObjVar* getRHSVar() const;
431
+ const ValVar* getDstNode() const;
432
+ const ObjVar* getSrcNode() const;
426
433
  };
427
434
 
428
435
  /*!
@@ -507,6 +514,11 @@ public:
507
514
  /// constructor
508
515
  CopyStmt(SVFVar* s, SVFVar* d, CopyKind k) : AssignStmt(s, d, SVFStmt::Copy), copyKind(k) {}
509
516
 
517
+ const ValVar* getRHSVar() const;
518
+ const ValVar* getLHSVar() const;
519
+ const ValVar* getSrcNode() const;
520
+ const ValVar* getDstNode() const;
521
+
510
522
  virtual const std::string toString() const override;
511
523
 
512
524
  private:
@@ -544,6 +556,11 @@ public:
544
556
  /// constructor
545
557
  StoreStmt(SVFVar* s, SVFVar* d, const ICFGNode* st);
546
558
 
559
+ const ValVar* getRHSVar() const;
560
+ const ValVar* getLHSVar() const;
561
+ const ValVar* getSrcNode() const;
562
+ const ValVar* getDstNode() const;
563
+
547
564
  virtual const std::string toString() const override;
548
565
 
549
566
  };
@@ -579,6 +596,11 @@ public:
579
596
  /// constructor
580
597
  LoadStmt(SVFVar* s, SVFVar* d) : AssignStmt(s, d, SVFStmt::Load) {}
581
598
 
599
+ const ValVar* getRHSVar() const;
600
+ const ValVar* getLHSVar() const;
601
+ const ValVar* getSrcNode() const;
602
+ const ValVar* getDstNode() const;
603
+
582
604
  virtual const std::string toString() const override;
583
605
  };
584
606
 
@@ -660,6 +682,11 @@ public:
660
682
  {
661
683
  }
662
684
 
685
+ const ValVar* getRHSVar() const;
686
+ const ValVar* getLHSVar() const;
687
+ const ValVar* getSrcNode() const;
688
+ const ValVar* getDstNode() const;
689
+
663
690
  virtual const std::string toString() const;
664
691
 
665
692
 
@@ -719,6 +746,11 @@ public:
719
746
  }
720
747
  //@}
721
748
 
749
+ const ValVar* getRHSVar() const;
750
+ const ValVar* getLHSVar() const;
751
+ const ValVar* getSrcNode() const;
752
+ const ValVar* getDstNode() const;
753
+
722
754
  virtual const std::string toString() const override;
723
755
  };
724
756
 
@@ -775,6 +807,11 @@ public:
775
807
  }
776
808
  //@}
777
809
 
810
+ const ValVar* getRHSVar() const;
811
+ const ValVar* getLHSVar() const;
812
+ const ValVar* getSrcNode() const;
813
+ const ValVar* getDstNode() const;
814
+
778
815
  virtual const std::string toString() const override;
779
816
 
780
817
  };
@@ -786,10 +823,8 @@ class MultiOpndStmt : public SVFStmt
786
823
  {
787
824
  friend class GraphDBClient;
788
825
 
789
-
790
-
791
826
  public:
792
- typedef std::vector<SVFVar*> OPVars;
827
+ typedef std::vector<ValVar*> OPVars;
793
828
 
794
829
  private:
795
830
  MultiOpndStmt(); ///< place holder
@@ -803,7 +838,7 @@ private:
803
838
  protected:
804
839
  OPVars opVars;
805
840
  /// Constructor, only used by subclasses but not external users
806
- MultiOpndStmt(SVFVar* r, const OPVars& opnds, GEdgeFlag k);
841
+ MultiOpndStmt(ValVar* r, const OPVars& opnds, GEdgeFlag k);
807
842
 
808
843
  public:
809
844
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -827,7 +862,7 @@ public:
827
862
  /// `r` is OpVar
828
863
  //@{
829
864
  /// Operand SVFVars
830
- inline const SVFVar* getOpVar(u32_t pos) const
865
+ inline const ValVar* getOpVar(u32_t pos) const
831
866
  {
832
867
  return opVars.at(pos);
833
868
  }
@@ -897,13 +932,13 @@ public:
897
932
  //@}
898
933
 
899
934
  /// constructor
900
- PhiStmt(SVFVar* res, const OPVars& opnds, const OpICFGNodeVec& icfgNodes)
935
+ PhiStmt(ValVar* res, const OPVars& opnds, const OpICFGNodeVec& icfgNodes)
901
936
  : MultiOpndStmt(res, opnds, SVFStmt::Phi), opICFGNodes(icfgNodes)
902
937
  {
903
938
  assert(opnds.size() == icfgNodes.size() &&
904
939
  "Numbers of operands and their ICFGNodes are not consistent?");
905
940
  }
906
- void addOpVar(SVFVar* op, const ICFGNode* inode)
941
+ void addOpVar(ValVar* op, const ICFGNode* inode)
907
942
  {
908
943
  opVars.push_back(op);
909
944
  opICFGNodes.push_back(inode);
@@ -971,18 +1006,18 @@ public:
971
1006
  //@}
972
1007
 
973
1008
  /// constructor
974
- SelectStmt(SVFVar* res, const OPVars& opnds, const SVFVar* cond);
1009
+ SelectStmt(ValVar* res, const OPVars& opnds, const SVFVar* cond);
975
1010
  virtual const std::string toString() const override;
976
1011
 
977
1012
  inline const SVFVar* getCondition() const
978
1013
  {
979
1014
  return condition;
980
1015
  }
981
- inline const SVFVar* getTrueValue() const
1016
+ inline const ValVar* getTrueValue() const
982
1017
  {
983
1018
  return getOpVar(0);
984
1019
  }
985
- inline const SVFVar* getFalseValue() const
1020
+ inline const ValVar* getFalseValue() const
986
1021
  {
987
1022
  return getOpVar(1);
988
1023
  }
@@ -1061,7 +1096,7 @@ public:
1061
1096
  //@}
1062
1097
 
1063
1098
  /// constructor
1064
- CmpStmt(SVFVar* res, const OPVars& opnds, u32_t pre);
1099
+ CmpStmt(ValVar* res, const OPVars& opnds, u32_t pre);
1065
1100
 
1066
1101
  u32_t getPredicate() const
1067
1102
  {
@@ -1128,7 +1163,7 @@ public:
1128
1163
  //@}
1129
1164
 
1130
1165
  /// constructor
1131
- BinaryOPStmt(SVFVar* res, const OPVars& opnds, u32_t oc);
1166
+ BinaryOPStmt(ValVar* res, const OPVars& opnds, u32_t oc);
1132
1167
 
1133
1168
  u32_t getOpcode() const
1134
1169
  {
@@ -1180,23 +1215,14 @@ public:
1180
1215
  //@}
1181
1216
 
1182
1217
  /// constructor
1183
- UnaryOPStmt(SVFVar* s, SVFVar* d, u32_t oc)
1184
- : SVFStmt(s, d, SVFStmt::UnaryOp), opcode(oc)
1185
- {
1186
- }
1218
+ UnaryOPStmt(ValVar* s, ValVar* d, u32_t oc);
1187
1219
 
1188
1220
  u32_t getOpcode() const
1189
1221
  {
1190
1222
  return opcode;
1191
1223
  }
1192
- inline const SVFVar* getOpVar() const
1193
- {
1194
- return SVFStmt::getSrcNode();
1195
- }
1196
- inline const SVFVar* getRes() const
1197
- {
1198
- return SVFStmt::getDstNode();
1199
- }
1224
+ const ValVar* getOpVar() const;
1225
+ const ValVar* getRes() const;
1200
1226
  NodeID getOpVarID() const;
1201
1227
  NodeID getResID() const;
1202
1228
 
@@ -1223,8 +1249,8 @@ private:
1223
1249
  NodeID getDstID(); ///< place holder, use getResID() instead
1224
1250
 
1225
1251
  SuccAndCondPairVec successors;
1226
- const SVFVar* cond;
1227
- const SVFVar* brInst;
1252
+ const ValVar* cond;
1253
+ const ValVar* brInst;
1228
1254
 
1229
1255
  public:
1230
1256
  /// Methods for support type inquiry through isa, cast, and dyn_cast:
@@ -1244,19 +1270,15 @@ public:
1244
1270
  //@}
1245
1271
 
1246
1272
  /// constructor
1247
- BranchStmt(SVFVar* inst, SVFVar* c, const SuccAndCondPairVec& succs)
1248
- : SVFStmt(c, inst, SVFStmt::Branch), successors(succs), cond(c),
1249
- brInst(inst)
1250
- {
1251
- }
1273
+ BranchStmt(ValVar* inst, ValVar* c, const SuccAndCondPairVec& succs);
1252
1274
 
1253
1275
  /// The branch is unconditional if cond is a null value
1254
1276
  bool isUnconditional() const;
1255
1277
  /// The branch is conditional if cond is not a null value
1256
1278
  bool isConditional() const;
1257
1279
  /// Return the condition
1258
- const SVFVar* getCondition() const;
1259
- const SVFVar* getBranchInst() const
1280
+ const ValVar* getCondition() const;
1281
+ const ValVar* getBranchInst() const
1260
1282
  {
1261
1283
  return brInst;
1262
1284
  }
@@ -1327,6 +1349,11 @@ public:
1327
1349
  {
1328
1350
  }
1329
1351
 
1352
+ const ValVar* getRHSVar() const;
1353
+ const ValVar* getLHSVar() const;
1354
+ const ValVar* getSrcNode() const;
1355
+ const ValVar* getDstNode() const;
1356
+
1330
1357
  virtual const std::string toString() const;
1331
1358
 
1332
1359
  };
@@ -1366,6 +1393,11 @@ public:
1366
1393
  {
1367
1394
  }
1368
1395
 
1396
+ const ValVar* getRHSVar() const;
1397
+ const ValVar* getLHSVar() const;
1398
+ const ValVar* getSrcNode() const;
1399
+ const ValVar* getDstNode() const;
1400
+
1369
1401
  virtual const std::string toString() const;
1370
1402
 
1371
1403
  };
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.2511",
3
+ "version": "1.0.2513",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {