svf-lib 1.0.729 → 1.0.733

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 (61) hide show
  1. package/SVF-linux/Release-build/lib/libSvf.a +0 -0
  2. package/SVF-linux/include/DDA/DDAVFSolver.h +1 -1
  3. package/SVF-linux/include/Graphs/PAG.h +4 -4
  4. package/SVF-linux/include/Graphs/PAGNode.h +3 -3
  5. package/SVF-linux/include/MemoryModel/SVFIR.h +1 -1
  6. package/SVF-linux/include/MemoryModel/SVFSymbols.h +648 -0
  7. package/SVF-linux/include/MemoryModel/SymbolTableInfo.h +26 -14
  8. package/SVF-linux/include/SVF-FE/SymbolTableBuilder.h +1 -1
  9. package/SVF-osx/Release-build/lib/CUDD/libCudd.a +0 -0
  10. package/SVF-osx/Release-build/lib/libSvf.a +0 -0
  11. package/SVF-osx/include/DDA/ContextDDA.h +1 -1
  12. package/SVF-osx/include/DDA/DDAClient.h +8 -8
  13. package/SVF-osx/include/DDA/DDAVFSolver.h +6 -6
  14. package/SVF-osx/include/DDA/FlowDDA.h +1 -1
  15. package/SVF-osx/include/Graphs/ConsG.h +6 -6
  16. package/SVF-osx/include/Graphs/ConsGEdge.h +2 -2
  17. package/SVF-osx/include/Graphs/ConsGNode.h +1 -1
  18. package/SVF-osx/include/Graphs/ExternalPAG.h +14 -14
  19. package/SVF-osx/include/Graphs/ICFGNode.h +14 -14
  20. package/SVF-osx/include/Graphs/IRGraph.h +245 -0
  21. package/SVF-osx/include/Graphs/OfflineConsG.h +1 -1
  22. package/SVF-osx/include/Graphs/PAG.h +4 -4
  23. package/SVF-osx/include/Graphs/PAGNode.h +4 -4
  24. package/SVF-osx/include/Graphs/SVFG.h +1 -1
  25. package/SVF-osx/include/Graphs/SVFGOPT.h +3 -3
  26. package/SVF-osx/include/Graphs/VFG.h +19 -19
  27. package/SVF-osx/include/Graphs/VFGNode.h +2 -3
  28. package/SVF-osx/include/MSSA/MemRegion.h +11 -11
  29. package/SVF-osx/include/MSSA/MemSSA.h +4 -4
  30. package/SVF-osx/include/MTA/FSMPTA.h +1 -1
  31. package/SVF-osx/include/MemoryModel/LocationSet.h +0 -1
  32. package/SVF-osx/include/MemoryModel/PAGBuilderFromFile.h +8 -8
  33. package/SVF-osx/include/MemoryModel/PTAStat.h +31 -31
  34. package/SVF-osx/include/MemoryModel/PointerAnalysis.h +9 -9
  35. package/SVF-osx/include/MemoryModel/PointerAnalysisImpl.h +3 -3
  36. package/SVF-osx/include/MemoryModel/SVFIR.h +738 -0
  37. package/SVF-osx/include/MemoryModel/SVFStatements.h +738 -0
  38. package/SVF-osx/include/MemoryModel/SVFSymbols.h +648 -0
  39. package/SVF-osx/include/MemoryModel/SVFVariables.h +842 -0
  40. package/SVF-osx/include/MemoryModel/SymbolTableInfo.h +731 -0
  41. package/SVF-osx/include/SABER/SaberSVFGBuilder.h +0 -2
  42. package/SVF-osx/include/SABER/SrcSnkDDA.h +3 -3
  43. package/SVF-osx/include/SVF-FE/Graph2Json.h +1 -3
  44. package/SVF-osx/include/SVF-FE/SVFIRBuilder.h +392 -0
  45. package/SVF-osx/include/SVF-FE/SymbolTableBuilder.h +89 -0
  46. package/SVF-osx/include/Util/BasicTypes.h +0 -10
  47. package/SVF-osx/include/Util/CFLSolver.h +1 -1
  48. package/SVF-osx/include/Util/ExtAPI.h +1 -1
  49. package/SVF-osx/include/Util/IRAnnotator.h +6 -6
  50. package/SVF-osx/include/Util/Options.h +1 -1
  51. package/SVF-osx/include/Util/SVFUtil.h +11 -0
  52. package/SVF-osx/include/Util/TypeBasedHeapCloning.h +11 -11
  53. package/SVF-osx/include/WPA/Andersen.h +11 -100
  54. package/SVF-osx/include/WPA/AndersenSFR.h +4 -4
  55. package/SVF-osx/include/WPA/FlowSensitive.h +2 -2
  56. package/SVF-osx/include/WPA/FlowSensitiveTBHC.h +1 -1
  57. package/SVF-osx/include/WPA/Steensgaard.h +2 -2
  58. package/SVF-osx/include/WPA/TypeAnalysis.h +1 -1
  59. package/SVF-osx/include/WPA/VersionedFlowSensitive.h +2 -2
  60. package/SVF-osx/include/WPA/WPAStat.h +1 -2
  61. package/package.json +1 -1
