svf-lib 1.0.1888 → 1.0.1890

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 (29) 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/AE/Core/ICFGWTO.h +4 -0
  10. package/SVF-linux/Release-build/include/AE/Core/IntervalExeState.h +2 -0
  11. package/SVF-linux/Release-build/include/AE/Svfexe/AbstractExecution.h +31 -33
  12. package/SVF-linux/Release-build/include/Graphs/IRGraph.h +0 -1
  13. package/SVF-linux/Release-build/lib/libSvfCore.a +0 -0
  14. package/SVF-linux/Release-build/lib/libSvfLLVM.a +0 -0
  15. package/SVF-osx/Release-build/bin/ae +0 -0
  16. package/SVF-osx/Release-build/bin/svf-ex +0 -0
  17. package/SVF-osx/Release-build/include/AE/Core/ICFGWTO.h +4 -0
  18. package/SVF-osx/Release-build/include/AE/Core/IntervalExeState.h +2 -0
  19. package/SVF-osx/Release-build/include/AE/Svfexe/AbstractExecution.h +31 -33
  20. package/SVF-osx/Release-build/include/Graphs/IRGraph.h +0 -1
  21. package/SVF-osx/Release-build/lib/libSvfCore.a +0 -0
  22. package/SVF-osx/Release-build/lib/libSvfLLVM.a +0 -0
  23. package/package.json +1 -1
  24. package/SVF-linux/Release-build/include/AE/Core/CFBasicBlockGWTO.h +0 -85
  25. package/SVF-linux/Release-build/include/Graphs/CFBasicBlockG.h +0 -581
  26. package/SVF-linux/Release-build/include/Util/CFBasicBlockGBuilder.h +0 -64
  27. package/SVF-osx/Release-build/include/AE/Core/CFBasicBlockGWTO.h +0 -85
  28. package/SVF-osx/Release-build/include/Graphs/CFBasicBlockG.h +0 -581
  29. package/SVF-osx/Release-build/include/Util/CFBasicBlockGBuilder.h +0 -64
