svf-lib 1.0.2213 → 1.0.2214

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 (42) hide show
  1. package/SVF-linux/Release-build/bin/ae +0 -0
  2. package/SVF-linux/Release-build/bin/cfl +0 -0
  3. package/SVF-linux/Release-build/bin/dvf +0 -0
  4. package/SVF-linux/Release-build/bin/llvm2svf +0 -0
  5. package/SVF-linux/Release-build/bin/mta +0 -0
  6. package/SVF-linux/Release-build/bin/saber +0 -0
  7. package/SVF-linux/Release-build/bin/svf-ex +0 -0
  8. package/SVF-linux/Release-build/bin/wpa +0 -0
  9. package/SVF-linux/Release-build/include/DDA/DDAClient.h +6 -11
  10. package/SVF-linux/Release-build/include/DDA/DDAPass.h +1 -1
  11. package/SVF-linux/Release-build/include/Graphs/CHG.h +2 -3
  12. package/SVF-linux/Release-build/include/Graphs/GenericGraph.h +1 -286
  13. package/SVF-linux/Release-build/include/MTA/MTA.h +2 -2
  14. package/SVF-linux/Release-build/include/MTA/TCT.h +0 -6
  15. package/SVF-linux/Release-build/include/MemoryModel/PointerAnalysis.h +1 -7
  16. package/SVF-linux/Release-build/include/SABER/DoubleFreeChecker.h +1 -1
  17. package/SVF-linux/Release-build/include/SABER/FileChecker.h +1 -1
  18. package/SVF-linux/Release-build/include/SABER/LeakChecker.h +1 -1
  19. package/SVF-linux/Release-build/include/SABER/SaberCondAllocator.h +1 -2
  20. package/SVF-linux/Release-build/include/SABER/SrcSnkDDA.h +2 -2
  21. package/SVF-linux/Release-build/include/SVF-LLVM/BreakConstantExpr.h +1 -1
  22. package/SVF-linux/Release-build/include/SVF-LLVM/CppUtil.h +1 -1
  23. package/SVF-linux/Release-build/include/SVF-LLVM/DCHG.h +1 -1
  24. package/SVF-linux/Release-build/include/SVF-LLVM/LLVMLoopAnalysis.h +1 -1
  25. package/SVF-linux/Release-build/include/SVF-LLVM/LLVMModule.h +2 -2
  26. package/SVF-linux/Release-build/include/SVF-LLVM/LLVMUtil.h +1 -1
  27. package/SVF-linux/Release-build/include/SVF-LLVM/ObjTypeInference.h +1 -1
  28. package/SVF-linux/Release-build/include/{SVFIR → SVF-LLVM}/SVFModule.h +1 -36
  29. package/SVF-linux/Release-build/include/SVF-LLVM/SVFValue.h +805 -0
  30. package/SVF-linux/Release-build/include/SVFIR/ObjTypeInfo.h +0 -1
  31. package/SVF-linux/Release-build/include/SVFIR/SVFIR.h +38 -11
  32. package/SVF-linux/Release-build/include/SVFIR/SVFStatements.h +1 -0
  33. package/SVF-linux/Release-build/include/SVFIR/SVFValue.h +202 -799
  34. package/SVF-linux/Release-build/include/Util/CDGBuilder.h +1 -1
  35. package/SVF-linux/Release-build/include/Util/GeneralType.h +1 -0
  36. package/SVF-linux/Release-build/include/Util/SVFLoopAndDomInfo.h +169 -0
  37. package/SVF-linux/Release-build/include/Util/SVFUtil.h +3 -1
  38. package/SVF-linux/Release-build/include/Util/ThreadAPI.h +2 -1
  39. package/SVF-linux/Release-build/include/WPA/FlowSensitive.h +1 -1
  40. package/SVF-linux/Release-build/lib/libSvfCore.a +0 -0
  41. package/SVF-linux/Release-build/lib/libSvfLLVM.a +0 -0
  42. package/package.json +1 -1
@@ -33,7 +33,6 @@
33
33
 
34
34
  #include "Util/SVFUtil.h"
35
35
  #include "MemoryModel/AccessPath.h"
36
- #include "SVFIR/SVFModule.h"
37
36
  namespace SVF
38
37
  {
39
38
 
@@ -93,13 +93,15 @@ private:
93
93
  /// Valid pointers for pointer analysis resolution connected by SVFIR edges (constraints)
94
94
  /// this set of candidate pointers can change during pointer resolution (e.g. adding new object nodes)
95
95
  OrderedNodeSet candidatePointers;
96
- SVFModule* svfModule; /// SVF Module
97
96
  ICFG* icfg; // ICFG
98
97
  CommonCHGraph* chgraph; // class hierarchy graph
99
98
  CallSiteSet callSiteSet; /// all the callsites of a program
100
99
  CallGraph* callGraph; /// call graph
101
100
 
102
101
  static std::unique_ptr<SVFIR> pag; ///< Singleton pattern here to enable instance of SVFIR can only be created once.
102
+ static std::string pagReadFromTxt;
103
+
104
+ std::string moduleIdentifier;
103
105
 
104
106
  /// Constructor
105
107
  SVFIR(bool buildFromFile);
@@ -152,16 +154,7 @@ public:
152
154
  /// Whether to handle blackhole edge
153
155
  static void handleBlackHole(bool b);
154
156
  //@}
155
- /// Set/Get LLVM Module
156
- inline void setModule(SVFModule* mod)
157
- {
158
- svfModule = mod;
159
- }
160
- inline SVFModule* getModule()
161
- {
162
- assert(svfModule && "empty SVFModule! Build SVF IR first!");
163
- return svfModule;
164
- }
157
+
165
158
  /// Set/Get ICFG
166
159
  inline void setICFG(ICFG* i)
167
160
  {
@@ -196,6 +189,40 @@ public:
196
189
 
197
190
  const FunObjVar* getFunObjVar(const std::string& name);
198
191
 
192
+ inline const std::string& getModuleIdentifier() const
193
+ {
194
+ if (pagReadFromTxt.empty())
195
+ {
196
+ assert(!moduleIdentifier.empty() &&
197
+ "No module found! Reading from a file other than LLVM-IR?");
198
+ return moduleIdentifier;
199
+ }
200
+ else
201
+ {
202
+ return pagReadFromTxt;
203
+ }
204
+ }
205
+
206
+ static inline std::string pagFileName()
207
+ {
208
+ return pagReadFromTxt;
209
+ }
210
+
211
+ static inline bool pagReadFromTXT()
212
+ {
213
+ return !pagReadFromTxt.empty();
214
+ }
215
+
216
+ static inline void setPagFromTXT(const std::string& txt)
217
+ {
218
+ pagReadFromTxt = txt;
219
+ }
220
+
221
+ inline void setModuleIdentifier(const std::string& moduleIdentifier)
222
+ {
223
+ this->moduleIdentifier = moduleIdentifier;
224
+ }
225
+
199
226
  /// Get/set methods to get SVFStmts based on their kinds and ICFGNodes
200
227
  //@{
201
228
  /// Get edges set according to its kind
@@ -43,6 +43,7 @@ class IntraICFGNode;
43
43
  class CallICFGNode;
44
44
  class FunEntryICFGNode;
45
45
  class FunExitICFGNode;
46
+ class SVFBasicBlock;
46
47
 
47
48
  /*
48
49
  * SVFIR program statements (PAGEdges)