svf-lib 1.0.1825 → 1.0.1827

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 (71) hide show
  1. package/SVF-linux/Release-build/svf/libSvfCore.a +0 -0
  2. package/{SVF-osx → SVF-linux}/Release-build/svf-llvm/extapi.bc +459 -460
  3. package/SVF-linux/Release-build/svf-llvm/libSvfLLVM.a +0 -0
  4. package/SVF-osx/svf/include/Util/WorkList.h +0 -0
  5. package/SVF-osx/svf-llvm/include/SVF-LLVM/CPPUtil.h +37 -12
  6. package/SVF-osx/svf-llvm/include/SVF-LLVM/DCHG.h +1 -9
  7. package/SVF-osx/svf-llvm/include/SVF-LLVM/ICFGBuilder.h +1 -0
  8. package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMModule.h +0 -1
  9. package/SVF-osx/svf-llvm/include/SVF-LLVM/LLVMUtil.h +4 -108
  10. package/package.json +1 -1
  11. package/SVF-osx/Release-build/svf/libSvfCore.a +0 -0
  12. package/SVF-osx/Release-build/svf-llvm/libSvfLLVM.a +0 -0
  13. package/SVF-osx/svf/include/AbstractExecution/WTO.h +0 -892
  14. package/SVF-osx/svf/include/CFL/CFLData.h +0 -316
  15. package/SVF-osx/svf/include/CFL/CFLDataBuilder.h +0 -91
  16. package/SVF-osx/svf/include/CFL/CFLGrammar.h +0 -468
  17. package/SVF-osx/svf/include/CFL/CFLGrammar.txt +0 -15
  18. package/SVF-osx/svf/include/CFL/CFLGrammarDev.txt +0 -16
  19. package/SVF-osx/svf/include/CFL/PEGGrammar.txt +0 -11
  20. package/SVF-osx/svf/include/CFL/VFG.txt +0 -7
  21. package/SVF-osx/svf/include/CUDD/cudd.h +0 -688
  22. package/SVF-osx/svf/include/CUDD/cuddInt.h +0 -1145
  23. package/SVF-osx/svf/include/CUDD/epd.h +0 -192
  24. package/SVF-osx/svf/include/CUDD/mtr.h +0 -180
  25. package/SVF-osx/svf/include/CUDD/mtrInt.h +0 -92
  26. package/SVF-osx/svf/include/CUDD/st.h +0 -230
  27. package/SVF-osx/svf/include/CUDD/util.h +0 -196
  28. package/SVF-osx/svf/include/Graphs/ExternalPAG.h +0 -147
  29. package/SVF-osx/svf/include/Graphs/ICFGWrapper.h +0 -726
  30. package/SVF-osx/svf/include/Graphs/OfflineConsG.h +0 -151
  31. package/SVF-osx/svf/include/Graphs/PAG.h +0 -932
  32. package/SVF-osx/svf/include/Graphs/PAGEdge.h +0 -738
  33. package/SVF-osx/svf/include/Graphs/PAGNode.h +0 -843
  34. package/SVF-osx/svf/include/MTA/LockResultValidator.h +0 -118
  35. package/SVF-osx/svf/include/MTA/MTAAnnotator.h +0 -118
  36. package/SVF-osx/svf/include/MemoryModel/LocationSet.h +0 -157
  37. package/SVF-osx/svf/include/MemoryModel/MemModel.h +0 -414
  38. package/SVF-osx/svf/include/MemoryModel/PAGBuilderFromFile.h +0 -80
  39. package/SVF-osx/svf/include/MemoryModel/PTAStat.h +0 -174
  40. package/SVF-osx/svf/include/MemoryModel/PTAType.h +0 -368
  41. package/SVF-osx/svf/include/MemoryModel/PointsToDFDS.h +0 -514
  42. package/SVF-osx/svf/include/MemoryModel/PointsToDS.h +0 -289
  43. package/SVF-osx/svf/include/MemoryModel/SVFIR.h +0 -650
  44. package/SVF-osx/svf/include/MemoryModel/SVFStatements.h +0 -1101
  45. package/SVF-osx/svf/include/MemoryModel/SVFSymbols.h +0 -648
  46. package/SVF-osx/svf/include/MemoryModel/SVFVariables.h +0 -721
  47. package/SVF-osx/svf/include/MemoryModel/SymbolTableInfo.h +0 -713
  48. package/SVF-osx/svf/include/SABER/PathCondAllocator.h +0 -303
  49. package/SVF-osx/svf/include/SABER/SaberAnnotator.h +0 -72
  50. package/SVF-osx/svf/include/SVFIR/SVFIRRW.h +0 -1302
  51. package/SVF-osx/svf/include/SVFIR/SVFModuleRW.h +0 -197
  52. package/SVF-osx/svf/include/Util/BDDExpr.h +0 -198
  53. package/SVF-osx/svf/include/Util/BasicTypes.h +0 -768
  54. package/SVF-osx/svf/include/Util/CFLSolver.h +0 -186
  55. package/SVF-osx/svf/include/Util/Conditions.h +0 -421
  56. package/SVF-osx/svf/include/Util/CppUtil.h +0 -81
  57. package/SVF-osx/svf/include/Util/ExeState.h +0 -197
  58. package/SVF-osx/svf/include/Util/ExtAPI.json +0 -5853
  59. package/SVF-osx/svf/include/Util/IRAnnotator.h +0 -321
  60. package/SVF-osx/svf/include/Util/PathCondAllocator.h +0 -286
  61. package/SVF-osx/svf/include/Util/PathDPItem.h +0 -310
  62. package/SVF-osx/svf/include/Util/SCC.h +0 -352
  63. package/SVF-osx/svf/include/Util/SVFBasicTypes.h +0 -245
  64. package/SVF-osx/svf/include/Util/SVFInstruction.h +0 -40
  65. package/SVF-osx/svf/include/Util/SVFModule.h +0 -278
  66. package/SVF-osx/svf/include/Util/SymState.h +0 -118
  67. package/SVF-osx/svf/include/Util/TypeBasedHeapCloning.h +0 -188
  68. package/SVF-osx/svf/include/WPA/AndersenSFR.h +0 -160
  69. package/SVF-osx/svf/include/WPA/FlowSensitiveTBHC.h +0 -122
  70. package/SVF-osx/svf/include/WPA/TypeBasedHeapCloning.h +0 -188
  71. package/SVF-osx/svf-llvm/include/SVF-LLVM/IRAnnotator.h +0 -324