@@ -1,581 +0,0 @@
1
- //===- CFBasicBlockG.h ----------------------------------------------------------------//
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 Affero 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 Affero General Public License for more details.
17
-
18
- // You should have received a copy of the GNU Affero General Public License
19
- // along with this program. If not, see <http://www.gnu.org/licenses/>.
20
- //
21
- //===----------------------------------------------------------------------===//
22
-
23
- /*
24
- * CFBasicBlockG.h
25
- *
26
- * Created on: 24 Dec. 2022
27
- * Author: Xiao, Jiawei
28
- */
29
-
30
- #ifndef SVF_CFBASICBLOCKG_H
31
- #define SVF_CFBASICBLOCKG_H
32
- #include "Util/SVFUtil.h"
33
- #include "Graphs/ICFG.h"
34
- #include "Graphs/GenericGraph.h"
35
-
36
- namespace SVF
37
- {
38
- class CFBasicBlockNode;
39
- class SVFIR;
40
-
41
- typedef GenericEdge<CFBasicBlockNode> GenericCFBasicBlockEdgeTy;
42
-
43
- class CFBasicBlockEdge : public GenericCFBasicBlockEdgeTy
44
- {
45
- public:
46
- typedef struct equalCFBBEdge
47
- {
48
- bool
49
- operator()(const CFBasicBlockEdge *lhs, const CFBasicBlockEdge *rhs) const
50
- {
51
- if (lhs->getSrcID() != rhs->getSrcID())
52
- return lhs->getSrcID() < rhs->getSrcID();
53
- else if (lhs->getDstID() != rhs->getDstID())
54
- return lhs->getDstID() < rhs->getDstID();
55
- else
56
- return lhs->getICFGEdge() < rhs->getICFGEdge();
57
- }
58
- } equalICFGEdgeWrapper;
59
-
60
- typedef OrderedSet<CFBasicBlockEdge *, equalICFGEdgeWrapper> CFBBEdgeSetTy;
61
- typedef CFBBEdgeSetTy::iterator iterator;
62
- typedef CFBBEdgeSetTy::const_iterator const_iterator;
63
-
64
- private:
65
- const ICFGEdge *_icfgEdge;
66
-
67
- public:
68
- CFBasicBlockEdge(CFBasicBlockNode* src, CFBasicBlockNode* dst,
69
- const ICFGEdge* edge)
70
- : GenericCFBasicBlockEdgeTy(src, dst, 0), _icfgEdge(edge)
71
- {
72
- }
73
-
74
- CFBasicBlockEdge(CFBasicBlockNode* src, CFBasicBlockNode* dst)
75
- : GenericCFBasicBlockEdgeTy(src, dst, 0), _icfgEdge(nullptr)
76
- {
77
- }
78
-
79
- friend std::ostream &operator<<(std::ostream &o, const CFBasicBlockEdge &edge)
80
- {
81
- o << edge.toString();
82
- return o;
83
- }
84
-
85
- virtual const std::string toString() const
86
- {
87
- std::string str;
88
- std::stringstream rawstr(str);
89
- rawstr << "CFBBGEdge: [CFBBGNode" << getDstID() << " <-- CFBBGNode" << getSrcID() << "]\t";
90
- return rawstr.str();
91
- }
92
-
93
- inline const ICFGEdge *getICFGEdge() const
94
- {
95
- return _icfgEdge;
96
- }
97
-
98
- using SVF::GenericEdge<NodeType>::operator==;
99
- /// Add the hash function for std::set (we also can overload operator< to implement this)
100
- // and duplicated elements in the set are not inserted (binary tree comparison)
101
- //@{
102
-
103
- virtual inline bool operator==(const CFBasicBlockEdge *rhs) const
104
- {
105
- return (rhs->getSrcID() == this->getSrcID() && rhs->getDstID() == this->getDstID() &&
106
- rhs->getICFGEdge() == this->getICFGEdge());
107
- }
108
- //@}
109
-
110
- };
111
-
112
- typedef GenericNode<CFBasicBlockNode, CFBasicBlockEdge> GenericCFBasicBlockNodeTy;
113
-
114
- class CFBasicBlockNode : public GenericCFBasicBlockNodeTy
115
- {
116
- public:
117
- typedef CFBasicBlockEdge::CFBBEdgeSetTy CFBBEdgeSetTy;
118
- typedef CFBasicBlockEdge::CFBBEdgeSetTy ::iterator iterator;
119
- typedef CFBasicBlockEdge::CFBBEdgeSetTy::const_iterator const_iterator;
120
-
121
- private:
122
- std::vector<const ICFGNode *> _icfgNodes; /// Every CBFGNode holds a vector of ICFGNodes
123
- CFBBEdgeSetTy InEdges; ///< all incoming edge of this node
124
- CFBBEdgeSetTy OutEdges; ///< all outgoing edge of this node
125
-
126
- public:
127
- CFBasicBlockNode(std::vector<const ICFGNode*> icfgNodes)
128
- : GenericCFBasicBlockNodeTy((*icfgNodes.begin())->getId(), 0),
129
- _icfgNodes(SVFUtil::move(icfgNodes))
130
- {
131
- }
132
-
133
- virtual ~CFBasicBlockNode()
134
- {
135
- for (auto edge : OutEdges)
136
- delete edge;
137
- }
138
-
139
- friend std::ostream &operator<<(std::ostream &o, const CFBasicBlockNode &node)
140
- {
141
- o << node.toString();
142
- return o;
143
- }
144
-
145
- virtual const std::string toString() const;
146
-
147
- inline std::string getName() const
148
- {
149
- assert(!_icfgNodes.empty() && "no ICFG nodes in CFBB");
150
- return (*_icfgNodes.begin())->getBB()->getName();
151
- }
152
-
153
- inline const std::vector<const ICFGNode*>& getICFGNodes() const
154
- {
155
- return _icfgNodes;
156
- }
157
-
158
- inline const SVFFunction *getFunction() const
159
- {
160
- assert(!_icfgNodes.empty() && "no ICFG nodes in CFBB");
161
- return (*_icfgNodes.begin())->getFun();
162
- }
163
-
164
- inline std::vector<const ICFGNode *>::const_iterator begin() const
165
- {
166
- return _icfgNodes.cbegin();
167
- }
168
-
169
- inline std::vector<const ICFGNode *>::const_iterator end() const
170
- {
171
- return _icfgNodes.cend();
172
- }
173
-
174
- inline void removeNode(const ICFGNode* node)
175
- {
176
- const auto it = std::find(_icfgNodes.begin(), _icfgNodes.end(), node);
177
- assert(it != _icfgNodes.end() && "icfg node not in BB?");
178
- _icfgNodes.erase(it);
179
- }
180
-
181
- inline void addNode(const ICFGNode* node)
182
- {
183
- _icfgNodes.push_back(node);
184
- }
185
-
186
- inline u32_t getICFGNodeNum() const
187
- {
188
- return _icfgNodes.size();
189
- }
190
-
191
- public:
192
- /// Get incoming/outgoing edge set
193
- ///@{
194
- inline const CFBBEdgeSetTy &getOutEdges() const
195
- {
196
- return OutEdges;
197
- }
198
-
199
- inline const CFBBEdgeSetTy &getInEdges() const
200
- {
201
- return InEdges;
202
- }
203
- ///@}
204
-
205
- /// Has incoming/outgoing edge set
206
- //@{
207
- inline bool hasIncomingEdge() const
208
- {
209
- return (InEdges.empty() == false);
210
- }
211
-
212
- inline bool hasOutgoingEdge() const
213
- {
214
- return (OutEdges.empty() == false);
215
- }
216
- //@}
217
-
218
- /// iterators
219
- //@{
220
- inline iterator OutEdgeBegin()
221
- {
222
- return OutEdges.begin();
223
- }
224
-
225
- inline iterator OutEdgeEnd()
226
- {
227
- return OutEdges.end();
228
- }
229
-
230
- inline iterator InEdgeBegin()
231
- {
232
- return InEdges.begin();
233
- }
234
-
235
- inline iterator InEdgeEnd()
236
- {
237
- return InEdges.end();
238
- }
239
-
240
- inline const_iterator OutEdgeBegin() const
241
- {
242
- return OutEdges.begin();
243
- }
244
-
245
- inline const_iterator OutEdgeEnd() const
246
- {
247
- return OutEdges.end();
248
- }
249
-
250
- inline const_iterator InEdgeBegin() const
251
- {
252
- return InEdges.begin();
253
- }
254
-
255
- inline const_iterator InEdgeEnd() const
256
- {
257
- return InEdges.end();
258
- }
259
- //@}
260
-
261
- /// Add incoming and outgoing edges
262
- //@{
263
- inline bool addIncomingEdge(CFBasicBlockEdge *inEdge)
264
- {
265
- return InEdges.insert(inEdge).second;
266
- }
267
-
268
- inline bool addOutgoingEdge(CFBasicBlockEdge *outEdge)
269
- {
270
- return OutEdges.insert(outEdge).second;
271
- }
272
- //@}
273
-
274
- /// Remove incoming and outgoing edges
275
- ///@{
276
- inline u32_t removeIncomingEdge(CFBasicBlockEdge *edge)
277
- {
278
- assert(InEdges.find(edge) != InEdges.end() && "can not find in edge in SVFG node");
279
- return InEdges.erase(edge);
280
- }
281
-
282
- inline u32_t removeOutgoingEdge(CFBasicBlockEdge *edge)
283
- {
284
- assert(OutEdges.find(edge) != OutEdges.end() && "can not find out edge in SVFG node");
285
- return OutEdges.erase(edge);
286
- }
287
- ///@}
288
-
289
- /// Find incoming and outgoing edges
290
- //@{
291
- inline CFBasicBlockEdge *hasIncomingEdge(CFBasicBlockEdge *edge) const
292
- {
293
- const_iterator it = InEdges.find(edge);
294
- if (it != InEdges.end())
295
- return *it;
296
- else
297
- return nullptr;
298
- }
299
-
300
- inline CFBasicBlockEdge *hasOutgoingEdge(CFBasicBlockEdge *edge) const
301
- {
302
- const_iterator it = OutEdges.find(edge);
303
- if (it != OutEdges.end())
304
- return *it;
305
- else
306
- return nullptr;
307
- }
308
- //@}
309
- };
310
-
311
- typedef GenericGraph<CFBasicBlockNode, CFBasicBlockEdge> GenericCFBasicBlockGTy;
312
-
313
- class CFBasicBlockGraph : public GenericCFBasicBlockGTy
314
- {
315
- friend class CFBasicBlockGBuilder;
316
- private:
317
- u32_t _totalCFBasicBlockNode{0};
318
- u32_t _totalCFBasicBlockEdge{0};
319
- public:
320
-
321
- CFBasicBlockGraph() = default;
322
-
323
- ~CFBasicBlockGraph() override = default;
324
-
325
- /// Dump graph into dot file
326
- void dump(const std::string &filename)
327
- {
328
- GraphPrinter::WriteGraphToFile(SVFUtil::outs(), filename, this);
329
- }
330
-
331
- inline CFBasicBlockNode *getCFBasicBlockNode(u32_t id) const
332
- {
333
- if (!hasGNode(id)) return nullptr;
334
- return getGNode(id);
335
- }
336
-
337
- inline bool hasCFBasicBlockNode(NodeID id) const
338
- {
339
- return hasGNode(id);
340
- }
341
-
342
-
343
- bool hasCFBasicBlockEdge(CFBasicBlockNode *src, CFBasicBlockNode *dst, ICFGEdge *icfgEdge)
344
- {
345
- CFBasicBlockEdge edge(src, dst, icfgEdge);
346
- CFBasicBlockEdge *outEdge = src->hasOutgoingEdge(&edge);
347
- CFBasicBlockEdge *inEdge = dst->hasIncomingEdge(&edge);
348
- if (outEdge && inEdge)
349
- {
350
- assert(outEdge == inEdge && "edges not match");
351
- return true;
352
- }
353
- else
354
- return false;
355
- }
356
-
357
- inline bool hasCFBasicBlockEdge(CFBasicBlockNode *src, CFBasicBlockNode *dst) const
358
- {
359
- for (const auto &e: src->getOutEdges())
360
- {
361
- if (e->getDstNode() == dst)
362
- return true;
363
- }
364
- return false;
365
- }
366
-
367
- CFBasicBlockEdge* getCFBasicBlockEdge(const CFBasicBlockNode *src, const CFBasicBlockNode *dst, const ICFGEdge *icfgEdge);
368
-
369
- std::vector<CFBasicBlockEdge*> getCFBasicBlockEdge(const CFBasicBlockNode *src, const CFBasicBlockNode *dst);
370
-
371
- /// Remove a ICFGEdgeWrapper
372
- inline void removeCFBBEdge(CFBasicBlockEdge *edge)
373
- {
374
- if (edge->getDstNode()->hasIncomingEdge(edge))
375
- {
376
- edge->getDstNode()->removeIncomingEdge(edge);
377
- }
378
- if (edge->getSrcNode()->hasOutgoingEdge(edge))
379
- {
380
- edge->getSrcNode()->removeOutgoingEdge(edge);
381
- }
382
- delete edge;
383
- _totalCFBasicBlockEdge--;
384
- }
385
-
386
- /// Remove a ICFGNodeWrapper
387
- inline void removeCFBBNode(CFBasicBlockNode *node)
388
- {
389
- std::set<CFBasicBlockEdge *> temp;
390
- for (CFBasicBlockEdge *e: node->getInEdges())
391
- temp.insert(e);
392
- for (CFBasicBlockEdge *e: node->getOutEdges())
393
- temp.insert(e);
394
- for (CFBasicBlockEdge *e: temp)
395
- {
396
- removeCFBBEdge(e);
397
- }
398
- removeGNode(node);
399
- _totalCFBasicBlockNode--;
400
- }
401
-
402
-
403
- /// Remove node from nodeID
404
- inline bool removeCFBBNode(NodeID id)
405
- {
406
- if (hasGNode(id))
407
- {
408
- removeCFBBNode(getGNode(id));
409
- return true;
410
- }
411
- return false;
412
- }
413
-
414
- /// Add ICFGEdgeWrapper
415
- inline bool addCFBBEdge(CFBasicBlockEdge *edge)
416
- {
417
- bool added1 = edge->getDstNode()->addIncomingEdge(edge);
418
- bool added2 = edge->getSrcNode()->addOutgoingEdge(edge);
419
- assert(added1 && added2 && "edge not added??");
420
- _totalCFBasicBlockEdge++;
421
- return added1 && added2;
422
- }
423
-
424
- /// Add a ICFGNodeWrapper
425
- virtual inline void addCFBBNode(CFBasicBlockNode *node)
426
- {
427
- addGNode(node->getId(), node);
428
- _totalCFBasicBlockNode++;
429
- }
430
- };
431
-
432
- }
433
-
434
-
435
- namespace SVF
436
- {
437
- /* !
438
- * GenericGraphTraits specializations for generic graph algorithms.
439
- * Provide graph traits for traversing from a constraint node using standard graph ICFGTraversals.
440
- */
441
- template<>
442
- struct GenericGraphTraits<SVF::CFBasicBlockNode *>
443
- : public GenericGraphTraits<SVF::GenericNode<SVF::CFBasicBlockNode, SVF::CFBasicBlockEdge> *>
444
- {
445
- };
446
-
447
- /// Inverse GenericGraphTraits specializations for call graph node, it is used for inverse ICFGTraversal.
448
- template<>
449
- struct GenericGraphTraits<Inverse< SVF::CFBasicBlockNode *> > : public GenericGraphTraits<
450
- Inverse<SVF::GenericNode<SVF::CFBasicBlockNode, SVF::CFBasicBlockEdge> *> >
451
- {
452
- };
453
-
454
- template<>
455
- struct GenericGraphTraits<SVF::CFBasicBlockGraph *>
456
- : public GenericGraphTraits<SVF::GenericGraph<SVF::CFBasicBlockNode, SVF::CFBasicBlockEdge> *>
457
- {
458
- typedef SVF::CFBasicBlockNode *NodeRef;
459
- };
460
-
461
- } // End namespace SVF
462
-
463
- namespace SVF
464
- {
465
- template<>
466
- struct DOTGraphTraits<SVF::CFBasicBlockGraph *> : public DOTGraphTraits<SVF::SVFIR *>
467
- {
468
-
469
- typedef SVF::CFBasicBlockNode NodeType;
470
-
471
- DOTGraphTraits(bool isSimple = false) :
472
- DOTGraphTraits<SVF::SVFIR *>(isSimple)
473
- {
474
- }
475
-
476
- /// Return name of the graph
477
- static std::string getGraphName(SVF::CFBasicBlockGraph *)
478
- {
479
- return "CFBasicBlockGraph";
480
- }
481
-
482
- std::string getNodeLabel(NodeType *node, SVF::CFBasicBlockGraph *graph)
483
- {
484
- return getSimpleNodeLabel(node, graph);
485
- }
486
-
487
- /// Return the label of an ICFG node
488
- static std::string getSimpleNodeLabel(NodeType *node, SVF::CFBasicBlockGraph *)
489
- {
490
- std::string str;
491
- std::stringstream rawstr(str);
492
- rawstr << "NodeID: " << node->getId() << "\n";
493
- rawstr << node->toString();
494
-
495
- return rawstr.str();
496
- }
497
-
498
- static std::string getNodeAttributes(NodeType *node, SVF::CFBasicBlockGraph *)
499
- {
500
- std::string str;
501
- std::stringstream rawstr(str);
502
- if(node->getICFGNodes().size() == 1)
503
- {
504
- const ICFGNode* n = node->getICFGNodes()[0];
505
- if(SVFUtil::isa<IntraICFGNode>(n))
506
- {
507
- rawstr << "color=black";
508
- }
509
- else if(SVFUtil::isa<FunEntryICFGNode>(n))
510
- {
511
- rawstr << "color=yellow";
512
- }
513
- else if(SVFUtil::isa<FunExitICFGNode>(n))
514
- {
515
- rawstr << "color=green";
516
- }
517
- else if(SVFUtil::isa<CallICFGNode>(n))
518
- {
519
- rawstr << "color=red";
520
- }
521
- else if(SVFUtil::isa<RetICFGNode>(n))
522
- {
523
- rawstr << "color=blue";
524
- }
525
- else if(SVFUtil::isa<GlobalICFGNode>(n))
526
- {
527
- rawstr << "color=purple";
528
- }
529
- else
530
- assert(false && "no such kind of node!!");
531
- }
532
- else
533
- {
534
- rawstr << "color=black";
535
- }
536
- rawstr << "";
537
- return rawstr.str();
538
- }
539
-
540
- template<class EdgeIter>
541
- static std::string getEdgeAttributes(NodeType *, EdgeIter EI, SVF::CFBasicBlockGraph *)
542
- {
543
- CFBasicBlockEdge* edge = *(EI.getCurrent());
544
- assert(edge && "No edge found!!");
545
- if (edge->getICFGEdge())
546
- {
547
- if (SVFUtil::isa<CallCFGEdge>(edge->getICFGEdge()))
548
- {
549
- return "style=solid,color=red";
550
- }
551
- else if (SVFUtil::isa<RetCFGEdge>(edge->getICFGEdge()))
552
- return "style=solid,color=blue";
553
- else
554
- return "style=solid";
555
- }
556
- else
557
- {
558
- return "style=solid";
559
- }
560
- }
561
-
562
- template<class EdgeIter>
563
- static std::string getEdgeSourceLabel(NodeType *, EdgeIter EI)
564
- {
565
- CFBasicBlockEdge* edge = *(EI.getCurrent());
566
- assert(edge && "No edge found!!");
567
-
568
- std::string str;
569
- std::stringstream rawstr(str);
570
- if (edge->getICFGEdge())
571
- {
572
- if (const CallCFGEdge* dirCall = SVFUtil::dyn_cast<CallCFGEdge>(edge->getICFGEdge()))
573
- rawstr << dirCall->getCallSite();
574
- else if (const RetCFGEdge* dirRet = SVFUtil::dyn_cast<RetCFGEdge>(edge->getICFGEdge()))
575
- rawstr << dirRet->getCallSite();
576
- }
577
- return rawstr.str();
578
- }
579
- };
580
- }
581
- #endif //SVF_CFBASICBLOCKG_H
@@ -1,64 +0,0 @@
1
- //===- CFBasicBlockGBuilder.h ----------------------------------------------------------------//
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 Affero 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 Affero General Public License for more details.
17
-
18
- // You should have received a copy of the GNU Affero General Public License
19
- // along with this program. If not, see <http://www.gnu.org/licenses/>.
20
- //
21
- //===----------------------------------------------------------------------===//
22
-
23
- /*
24
- * CFBasicBlockGBuilder.h
25
- *
26
- * Created on: 17 Oct. 2023
27
- * Author: Xiao, Jiawei
28
- */
29
-
30
- #include "Graphs/CFBasicBlockG.h"
31
-
32
- namespace SVF
33
- {
34
-
35
- class CFBasicBlockGBuilder
36
- {
37
-
38
- private:
39
- CFBasicBlockGraph* _CFBasicBlockG;
40
-
41
- public:
42
- CFBasicBlockGBuilder() : _CFBasicBlockG() {}
43
-
44
- ~CFBasicBlockGBuilder()
45
- {
46
- delete _CFBasicBlockG;
47
- }
48
-
49
- virtual void build(ICFG* icfg);
50
-
51
- inline CFBasicBlockGraph* getCFBasicBlockGraph()
52
- {
53
- return _CFBasicBlockG;
54
- }
55
- private:
56
- void initCFBasicBlockGNodes(ICFG *icfg, Map<const SVFBasicBlock *, std::vector<CFBasicBlockNode *>> &bbToNodes);
57
-
58
- void addInterBBEdge(ICFG *icfg, Map<const SVFBasicBlock *, std::vector<CFBasicBlockNode *>> &bbToNodes);
59
-
60
- void addIntraBBEdge(ICFG *icfg, Map<const SVFBasicBlock *, std::vector<CFBasicBlockNode *>> &bbToNodes);
61
-
62
- void addInterProceduralEdge(ICFG *icfg, Map<const SVFBasicBlock *, std::vector<CFBasicBlockNode *>> &bbToNodes);
63
- };
64
- }