@@ -0,0 +1,648 @@
1
+ //===- SVFSymbols.h -- SVF symbols and variables------------------------//
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
+ * SVFSymbols.h
25
+ *
26
+ * Created on: Nov 11, 2013
27
+ * Author: Yulei Sui
28
+ */
29
+
30
+ #ifndef OBJECTANDSYMBOL_H_
31
+ #define OBJECTANDSYMBOL_H_
32
+
33
+ #include "MemoryModel/LocationSet.h"
34
+ #include "Util/SVFModule.h"
35
+
36
+ namespace SVF
37
+ {
38
+
39
+ class ObjTypeInfo;
40
+
41
+ /// Symbol symbol/variable types
42
+ enum SYMTYPE
43
+ {
44
+ BlackHole,
45
+ ConstantObj,
46
+ BlkPtr,
47
+ NullPtr,
48
+ ValSymbol,
49
+ ObjSymbol,
50
+ RetSymbol,
51
+ VarargSymbol
52
+ };
53
+
54
+
55
+ /*
56
+ * Variable symbols in SVF
57
+ */
58
+ class SVFVar
59
+ {
60
+
61
+ private:
62
+ /// The unique value of this symbol/variable
63
+ const Value *refVal;
64
+ /// The unique id to represent this symbol
65
+ SymID symId;
66
+ /// The type of this symbol/variable
67
+ u32_t kind;
68
+ public:
69
+
70
+ /// Constructor
71
+ SVFVar(SymID id, u32_t k, const Value *val): symId(id), refVal(val), kind(k){
72
+ }
73
+
74
+ /// Destructor
75
+ virtual ~SVFVar()
76
+ {
77
+ }
78
+
79
+ /// Get the reference value to this object
80
+ inline const Value* getValue() const
81
+ {
82
+ return refVal;
83
+ }
84
+
85
+ /// Get the memory object id
86
+ inline SymID getId() const
87
+ {
88
+ return symId;
89
+ }
90
+
91
+ /// ClassOf
92
+ //@{
93
+ static inline bool classof(const SVFVar*)
94
+ {
95
+ return true;
96
+ }
97
+ ///@}
98
+
99
+ virtual const std::string toString() const = 0;
100
+
101
+ /// Overloading operator << for printing
102
+ //@{
103
+ friend raw_ostream& operator<< (raw_ostream &o, const SVFVar &var)
104
+ {
105
+ o << var.toString();
106
+ return o;
107
+ }
108
+ //@}
109
+
110
+ inline u32_t getKind() const {
111
+ return kind;
112
+ }
113
+ };
114
+
115
+ /*
116
+ * Value symbols (top-level variables in LLVM-based languages)
117
+ */
118
+ class ValSym : public SVFVar
119
+ {
120
+
121
+ public:
122
+ ValSym(SymID id, const Value* val) : SVFVar(id, SYMTYPE::ValSymbol, val){
123
+ }
124
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
125
+ //@{
126
+ static inline bool classof(const ValSym *)
127
+ {
128
+ return true;
129
+ }
130
+ static inline bool classof(const SVFVar *var)
131
+ {
132
+ return var->getKind() == SYMTYPE::ValSymbol ||
133
+ var->getKind() == SYMTYPE::BlkPtr ||
134
+ var->getKind() == SYMTYPE::NullPtr;
135
+ }
136
+ //@}
137
+ virtual const std::string toString() const;
138
+ };
139
+
140
+
141
+ /*!
142
+ * Memory object symbols or MemObj (address-taken variables in LLVM-based languages)
143
+ */
144
+ class ObjSym : public SVFVar
145
+ {
146
+
147
+ private:
148
+ /// Type information of this object
149
+ ObjTypeInfo* typeInfo;
150
+
151
+ public:
152
+
153
+ /// Constructor
154
+ ObjSym(SymID id, ObjTypeInfo* ti, const Value *val = nullptr);
155
+
156
+ /// Destructor
157
+ ~ObjSym()
158
+ {
159
+ destroy();
160
+ }
161
+
162
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
163
+ //@{
164
+ static inline bool classof(const ObjSym *)
165
+ {
166
+ return true;
167
+ }
168
+ static inline bool classof(const SVFVar *var)
169
+ {
170
+ return var->getKind() == SYMTYPE::ObjSymbol ||
171
+ var->getKind() == SYMTYPE::BlackHole ||
172
+ var->getKind() == SYMTYPE::ConstantObj;
173
+ }
174
+ //@}
175
+ virtual const std::string toString() const;
176
+
177
+ /// Get obj type
178
+ const Type* getType() const;
179
+
180
+ /// Get max field offset limit
181
+ Size_t getMaxFieldOffsetLimit() const;
182
+
183
+ /// Return true if its field limit is 0
184
+ bool isFieldInsensitive() const;
185
+
186
+ /// Set the memory object to be field insensitive
187
+ void setFieldInsensitive();
188
+
189
+ /// Set the memory object to be field sensitive (up to max field limit)
190
+ void setFieldSensitive();
191
+
192
+ /// Whether it is a black hole object
193
+ bool isBlackHoleObj() const;
194
+
195
+ /// object attributes methods
196
+ //@{
197
+ bool isFunction() const;
198
+ bool isGlobalObj() const;
199
+ bool isStaticObj() const;
200
+ bool isStack() const;
201
+ bool isHeap() const;
202
+ bool isStruct() const;
203
+ bool isArray() const;
204
+ bool isVarStruct() const;
205
+ bool isVarArray() const;
206
+ bool isConstStruct() const;
207
+ bool isConstArray() const;
208
+ bool isConstant() const;
209
+ bool hasPtrObj() const;
210
+ bool isNonPtrFieldObj(const LocationSet& ls) const;
211
+ //@}
212
+
213
+ /// Operator overloading
214
+ inline bool operator==(const ObjSym &mem) const
215
+ {
216
+ return getValue() == mem.getValue();
217
+ }
218
+
219
+ /// Clean up memory
220
+ void destroy();
221
+ };
222
+
223
+ typedef ObjSym MemObj;
224
+
225
+ /*
226
+ * BlockHole a unique sym used in points-to analysis to represent every possible objects
227
+ */
228
+ class BlackHoleSym : public ObjSym
229
+ {
230
+
231
+ public:
232
+ BlackHoleSym(SymID id, ObjTypeInfo* ti) : ObjSym(id, ti){
233
+
234
+ }
235
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
236
+ //@{
237
+ static inline bool classof(const BlackHoleSym *)
238
+ {
239
+ return true;
240
+ }
241
+ static inline bool classof(const ObjSym *var)
242
+ {
243
+ return var->getKind() == SYMTYPE::BlackHole;
244
+ }
245
+ static inline bool classof(const SVFVar *var)
246
+ {
247
+ return var->getKind() == SYMTYPE::BlackHole;
248
+ }
249
+ //@}
250
+ virtual const std::string toString() const;
251
+ };
252
+
253
+ /*
254
+ * A unique sym to represent all constant objects if `Options::ModelConsts` is not turned on
255
+ */
256
+ class ConstantObjSym : public ObjSym
257
+ {
258
+
259
+ public:
260
+ ConstantObjSym(SymID id, ObjTypeInfo* ti) : ObjSym(id, ti){
261
+
262
+ }
263
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
264
+ //@{
265
+ static inline bool classof(const ConstantObjSym *)
266
+ {
267
+ return true;
268
+ }
269
+ static inline bool classof(const ObjSym *var)
270
+ {
271
+ return var->getKind() == SYMTYPE::ConstantObj;
272
+ }
273
+ static inline bool classof(const SVFVar *var)
274
+ {
275
+ return var->getKind() == SYMTYPE::ConstantObj;
276
+ }
277
+ //@}
278
+ virtual const std::string toString() const;
279
+ };
280
+
281
+ /*
282
+ * A unique pointer sym, which points to BlackHoleSym
283
+ */
284
+ class BlkPtrSym : public ValSym
285
+ {
286
+
287
+ public:
288
+ BlkPtrSym(SymID id) : ValSym(id, nullptr){
289
+
290
+ }
291
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
292
+ //@{
293
+ static inline bool classof(const BlkPtrSym *)
294
+ {
295
+ return true;
296
+ }
297
+ static inline bool classof(const ValSym *var)
298
+ {
299
+ return var->getKind() == SYMTYPE::BlkPtr;
300
+ }
301
+ static inline bool classof(const SVFVar *var)
302
+ {
303
+ return var->getKind() == SYMTYPE::BlkPtr;
304
+ }
305
+ //@}
306
+ virtual const std::string toString() const;
307
+ };
308
+
309
+
310
+ /*
311
+ * A unique pointer sym, which points to null
312
+ */
313
+ class NullPtrSym : public ValSym
314
+ {
315
+
316
+ public:
317
+ NullPtrSym(SymID id) : ValSym(id,nullptr){
318
+
319
+ }
320
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
321
+ //@{
322
+ static inline bool classof(const NullPtrSym *)
323
+ {
324
+ return true;
325
+ }
326
+ static inline bool classof(const ValSym *var)
327
+ {
328
+ return var->getKind() == SYMTYPE::NullPtr;
329
+ }
330
+ static inline bool classof(const SVFVar *var)
331
+ {
332
+ return var->getKind() == SYMTYPE::NullPtr;
333
+ }
334
+ //@}
335
+ virtual const std::string toString() const;
336
+ };
337
+
338
+ /*
339
+ * SVF intrinsic symbols which are not explicitly presented in a program.
340
+ */
341
+ class IntrinsicSym : public SVFVar
342
+ {
343
+
344
+ public:
345
+ IntrinsicSym(SymID id, u32_t type, const Value* val) : SVFVar(id, type, val){
346
+ }
347
+
348
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
349
+ //@{
350
+ static inline bool classof(const IntrinsicSym *)
351
+ {
352
+ return true;
353
+ }
354
+ static inline bool classof(const SVFVar *var)
355
+ {
356
+ return var->getKind() == SYMTYPE::RetSymbol ||
357
+ var->getKind() == SYMTYPE::VarargSymbol;
358
+ }
359
+ //@}
360
+ virtual const std::string toString() const = 0;
361
+ };
362
+
363
+
364
+ /*
365
+ * RetSym used to represent the unique return of a program function
366
+ */
367
+ class RetSym : public IntrinsicSym
368
+ {
369
+
370
+ public:
371
+ RetSym(SymID id, const Function* fun) : IntrinsicSym(id, SYMTYPE::RetSymbol, fun){
372
+ }
373
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
374
+ //@{
375
+ static inline bool classof(const RetSym *)
376
+ {
377
+ return true;
378
+ }
379
+ static inline bool classof(const IntrinsicSym *var)
380
+ {
381
+ return var->getKind() == SYMTYPE::RetSymbol;
382
+ }
383
+ static inline bool classof(const SVFVar *var)
384
+ {
385
+ return var->getKind() == SYMTYPE::RetSymbol;
386
+ }
387
+ //@}
388
+ virtual const std::string toString() const;
389
+ };
390
+
391
+ /*
392
+ * VarargSym used to represent the varargs of a program function
393
+ */
394
+ class VarargSym : public IntrinsicSym
395
+ {
396
+
397
+ public:
398
+ VarargSym(SymID id, const Function* fun) : IntrinsicSym(id, SYMTYPE::VarargSymbol, fun){
399
+ }
400
+ /// Methods for support type inquiry through isa, cast, and dyn_cast:
401
+ //@{
402
+ static inline bool classof(const VarargSym *)
403
+ {
404
+ return true;
405
+ }
406
+ static inline bool classof(const IntrinsicSym *var)
407
+ {
408
+ return var->getKind() == SYMTYPE::VarargSymbol;
409
+ }
410
+ static inline bool classof(const SVFVar *var)
411
+ {
412
+ return var->getKind() == SYMTYPE::VarargSymbol;
413
+ }
414
+ //@}
415
+ virtual const std::string toString() const;
416
+ };
417
+
418
+
419
+
420
+ /*!
421
+ * Struct information
422
+ */
423
+ class StInfo
424
+ {
425
+
426
+ private:
427
+ /// flattened field indices of a struct
428
+ std::vector<u32_t> fldIdxVec;
429
+ /// flattened field offsets of of a struct
430
+ std::vector<u32_t> foffset;
431
+ /// Types of all fields of a struct
432
+ Map<u32_t, const llvm::Type*> fldIdx2TypeMap;
433
+ /// Types of all fields of a struct
434
+ Map<u32_t, const llvm::Type*> offset2TypeMap;
435
+ /// All field infos after flattening a struct
436
+ std::vector<FieldInfo> finfo;
437
+
438
+ /// Max field limit
439
+ static u32_t maxFieldLimit;
440
+
441
+ public:
442
+ /// Constructor
443
+ StInfo()
444
+ {
445
+ }
446
+ /// Destructor
447
+ ~StInfo()
448
+ {
449
+ }
450
+
451
+ static inline void setMaxFieldLimit(u32_t limit)
452
+ {
453
+ maxFieldLimit = limit;
454
+ }
455
+
456
+ static inline u32_t getMaxFieldLimit()
457
+ {
458
+ return maxFieldLimit;
459
+ }
460
+
461
+ /// Get method for fields of a struct
462
+ //{@
463
+ inline const llvm::Type* getFieldTypeWithFldIdx(u32_t fldIdx)
464
+ {
465
+ return fldIdx2TypeMap[fldIdx];
466
+ }
467
+ inline const llvm::Type* getFieldTypeWithByteOffset(u32_t offset)
468
+ {
469
+ return offset2TypeMap[offset];
470
+ }
471
+ inline std::vector<u32_t>& getFieldIdxVec()
472
+ {
473
+ return fldIdxVec;
474
+ }
475
+ inline std::vector<u32_t>& getFieldOffsetVec()
476
+ {
477
+ return foffset;
478
+ }
479
+ inline std::vector<FieldInfo>& getFlattenFieldInfoVec()
480
+ {
481
+ return finfo;
482
+ }
483
+ //@}
484
+
485
+ /// Add field (index and offset) with its corresponding type
486
+ inline void addFldWithType(u32_t fldIdx, u32_t offset, const llvm::Type* type)
487
+ {
488
+ fldIdxVec.push_back(fldIdx);
489
+ foffset.push_back(offset);
490
+ fldIdx2TypeMap[fldIdx] = type;
491
+ offset2TypeMap[offset] = type;
492
+ }
493
+ };
494
+
495
+ /*!
496
+ * Type Info of an abstract memory object
497
+ */
498
+ class ObjTypeInfo
499
+ {
500
+
501
+ public:
502
+ typedef enum
503
+ {
504
+ FUNCTION_OBJ = 0x1, // object is a function
505
+ GLOBVAR_OBJ = 0x2, // object is a global variable
506
+ STATIC_OBJ = 0x4, // object is a static variable allocated before main
507
+ STACK_OBJ = 0x8, // object is a stack variable
508
+ HEAP_OBJ = 0x10, // object is a heap variable
509
+ VAR_STRUCT_OBJ = 0x20, // object contains struct
510
+ VAR_ARRAY_OBJ = 0x40, // object contains array
511
+ CONST_STRUCT_OBJ = 0x80, // constant struct
512
+ CONST_ARRAY_OBJ = 0x100, // constant array
513
+ CONST_OBJ = 0x200, // constant object str e.g.
514
+ HASPTR_OBJ = 0x400 // non pointer object including compound type have field that is a pointer type
515
+ } MEMTYPE;
516
+
517
+ private:
518
+ /// LLVM type
519
+ const Type* type;
520
+ /// Type flags
521
+ Size_t flags;
522
+ /// Max offset for flexible field sensitive analysis
523
+ /// maximum number of field object can be created
524
+ /// minimum number is 0 (field insensitive analysis)
525
+ u32_t maxOffsetLimit;
526
+ public:
527
+
528
+ /// Constructors
529
+ ObjTypeInfo(const Value*, const Type* t, u32_t max) :
530
+ type(t), flags(0), maxOffsetLimit(max)
531
+ {
532
+ }
533
+ /// Constructor
534
+ ObjTypeInfo(u32_t max, const Type* t) : type(t), flags(0), maxOffsetLimit(max)
535
+ {
536
+
537
+ }
538
+ /// Destructor
539
+ virtual ~ObjTypeInfo()
540
+ {
541
+
542
+ }
543
+
544
+ /// Analyse types of heap and static objects
545
+ void analyzeHeapObjType(const Type* type);
546
+
547
+ /// Analyse types of heap and static objects
548
+ void analyzeStaticObjType(const Type* type);
549
+
550
+ /// Get LLVM type
551
+ inline const Type* getType() const
552
+ {
553
+ return type;
554
+ }
555
+
556
+ /// Get max field offset limit
557
+ inline u32_t getMaxFieldOffsetLimit()
558
+ {
559
+ return maxOffsetLimit;
560
+ }
561
+
562
+ /// Get max field offset limit
563
+ inline void setMaxFieldOffsetLimit(u32_t limit)
564
+ {
565
+ maxOffsetLimit = limit;
566
+ }
567
+
568
+ /// Flag for this object type
569
+ //@{
570
+ inline void setFlag(MEMTYPE mask)
571
+ {
572
+ flags |= mask;
573
+ }
574
+ inline bool hasFlag(MEMTYPE mask)
575
+ {
576
+ return (flags & mask) == mask;
577
+ }
578
+ //@}
579
+
580
+ /// Object attributes
581
+ //@{
582
+ inline bool isFunction()
583
+ {
584
+ return hasFlag(FUNCTION_OBJ);
585
+ }
586
+ inline bool isGlobalObj()
587
+ {
588
+ return hasFlag(GLOBVAR_OBJ);
589
+ }
590
+ inline bool isStaticObj()
591
+ {
592
+ return hasFlag(STATIC_OBJ);
593
+ }
594
+ inline bool isStack()
595
+ {
596
+ return hasFlag(STACK_OBJ);
597
+ }
598
+ inline bool isHeap()
599
+ {
600
+ return hasFlag(HEAP_OBJ);
601
+ }
602
+ //@}
603
+
604
+ /// Object attributes (noted that an object can be a nested compound types)
605
+ /// e.g. both isStruct and isArray can return true
606
+ //@{
607
+ inline bool isVarStruct()
608
+ {
609
+ return hasFlag(VAR_STRUCT_OBJ);
610
+ }
611
+ inline bool isConstStruct()
612
+ {
613
+ return hasFlag(CONST_STRUCT_OBJ);
614
+ }
615
+ inline bool isStruct()
616
+ {
617
+ return hasFlag(VAR_STRUCT_OBJ) || hasFlag(CONST_STRUCT_OBJ);
618
+ }
619
+ inline bool isVarArray()
620
+ {
621
+ return hasFlag(VAR_ARRAY_OBJ);
622
+ }
623
+ inline bool isConstArray()
624
+ {
625
+ return hasFlag(CONST_ARRAY_OBJ);
626
+ }
627
+ inline bool isArray()
628
+ {
629
+ return hasFlag(VAR_ARRAY_OBJ) || hasFlag(CONST_ARRAY_OBJ);
630
+ }
631
+ inline bool isConstant()
632
+ {
633
+ return hasFlag(CONST_OBJ);
634
+ }
635
+ inline bool hasPtrObj()
636
+ {
637
+ return hasFlag(HASPTR_OBJ);
638
+ }
639
+ virtual bool isNonPtrFieldObj(const LocationSet& ls);
640
+ //@}
641
+ };
642
+
643
+ } // End namespace SVF
644
+
645
+
646
+
647
+
648
+ #endif /* OBJECTANDSYMBOL_H_ */