Static Value-Flow Analysis
Loading...
Searching...
No Matches
PointerAnalysisImpl.h
Go to the documentation of this file.
1//===- PointerAnalysisImpl.h -- Pointer analysis implementation--------------------//
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 * PointerAnalysis.h
25 *
26 * Created on: Nov 12, 2013
27 * Author: Yulei Sui
28 */
29
30#ifndef INCLUDE_MEMORYMODEL_POINTERANALYSISIMPL_H_
31#define INCLUDE_MEMORYMODEL_POINTERANALYSISIMPL_H_
32
33#include "Graphs/ConsG.h"
34#include "MemoryModel/PTATY.h"
40
41namespace SVF
42{
43
48{
49
50public:
55
61
67
70
72 ~BVDataPTAImpl() override = default;
73
78
79 static inline bool classof(const PointerAnalysis *pta)
80 {
81 return pta->getImplTy() == PTAImplTy::BVDataImpl;
82 }
83
86 inline const PointsTo& getPts(NodeID id) override
87 {
88 return ptD->getPts(id);
89 }
90 inline const NodeSet& getRevPts(NodeID nodeId) override
91 {
92 return ptD->getRevPts(nodeId);
93 }
95
97 virtual inline void clearPts(NodeID id, NodeID element)
98 {
99 ptD->clearPts(id, element);
100 }
101
103 virtual inline void clearFullPts(NodeID id)
104 {
105 ptD->clearFullPts(id);
106 }
107
110
111 virtual inline bool unionPts(NodeID id, const PointsTo& target)
112 {
113 return ptD->unionPts(id, target);
114 }
115 virtual inline bool unionPts(NodeID id, NodeID ptd)
116 {
117 return ptD->unionPts(id,ptd);
118 }
119 virtual inline bool addPts(NodeID id, NodeID ptd)
120 {
121 return ptD->addPts(id,ptd);
122 }
124
126 virtual inline void clearAllPts()
127 {
128 ptD->clear();
129 }
130
132 virtual void expandFIObjs(const PointsTo& pts, PointsTo& expandedPts);
134 virtual void expandFIObjs(const NodeBS& pts, NodeBS& expandedPts);
135
137 void remapPointsToSets(void);
138
140
141 virtual void writeToFile(const std::string& filename);
142 virtual void writeObjVarToFile(const std::string& filename);
143 virtual void writePtsResultToFile(std::fstream& f);
144 virtual void writeGepObjVarMapToFile(std::fstream& f);
145 virtual bool readFromFile(const std::string& filename);
146 virtual void readPtsResultFromFile(std::ifstream& f);
147 virtual void readGepObjVarMapFromFile(std::ifstream& f);
148 virtual void readAndSetObjFieldSensitivity(std::ifstream& f, const std::string& delimiterStr);
150
151protected:
153 inline PTDataTy* getPTDataTy() const
154 {
155 return ptD.get();
156 }
157
158
160 void finalize() override;
161
163 virtual inline bool updateCallGraph(const CallSiteToFunPtrMap&)
164 {
165 assert(false && "Virtual function not implemented!");
166 return false;
167 }
168
170 {
171 DiffPTDataTy* diff = SVFUtil::dyn_cast<DiffPTDataTy>(ptD.get());
172 assert(diff && "BVDataPTAImpl::getDiffPTDataTy: not a DiffPTDataTy!");
173 return diff;
174 }
175
176 inline DFPTDataTy* getDFPTDataTy() const
177 {
178 DFPTDataTy* df = SVFUtil::dyn_cast<DFPTDataTy>(ptD.get());
179 assert(df && "BVDataPTAImpl::getDFPTDataTy: not a DFPTDataTy!");
180 return df;
181 }
182
184 {
185 MutDFPTDataTy* mdf = SVFUtil::dyn_cast<MutDFPTDataTy>(ptD.get());
186 assert(mdf && "BVDataPTAImpl::getMutDFPTDataTy: not a MutDFPTDataTy!");
187 return mdf;
188 }
189
191 {
192 VersionedPTDataTy* v = SVFUtil::dyn_cast<VersionedPTDataTy>(ptD.get());
193 assert(v && "BVDataPTAImpl::getVersionedPTDataTy: not a VersionedPTDataTy!");
194 return v;
195 }
196
199
203
206 virtual void normalizePointsTo();
207
208private:
210 std::unique_ptr<PTDataTy> ptD;
211
213
214public:
217 const SVFVar* V2) override
218 {
219 return alias(V1->getId(), V2->getId());
220 }
221
224
226 virtual AliasResult alias(const PointsTo& pts1, const PointsTo& pts2);
227
231
233 inline bool mayAlias(const PointsTo& pts1, const PointsTo& pts2)
234 {
236 }
237
239
240 void dumpCPts() override
241 {
242 ptD->dumpPTData();
243 }
244
245 void dumpTopLevelPtsTo() override;
246
247 void dumpAllPts() override;
249};
250
254template<class Cond>
256{
257
258public:
266
269 {
271 ptD = new MutPTDataTy();
272 else
273 assert(false && "no points-to data available");
274
276 }
277
279 virtual ~CondPTAImpl()
280 {
281 destroy();
282 }
283
284 static inline bool classof(const PointerAnalysis *pta)
285 {
286 return pta->getImplTy() == PTAImplTy::CondImpl;
287 }
288
290 inline void destroy()
291 {
292 delete ptD;
293 ptD = nullptr;
294 }
295
297 inline PTDataTy* getPTDataTy() const
298 {
299 return ptD;
300 }
301
303 {
304 MutPTDataTy* mut = SVFUtil::dyn_cast<MutPTDataTy>(ptD);
305 assert(mut && "BVDataPTAImpl::getMutPTDataTy: not a MutPTDataTy!");
306 return mut;
307 }
308
309 inline bool hasPtsMap(void) const
310 {
311 return SVFUtil::isa<MutPTDataTy>(ptD);
312 }
313
314 inline const typename MutPTDataTy::PtsMap& getPtsMap() const
315 {
316 if (MutPTDataTy *m = SVFUtil::dyn_cast<MutPTDataTy>(ptD)) return m->getPtsMap();
317 assert(false && "CondPTAImpl::getPtsMap: not a PTData with a PtsMap!");
318 exit(1);
319 }
320
323 virtual inline const CPtSet& getPts(CVar id)
324 {
325 return ptD->getPts(id);
326 }
327 virtual inline const Set<CVar>& getRevPts(CVar nodeId)
328 {
329 return ptD->getRevPts(nodeId);
330 }
332
334 virtual inline void clearPts()
335 {
336 ptD->clear();
337 }
338
340 bool overlap(const CPtSet& cpts1, const CPtSet& cpts2) const
341 {
342 for (typename CPtSet::const_iterator it1 = cpts1.begin(); it1 != cpts1.end(); ++it1)
343 {
344 for (typename CPtSet::const_iterator it2 = cpts2.begin(); it2 != cpts2.end(); ++it2)
345 {
346 if(isSameVar(*it1,*it2))
347 return true;
348 }
349 }
350 return false;
351 }
352
355 {
356 expandedCpts = cpts;;
357 for(typename CPtSet::const_iterator cit = cpts.begin(), ecit=cpts.end(); cit!=ecit; ++cit)
358 {
359 if(pag->getBaseObjVarID(cit->get_id())==cit->get_id())
360 {
361 NodeBS& fields = pag->getAllFieldsObjVars(cit->get_id());
362 for(NodeBS::iterator it = fields.begin(), eit = fields.end(); it!=eit; ++it)
363 {
364 CVar cvar(cit->get_cond(),*it);
365 expandedCpts.set(cvar);
366 }
367 }
368 }
369 }
370
371protected:
372
374 virtual void finalize()
375 {
378 }
381
382 virtual inline bool unionPts(CVar id, const CPtSet& target)
383 {
384 return ptD->unionPts(id, target);
385 }
386
387 virtual inline bool unionPts(CVar id, CVar ptd)
388 {
389 return ptD->unionPts(id,ptd);
390 }
391
392 virtual inline bool addPts(CVar id, CVar ptd)
393 {
394 return ptD->addPts(id,ptd);
395 }
397
399
400 inline bool mustAlias(const CVar& var1, const CVar& var2)
401 {
402 if(isSameVar(var1,var2))
403 return true;
404
405 bool singleton = !(isHeapMemObj(var1.get_id()) || isLocalVarInRecursiveFun(var1.get_id()));
406 if(isCondCompatible(var1.get_cond(),var2.get_cond(),singleton) == false)
407 return false;
408
409 const CPtSet& cpts1 = getPts(var1);
410 const CPtSet& cpts2 = getPts(var2);
411 return (contains(cpts1,cpts2) && contains(cpts2,cpts1));
412 }
413
414 // Whether cpts1 contains all points-to targets of pts2
415 bool contains(const CPtSet& cpts1, const CPtSet& cpts2)
416 {
417 if (cpts1.empty() || cpts2.empty())
418 return false;
419
420 for (typename CPtSet::const_iterator it2 = cpts2.begin(); it2 != cpts2.end(); ++it2)
421 {
422 bool hasObj = false;
423 for (typename CPtSet::const_iterator it1 = cpts1.begin(); it1 != cpts1.end(); ++it1)
424 {
425 if(isSameVar(*it1,*it2))
426 {
427 hasObj = true;
428 break;
429 }
430 }
431 if(hasObj == false)
432 return false;
433 }
434 return true;
435 }
436
438 bool isSameVar(const CVar& var1, const CVar& var2) const
439 {
440 if(var1.get_id() != var2.get_id())
441 return false;
442
444 bool singleton = !(isHeapMemObj(var1.get_id()) || isLocalVarInRecursiveFun(var1.get_id()));
445 return isCondCompatible(var1.get_cond(),var2.get_cond(),singleton);
446 }
448
450 virtual void normalizePointsTo()
451 {
452 normalized = true;
453 if (hasPtsMap())
454 {
455 const typename MutPTDataTy::PtsMap& ptsMap = getPtsMap();
456 for(typename MutPTDataTy::PtsMap::const_iterator it = ptsMap.begin(), eit=ptsMap.end(); it!=eit; ++it)
457 {
458 for(typename CPtSet::const_iterator cit = it->second.begin(), ecit=it->second.end(); cit!=ecit; ++cit)
459 {
460 ptrToBVPtsMap[(it->first).get_id()].set(cit->get_id());
461 objToNSRevPtsMap[cit->get_id()].insert((it->first).get_id());
462 ptrToCPtsMap[(it->first).get_id()].set(*cit);
463 }
464 }
465 }
466 else
467 {
468 assert(false && "CondPTAImpl::NormalizePointsTo: could not normalize points-to sets");
469 }
470 }
481public:
483 virtual void dumpCPts()
484 {
485 ptD->dumpPTData();
486 }
488 virtual inline PointsTo getBVPointsTo(const CPtSet& cpts) const
489 {
491 for(typename CPtSet::const_iterator cit = cpts.begin(), ecit=cpts.end(); cit!=ecit; ++cit)
492 pts.set(cit->get_id());
493 return pts;
494 }
496 virtual inline PointsTo& getPts(NodeID ptr)
497 {
498 assert(normalized && "Pts of all context-var have to be merged/normalized. Want to use getPts(CVar cvar)??");
499 return ptrToBVPtsMap[ptr];
500 }
502 virtual inline const CPtSet& getCondPointsTo(NodeID ptr)
503 {
504 assert(normalized && "Pts of all context-vars have to be merged/normalized. Want to use getPts(CVar cvar)??");
505 return ptrToCPtsMap[ptr];
506 }
508 virtual inline NodeSet& getRevPts(NodeID obj)
509 {
510 assert(normalized && "Pts of all context-var have to be merged/normalized. Want to use getPts(CVar cvar)??");
511 return objToNSRevPtsMap[obj];
512 }
513
515 virtual inline AliasResult alias(const SVFVar* V1, const SVFVar* V2)
516 {
517 return alias(V1->getId(), V2->getId());
518 }
525 virtual AliasResult alias(const CVar& var1, const CVar& var2)
526 {
527 return alias(getPts(var1),getPts(var2));
528 }
530 virtual inline AliasResult alias(const CPtSet& pts1, const CPtSet& pts2)
531 {
538 else if(this->getAnalysisTy() == PTATY::PathS_DDA && contains(cpts1,cpts2) && contains(cpts2,cpts1))
539 {
541 }
542 else if(overlap(cpts1,cpts2))
544 else
546 }
548 inline bool containBlackHoleNode(const CPtSet& cpts)
549 {
550 for(typename CPtSet::const_iterator cit = cpts.begin(), ecit=cpts.end(); cit!=ecit; ++cit)
551 {
552 if(cit->get_id() == pag->getBlackHoleNode())
553 return true;
554 }
555 return false;
556 }
558 inline bool containConstantNode(const CPtSet& cpts)
559 {
560 for(typename CPtSet::const_iterator cit = cpts.begin(), ecit=cpts.end(); cit!=ecit; ++cit)
561 {
562 if(cit->get_id() == pag->getConstantNode())
563 return true;
564 }
565 return false;
566 }
568 virtual bool isCondCompatible(const Cond& cxt1, const Cond& cxt2, bool singleton) const = 0;
569
572 {
573 for (OrderedNodeSet::iterator nIter = this->getAllValidPtrs().begin(); nIter != this->getAllValidPtrs().end(); ++nIter)
574 {
575 const SVFVar* node = this->getPAG()->getSVFVar(*nIter);
576 if (this->getPAG()->isValidTopLevelPtr(node))
577 {
578 if (SVFUtil::isa<DummyObjVar>(node))
579 {
580 SVFUtil::outs() << "##<Blackhole or constant> id:" << node->getId();
581 }
582 else if (!SVFUtil::isa<DummyValVar>(node))
583 {
584 SVFUtil::outs() << "##<" << node->toString() << "> ";
585 //SVFUtil::outs() << "Source Loc: " << SVFUtil::getSourceLoc(node->getValue());
586 }
587
588 const PointsTo& pts = getPts(node->getId());
589 SVFUtil::outs() << "\nNodeID " << node->getId() << " ";
590 if (pts.empty())
591 {
592 SVFUtil::outs() << "\t\tPointsTo: {empty}\n\n";
593 }
594 else
595 {
596 SVFUtil::outs() << "\t\tPointsTo: { ";
597 for (PointsTo::iterator it = pts.begin(), eit = pts.end(); it != eit; ++it)
598 SVFUtil::outs() << *it << " ";
599 SVFUtil::outs() << "}\n\n";
600 }
601 }
602 }
603
604 SVFUtil::outs().flush();
605 }
606};
607
608} // End namespace SVF
609
610#endif /* INCLUDE_MEMORYMODEL_POINTERANALYSISIMPL_H_ */
newitem type
Definition cJSON.cpp:2739
#define false
Definition cJSON.cpp:70
VersionedPTDataTy * getVersionedPTDataTy() const
PersistentDiffPTData< NodeID, NodeSet, NodeID, PointsTo > PersDiffPTDataTy
virtual void normalizePointsTo()
virtual void writeToFile(const std::string &filename)
Interface for analysis result storage on filesystem.
virtual bool readFromFile(const std::string &filename)
PersistentIncDFPTData< NodeID, NodeSet, NodeID, PointsTo > PersIncDFPTDataTy
virtual void writeObjVarToFile(const std::string &filename)
const NodeSet & getRevPts(NodeID nodeId) override
virtual void clearAllPts()
Clear all data.
virtual void clearPts(NodeID id, NodeID element)
Remove element from the points-to set of id.
~BVDataPTAImpl() override=default
Destructor.
virtual void readAndSetObjFieldSensitivity(std::ifstream &f, const std::string &delimiterStr)
DiffPTDataTy * getDiffPTDataTy() const
AliasResult alias(const SVFVar *V1, const SVFVar *V2) override
Interface expose to users of our pointer analysis, given Value infos.
MutablePTData< NodeID, NodeSet, NodeID, PointsTo > MutPTDataTy
DFPTData< NodeID, NodeSet, NodeID, PointsTo > DFPTDataTy
virtual void writeGepObjVarMapToFile(std::fstream &f)
void finalize() override
Finalization of pointer analysis, and normalize points-to information to Bit Vector representation.
MutableIncDFPTData< NodeID, NodeSet, NodeID, PointsTo > MutIncDFPTDataTy
bool mayAlias(const PointsTo &pts1, const PointsTo &pts2)
Convenience bool wrappers: return true if the two operands may/must/partial alias.
static bool classof(const PointerAnalysis *pta)
virtual void writePtsResultToFile(std::fstream &f)
PersistentDFPTData< NodeID, NodeSet, NodeID, PointsTo > PersDFPTDataTy
virtual void expandFIObjs(const PointsTo &pts, PointsTo &expandedPts)
Expand FI objects.
void remapPointsToSets(void)
Remap all points-to sets to use the current mapping.
MutableVersionedPTData< NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set< VersionedVar > > MutVersionedPTDataTy
MutDFPTDataTy * getMutDFPTDataTy() const
VersionedPTData< NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set< VersionedVar > > VersionedPTDataTy
virtual void onTheFlyThreadCallGraphSolve(const CallSiteToFunPtrMap &callsites, CallEdgeMap &newForkEdges)
On the fly thread call graph construction respecting forksite.
PersistentPointsToCache< PointsTo > ptCache
virtual void onTheFlyCallGraphSolve(const CallSiteToFunPtrMap &callsites, CallEdgeMap &newEdges)
On the fly call graph construction.
virtual bool updateCallGraph(const CallSiteToFunPtrMap &)
Update callgraph. This should be implemented by its subclass.
std::unique_ptr< PTDataTy > ptD
Points-to data.
DFPTDataTy * getDFPTDataTy() const
DiffPTData< NodeID, NodeSet, NodeID, PointsTo > DiffPTDataTy
MutableDFPTData< NodeID, NodeSet, NodeID, PointsTo > MutDFPTDataTy
PersistentPointsToCache< PointsTo > & getPtCache()
MutableDiffPTData< NodeID, NodeSet, NodeID, PointsTo > MutDiffPTDataTy
void dumpCPts() override
dump and debug, print out conditional pts
PTData< NodeID, NodeSet, NodeID, PointsTo > PTDataTy
void dumpTopLevelPtsTo() override
virtual bool unionPts(NodeID id, NodeID ptd)
const PointsTo & getPts(NodeID id) override
PersistentVersionedPTData< NodeID, NodeSet, NodeID, PointsTo, VersionedVar, Set< VersionedVar > > PersVersionedPTDataTy
PersistentPTData< NodeID, NodeSet, NodeID, PointsTo > PersPTDataTy
virtual bool unionPts(NodeID id, const PointsTo &target)
virtual void readPtsResultFromFile(std::ifstream &f)
PTDataTy * getPTDataTy() const
Get points-to data structure.
virtual bool addPts(NodeID id, NodeID ptd)
virtual void readGepObjVarMapFromFile(std::ifstream &f)
virtual void clearFullPts(NodeID id)
Clear points-to set of id.
virtual ~CondPTAImpl()
Destructor.
virtual bool addPts(CVar id, CVar ptd)
MutPTDataTy * getMutPTDataTy() const
virtual bool unionPts(CVar id, const CPtSet &target)
PtrToNSMap objToNSRevPtsMap
Normal points-to representation (without conditions)
PTDataTy * getPTDataTy() const
Get points-to data.
PtrToBVPtsMap ptrToBVPtsMap
Normal points-to representation (without conditions)
bool containConstantNode(const CPtSet &cpts)
Test constant node for cpts.
bool mustAlias(const CVar &var1, const CVar &var2)
Internal interface to be used for conditional points-to set queries.
CondStdSet< CVar > CPtSet
virtual const CPtSet & getCondPointsTo(NodeID ptr)
Given a pointer return its conditional points-to.
virtual bool unionPts(CVar id, CVar ptd)
Map< NodeID, CPtSet > PtrToCPtsMap
virtual const Set< CVar > & getRevPts(CVar nodeId)
CondPTAImpl(SVFIR *pag, PTATY type)
map a pointer to its conditional points-to set
bool hasPtsMap(void) const
bool contains(const CPtSet &cpts1, const CPtSet &cpts2)
void destroy()
Release memory.
PtrToCPtsMap ptrToCPtsMap
Conditional points-to representation (with conditions)
virtual bool isCondCompatible(const Cond &cxt1, const Cond &cxt2, bool singleton) const =0
Whether two conditions are compatible (to be implemented by child class)
PTData< CVar, Set< CVar >, CVar, CPtSet > PTDataTy
bool isSameVar(const CVar &var1, const CVar &var2) const
Whether two pointers/objects are the same one by considering their conditions.
void dumpTopLevelPtsTo()
Dump points-to information of top-level pointers.
Map< NodeID, NodeSet > PtrToNSMap
map a pointer to its BitVector points-to representation
void expandFIObjs(const CPtSet &cpts, CPtSet &expandedCpts)
Expand all fields of an aggregate in all points-to sets.
bool containBlackHoleNode(const CPtSet &cpts)
Test blk node for cpts.
virtual AliasResult alias(const CPtSet &pts1, const CPtSet &pts2)
Interface expose to users of our pointer analysis, given two conditional points-to sets.
virtual PointsTo getBVPointsTo(const CPtSet &cpts) const
Given a conditional pts return its bit vector points-to.
virtual NodeSet & getRevPts(NodeID obj)
Given an object return all pointers points to this object.
virtual void finalize()
Finalization of pointer analysis, and normalize points-to information to Bit Vector representation.
virtual void dumpCPts()
Print out conditional pts.
virtual void normalizePointsTo()
Normalize points-to information to BitVector/conditional representation.
bool normalized
Normalized flag.
Map< NodeID, PointsTo > PtrToBVPtsMap
virtual AliasResult alias(NodeID node1, NodeID node2)
Interface expose to users of our pointer analysis, given two pointers.
virtual AliasResult alias(const SVFVar *V1, const SVFVar *V2)
Interface expose to users of our pointer analysis, given Value infos.
virtual AliasResult alias(const CVar &var1, const CVar &var2)
Interface expose to users of our pointer analysis, given conditional variables.
bool overlap(const CPtSet &cpts1, const CPtSet &cpts2) const
Whether cpts1 and cpts2 have overlap points-to targets.
virtual void clearPts()
Clear all data.
virtual PointsTo & getPts(NodeID ptr)
Given a pointer return its bit vector points-to.
static bool classof(const PointerAnalysis *pta)
virtual const CPtSet & getPts(CVar id)
const MutPTDataTy::PtsMap & getPtsMap() const
MutablePTData< CVar, Set< CVar >, CVar, CPtSet > MutPTDataTy
PTDataTy * ptD
Points-to data.
OrderedSet< Element >::const_iterator const_iterator
iterator begin()
Iterators.
NodeID getBlackHoleNode() const
Definition IRGraph.h:246
NodeID getConstantNode() const
Definition IRGraph.h:250
Map< Key, DataSet > PtsMap
bool isLocalVarInRecursiveFun(NodeID id) const
Whether a local variable is in function recursions.
virtual void finalize()
Finalization of a pointer analysis, including checking alias correctness.
OrderedMap< const CallICFGNode *, FunctionSet > CallEdgeMap
PTAImplTy ptaImplTy
PTA implementation type.
SVFIR * getPAG() const
bool mayAlias(const SVFVar *V1, const SVFVar *V2)
Convenience bool wrappers: return true if the two operands may/must/partial alias.
OrderedNodeSet & getAllValidPtrs()
Get all Valid Pointers for resolution.
PTAImplTy getImplTy() const
Return implementation type of the pointer analysis.
PTATY getAnalysisTy() const
Type of pointer analysis.
SVFIR::CallSiteToFunPtrMap CallSiteToFunPtrMap
static SVFIR * pag
SVFIR.
bool isHeapMemObj(NodeID id) const
Whether this object is heap or array.
void set(u32_t n)
Inserts n in the set.
Definition PointsTo.cpp:169
NodeID getBaseObjVarID(NodeID id) const
Base and Offset methods for Value and Object node.
Definition SVFIR.h:554
NodeBS & getAllFieldsObjVars(const BaseObjVar *obj)
Get all fields of an object.
Definition SVFIR.cpp:573
const SVFVar * getSVFVar(NodeID id) const
ObjVar/GepObjVar/BaseObjVar.
Definition SVFIR.h:135
NodeID getId() const
Get ID.
Definition SVFValue.h:158
virtual const std::string toString() const
Get string representation.
iterator begin() const
std::ostream & outs()
Overwrite llvm::outs()
Definition SVFUtil.h:52
for isBitcode
Definition BasicTypes.h:70
@ BVDataImpl
Represents BVDataPTAImpl.
Definition PTATY.h:42
@ CondImpl
Represents CondPTAImpl.
Definition PTATY.h:43
Set< NodeID > NodeSet
Definition GeneralType.h:87
PTATY
Pointer analysis type list.
Definition PTATY.h:9
@ Cxt_DDA
context sensitive DDA
Definition PTATY.h:32
@ PathS_DDA
Guarded value-flow DDA.
Definition PTATY.h:31
u32_t NodeID
Definition GeneralType.h:76
AliasResult
Definition SVFType.h:619
@ MustAlias
Definition SVFType.h:622
@ MayAlias
Definition SVFType.h:621
@ NoAlias
Definition SVFType.h:620
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76