@@ -1,316 +0,0 @@
1
- //===----- CFLData.h -- Context Free Language Reachability Graph Data Structure--------------//
2
- //
3
- // SVF: Static Value-Flow Analysis
4
- //
5
- // Copyright (C) <2013-> <Yulei Sui>
6
- //
7
-
8
- // This program is free software: you can redistribute it and/or modify
9
- // it under the terms of the GNU General Public License as published by
10
- // the Free Software Foundation, either version 3 of the License, or
11
- // (at your option) any later version.
12
-
13
- // This program is distributed in the hope that it will be useful,
14
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- // GNU General Public License for more details.
17
-
18
- // You should have received a copy of the GNU General Public License
19
- // along with this program. If not, see <http://www.gnu.org/licenses/>.
20
- //
21
- //===----------------------------------------------------------------------===//
22
-
23
- /*
24
- * CFLData.h
25
- *
26
- * Created on: Nov 22, 2019
27
- * Author: Yuxiang Lei
28
- *
29
- * The implementation is based on
30
- * Yuxiang Lei, Yulei Sui, Shuo Ding, and Qirun Zhang.
31
- * Taming Transitive Redundancy for Context-Free Language Reachability.
32
- * ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications
33
- */
34
-
35
- #ifndef INCLUDE_CFL_CFGDATA_H_
36
- #define INCLUDE_CFL_CFGDATA_H_
37
-
38
- #include "Util/WorkList.h"
39
- #include "CFL/CFLGrammar.h"
40
-
41
- namespace SVF
42
- {
43
- typedef GrammarBase::Symbol Label;
44
- /*!
45
- * Adjacency-list graph representation
46
- */
47
- class CFLData
48
- {
49
- public:
50
- typedef std::map<const Label, NodeBS> TypeMap; // Label with SparseBitVector of NodeID
51
- typedef std::unordered_map<NodeID, TypeMap> DataMap; // Each Node has a TypeMap
52
- typedef typename DataMap::iterator iterator; // iterator for each node
53
- typedef typename DataMap::const_iterator const_iterator; // const iterator
54
-
55
- protected:
56
- DataMap succMap; // succ map for nodes contains Label: Edgeset
57
- DataMap predMap; // pred map for nodes contains Label: edgeset
58
- const NodeBS emptyData; // ??
59
- NodeBS diff; // ??
60
-
61
- // union/add data
62
- //@{
63
- inline bool addPred(const NodeID key, const NodeID src, const Label ty)
64
- {
65
- return predMap[key][ty].test_and_set(src);
66
- };
67
-
68
- inline bool addSucc(const NodeID key, const NodeID dst, const Label ty)
69
- {
70
- return succMap[key][ty].test_and_set(dst);
71
- };
72
-
73
- inline bool addPreds(const NodeID key, const NodeBS& data, const Label ty)
74
- {
75
- if (data.empty())
76
- return false;
77
- return predMap[key][ty] |= data; // union of sparsebitvector (add to LHS)
78
- }
79
-
80
- inline bool addSuccs(const NodeID key, const NodeBS& data, const Label ty)
81
- {
82
- if (data.empty())
83
- return false;
84
- return succMap[key][ty] |= data; // // union of sparsebitvector (add to LHS)
85
- }
86
- //@}
87
-
88
- public:
89
- // Constructor
90
- CFLData()
91
- {}
92
-
93
- // Destructor
94
- virtual ~CFLData()
95
- {}
96
-
97
- virtual void clear()
98
- {
99
- succMap.clear();
100
- predMap.clear();
101
- }
102
-
103
- inline const_iterator begin() const
104
- {
105
- return succMap.begin();
106
- }
107
-
108
- inline const_iterator end() const
109
- {
110
- return succMap.end();
111
- }
112
-
113
- inline iterator begin()
114
- {
115
- return succMap.begin();
116
- }
117
-
118
- inline iterator end()
119
- {
120
- return succMap.end();
121
- }
122
-
123
- inline DataMap& getSuccMap()
124
- {
125
- return succMap;
126
- }
127
-
128
- inline DataMap& getPredMap()
129
- {
130
- return predMap;
131
- }
132
-
133
- inline TypeMap& getSuccMap(const NodeID key)
134
- {
135
- return succMap[key];
136
- }
137
-
138
- inline TypeMap& getPredMap(const NodeID key)
139
- {
140
- return predMap[key];
141
- }
142
-
143
- inline NodeBS& getSuccs(const NodeID key, const Label ty)
144
- {
145
- return succMap[key][ty];
146
- }
147
-
148
- inline NodeBS& getPreds(const NodeID key, const Label ty)
149
- {
150
- return predMap[key][ty];
151
- }
152
-
153
- // Alias data operations
154
- //@{
155
- inline bool addEdge(const NodeID src, const NodeID dst, const Label ty)
156
- {
157
- addSucc(src, dst, ty);
158
- return addPred(dst, src, ty);
159
- }
160
-
161
- /// add edges and return the set of added edges (dst) for src
162
- inline NodeBS addEdges(const NodeID src, const NodeBS& dstData, const Label ty)
163
- {
164
- NodeBS newDsts;
165
- if (addSuccs(src, dstData, ty))
166
- {
167
- for (const NodeID datum: dstData)
168
- if (addPred(datum, src, ty))
169
- newDsts.set(datum);
170
- }
171
- return newDsts;
172
- }
173
-
174
- /// add edges and return the set of added edges (src) for dst
175
- inline NodeBS addEdges(const NodeBS& srcData, const NodeID dst, const Label ty)
176
- {
177
- NodeBS newSrcs;
178
- if (addPreds(dst, srcData, ty))
179
- {
180
- for (const NodeID datum: srcData)
181
- if (addSucc(datum, dst, ty))
182
- newSrcs.set(datum);
183
- }
184
- return newSrcs;
185
- }
186
-
187
- /// find src -> find src[ty] -> find dst in set
188
- inline bool hasEdge(const NodeID src, const NodeID dst, const Label ty)
189
- {
190
- const_iterator iter1 = succMap.find(src);
191
- if (iter1 == succMap.end())
192
- return false;
193
-
194
- auto iter2 = iter1->second.find(ty);
195
- if (iter2 == iter1->second.end())
196
- return false;
197
-
198
- return iter2->second.test(dst);
199
- }
200
-
201
- /* This is a dataset version, to be modified to a cflData version */
202
- inline void clearEdges(const NodeID key)
203
- {
204
- succMap[key].clear();
205
- predMap[key].clear();
206
- }
207
- //@}
208
- };
209
-
210
-
211
- /*!
212
- * Hybrid graph representation for transitive relations
213
- */
214
- class HybridData
215
- {
216
- public:
217
- struct TreeNode
218
- {
219
- NodeID id;
220
- std::unordered_set<TreeNode*> children;
221
-
222
- TreeNode(NodeID nId) : id(nId)
223
- {}
224
-
225
- ~TreeNode()
226
- {
227
- }
228
-
229
- inline bool operator==(const TreeNode& rhs) const
230
- {
231
- return id == rhs.id;
232
- }
233
-
234
- inline bool operator<(const TreeNode& rhs) const
235
- {
236
- return id < rhs.id;
237
- }
238
- };
239
-
240
-
241
- public:
242
- Map<NodeID, std::unordered_map<NodeID, TreeNode*>> indMap; // indMap[v][u] points to node v in tree(u)
243
-
244
- HybridData()
245
- {}
246
-
247
- ~HybridData()
248
- {
249
- for (auto iter1: indMap)
250
- {
251
- for (auto iter2: iter1.second)
252
- {
253
- delete iter2.second;
254
- iter2.second = NULL;
255
- }
256
- }
257
- }
258
-
259
- bool hasInd(NodeID src, NodeID dst)
260
- {
261
- auto it = indMap.find(dst);
262
- if (it == indMap.end())
263
- return false;
264
- return (it->second.find(src) != it->second.end());
265
- }
266
-
267
- /// Add a node dst to tree(src)
268
- TreeNode* addInd(NodeID src, NodeID dst)
269
- {
270
- auto resIns = indMap[dst].insert(std::make_pair(src, new TreeNode(dst)));
271
- if (resIns.second)
272
- return resIns.first->second;
273
- return nullptr;
274
- }
275
-
276
- /// Get the node dst in tree(src)
277
- TreeNode* getNode(NodeID src, NodeID dst)
278
- {
279
- return indMap[dst][src];
280
- }
281
-
282
- /// add v into desc(x) as a child of u
283
- void insertEdge(TreeNode* u, TreeNode* v)
284
- {
285
- u->children.insert(v);
286
- }
287
-
288
- void addArc(NodeID src, NodeID dst)
289
- {
290
- if (!hasInd(src, dst))
291
- {
292
- for (auto iter: indMap[src])
293
- {
294
- meld(iter.first, getNode(iter.first, src), getNode(dst, dst));
295
- }
296
- }
297
- }
298
-
299
- void meld(NodeID x, TreeNode* uNode, TreeNode* vNode)
300
- {
301
- TreeNode* newVNode = addInd(x, vNode->id);
302
- if (!newVNode)
303
- return;
304
-
305
- insertEdge(uNode, newVNode);
306
- for (TreeNode* vChild: vNode->children)
307
- {
308
- meld(x, newVNode, vChild);
309
- }
310
- }
311
- };
312
-
313
-
314
- } // end namespace SVF
315
-
316
- #endif
@@ -1,91 +0,0 @@
1
- //===----- CFLDataBuilder.h -- CFL Data Builder --------------//
2
- //
3
- // SVF: Static Value-Flow Analysis
4
- //
5
- // Copyright (C) <2013-> <Yulei Sui>
6
- //
7
-
8
- // This program is free software: you can redistribute it and/or modify
9
- // it under the terms of the GNU General Public License as published by
10
- // the Free Software Foundation, either version 3 of the License, or
11
- // (at your option) any later version.
12
-
13
- // This program is distributed in the hope that it will be useful,
14
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- // GNU General Public License for more details.
17
-
18
- // You should have received a copy of the GNU General Public License
19
- // along with this program. If not, see <http://www.gnu.org/licenses/>.
20
- //
21
- //===----------------------------------------------------------------------===//
22
-
23
- /*
24
- * CFLGraphBuilder.h
25
- *
26
- * Created on: Nov 6, 2022
27
- * Author: Pei Xu
28
- */
29
-
30
- #ifndef INCLUDE_CFL_CFLDATABUILDER_H_
31
- #define INCLUDE_CFL_CFLDATABUILDER_H_
32
-
33
- #include "CFL/CFLData.h"
34
- #include "Graphs/CFLGraph.h"
35
-
36
- namespace SVF
37
- {
38
-
39
- /*!
40
- * Build CFLData from CFL graph
41
-
42
- */
43
-
44
- class CFLDataBuilder
45
- {
46
- protected:
47
- CFLData* _cflData;
48
- CFLGraph* _graph;
49
-
50
- public:
51
- /// Constructor
52
- CFLDataBuilder(CFLGraph* cflgraph) : _cflData(NULL), _graph(cflgraph)
53
- {
54
- if (!_cflData)
55
- _cflData = new CFLData();
56
- }
57
-
58
- /// Destructor
59
- virtual ~CFLDataBuilder()
60
- {
61
- }
62
-
63
- CFLData* cflData()
64
- {
65
- return _cflData;
66
- }
67
-
68
- //CFL data operations
69
- //@{
70
- virtual bool addEdge(const NodeID srcId, const NodeID dstId, const Label ty)
71
- {
72
- return cflData()->addEdge(srcId, dstId, ty);
73
- }
74
-
75
- virtual NodeBS addEdges(const NodeID srcId, const NodeBS& dstData, const Label ty)
76
- {
77
- return cflData()->addEdges(srcId, dstData, ty);
78
- }
79
- //@}
80
- CFLData* build()
81
- {
82
- for (CFLEdge* edge: _graph->getCFLEdges())
83
- addEdge(edge->getSrcID(), edge->getDstID(), edge->getEdgeKind());
84
- return cflData();
85
- }
86
-
87
-
88
- };
89
- }// SVF
90
-
91
- #endif /* INCLUDE_CFL_CFLGRAPHBUILDER_H_*/