svf-lib 1.0.778 → 1.0.782
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.
- package/SVF-linux/Release-build/lib/libSvf.a +0 -0
- package/SVF-linux/include/MemoryModel/SVFIR.h +1 -1
- package/SVF-linux/include/MemoryModel/SVFVariables.h +25 -4
- package/SVF-linux/include/MemoryModel/SymbolTableInfo.h +17 -11
- package/SVF-osx/Release-build/lib/CUDD/libCudd.a +0 -0
- package/SVF-osx/Release-build/lib/libSvf.a +0 -0
- package/SVF-osx/include/MemoryModel/SVFVariables.h +25 -4
- package/SVF-osx/include/MemoryModel/SymbolTableInfo.h +2 -2
- package/package.json +1 -1
|
Binary file
|
|
@@ -409,7 +409,7 @@ public:
|
|
|
409
409
|
{
|
|
410
410
|
const MemObj* obj = getObject(id);
|
|
411
411
|
assert(obj && "not an object node?");
|
|
412
|
-
return SymbolTableInfo::isConstantObj(id) || obj->
|
|
412
|
+
return SymbolTableInfo::isConstantObj(id) || obj->isConstDataOrConstGlobal();
|
|
413
413
|
}
|
|
414
414
|
inline bool isNonPointerObj(NodeID id) const
|
|
415
415
|
{
|
|
@@ -285,12 +285,16 @@ public:
|
|
|
285
285
|
{
|
|
286
286
|
return node->getNodeKind() == SVFVar::ValNode ||
|
|
287
287
|
node->getNodeKind() == SVFVar::GepValNode ||
|
|
288
|
+
node->getNodeKind() == SVFVar::RetNode ||
|
|
289
|
+
node->getNodeKind() == SVFVar::VarargNode ||
|
|
288
290
|
node->getNodeKind() == SVFVar::DummyValNode;
|
|
289
291
|
}
|
|
290
292
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
291
293
|
{
|
|
292
294
|
return node->getNodeKind() == SVFVar::ValNode ||
|
|
293
295
|
node->getNodeKind() == SVFVar::GepValNode ||
|
|
296
|
+
node->getNodeKind() == SVFVar::RetNode ||
|
|
297
|
+
node->getNodeKind() == SVFVar::VarargNode ||
|
|
294
298
|
node->getNodeKind() == SVFVar::DummyValNode;
|
|
295
299
|
}
|
|
296
300
|
//@}
|
|
@@ -578,7 +582,7 @@ public:
|
|
|
578
582
|
/*
|
|
579
583
|
* Unique Return node of a procedure
|
|
580
584
|
*/
|
|
581
|
-
class RetPN: public
|
|
585
|
+
class RetPN: public ValVar
|
|
582
586
|
{
|
|
583
587
|
|
|
584
588
|
public:
|
|
@@ -592,6 +596,10 @@ public:
|
|
|
592
596
|
{
|
|
593
597
|
return node->getNodeKind() == SVFVar::RetNode;
|
|
594
598
|
}
|
|
599
|
+
static inline bool classof(const ValVar *node)
|
|
600
|
+
{
|
|
601
|
+
return node->getNodeKind() == SVFVar::RetNode;
|
|
602
|
+
}
|
|
595
603
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
596
604
|
{
|
|
597
605
|
return node->getNodeKind() == SVFVar::RetNode;
|
|
@@ -600,7 +608,7 @@ public:
|
|
|
600
608
|
|
|
601
609
|
/// Constructor
|
|
602
610
|
RetPN(const SVFFunction* val, NodeID i) :
|
|
603
|
-
|
|
611
|
+
ValVar(val->getLLVMFun(), i, RetNode)
|
|
604
612
|
{
|
|
605
613
|
}
|
|
606
614
|
|
|
@@ -617,7 +625,7 @@ public:
|
|
|
617
625
|
/*
|
|
618
626
|
* Unique vararg node of a procedure
|
|
619
627
|
*/
|
|
620
|
-
class VarArgPN: public
|
|
628
|
+
class VarArgPN: public ValVar
|
|
621
629
|
{
|
|
622
630
|
|
|
623
631
|
public:
|
|
@@ -631,6 +639,10 @@ public:
|
|
|
631
639
|
{
|
|
632
640
|
return node->getNodeKind() == SVFVar::VarargNode;
|
|
633
641
|
}
|
|
642
|
+
static inline bool classof(const ValVar *node)
|
|
643
|
+
{
|
|
644
|
+
return node->getNodeKind() == SVFVar::VarargNode;
|
|
645
|
+
}
|
|
634
646
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
635
647
|
{
|
|
636
648
|
return node->getNodeKind() == SVFVar::VarargNode;
|
|
@@ -639,7 +651,7 @@ public:
|
|
|
639
651
|
|
|
640
652
|
/// Constructor
|
|
641
653
|
VarArgPN(const SVFFunction* val, NodeID i) :
|
|
642
|
-
|
|
654
|
+
ValVar(val->getLLVMFun(), i, VarargNode)
|
|
643
655
|
{
|
|
644
656
|
}
|
|
645
657
|
|
|
@@ -672,6 +684,10 @@ public:
|
|
|
672
684
|
{
|
|
673
685
|
return node->getNodeKind() == SVFVar::DummyValNode;
|
|
674
686
|
}
|
|
687
|
+
static inline bool classof(const ValVar *node)
|
|
688
|
+
{
|
|
689
|
+
return node->getNodeKind() == SVFVar::DummyValNode;
|
|
690
|
+
}
|
|
675
691
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
676
692
|
{
|
|
677
693
|
return node->getNodeKind() == SVFVar::DummyValNode;
|
|
@@ -712,6 +728,11 @@ public:
|
|
|
712
728
|
return node->getNodeKind() == SVFVar::DummyObjNode
|
|
713
729
|
|| node->getNodeKind() == SVFVar::CloneDummyObjNode;
|
|
714
730
|
}
|
|
731
|
+
static inline bool classof(const ObjVar *node)
|
|
732
|
+
{
|
|
733
|
+
return node->getNodeKind() == SVFVar::DummyObjNode
|
|
734
|
+
|| node->getNodeKind() == SVFVar::CloneDummyObjNode;
|
|
735
|
+
}
|
|
715
736
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
716
737
|
{
|
|
717
738
|
return node->getNodeKind() == SVFVar::DummyObjNode
|
|
@@ -53,10 +53,10 @@ public:
|
|
|
53
53
|
/// Symbol types
|
|
54
54
|
enum SYMTYPE
|
|
55
55
|
{
|
|
56
|
+
NullPtr,
|
|
57
|
+
BlkPtr,
|
|
56
58
|
BlackHole,
|
|
57
59
|
ConstantObj,
|
|
58
|
-
BlkPtr,
|
|
59
|
-
NullPtr,
|
|
60
60
|
ValSymbol,
|
|
61
61
|
ObjSymbol,
|
|
62
62
|
RetSymbol,
|
|
@@ -479,9 +479,10 @@ public:
|
|
|
479
479
|
bool isArray() const;
|
|
480
480
|
bool isVarStruct() const;
|
|
481
481
|
bool isVarArray() const;
|
|
482
|
-
bool
|
|
483
|
-
bool
|
|
484
|
-
bool
|
|
482
|
+
bool isConstantStruct() const;
|
|
483
|
+
bool isConstantArray() const;
|
|
484
|
+
bool isConstDataOrConstGlobal() const;
|
|
485
|
+
bool isConstantData() const;
|
|
485
486
|
bool hasPtrObj() const;
|
|
486
487
|
bool isNonPtrFieldObj(const LocationSet& ls) const;
|
|
487
488
|
//@}
|
|
@@ -591,8 +592,9 @@ public:
|
|
|
591
592
|
VAR_ARRAY_OBJ = 0x40, // object contains array
|
|
592
593
|
CONST_STRUCT_OBJ = 0x80, // constant struct
|
|
593
594
|
CONST_ARRAY_OBJ = 0x100, // constant array
|
|
594
|
-
|
|
595
|
-
|
|
595
|
+
CONST_GLOBAL_OBJ = 0x200, // global constant object
|
|
596
|
+
CONST_DATA = 0x400, // constant object str e.g. 5, 10, 1.0
|
|
597
|
+
HASPTR_OBJ = 0x800 // the object stores a pointer address
|
|
596
598
|
} MEMTYPE;
|
|
597
599
|
|
|
598
600
|
private:
|
|
@@ -689,7 +691,7 @@ public:
|
|
|
689
691
|
{
|
|
690
692
|
return hasFlag(VAR_STRUCT_OBJ);
|
|
691
693
|
}
|
|
692
|
-
inline bool
|
|
694
|
+
inline bool isConstantStruct()
|
|
693
695
|
{
|
|
694
696
|
return hasFlag(CONST_STRUCT_OBJ);
|
|
695
697
|
}
|
|
@@ -701,7 +703,7 @@ public:
|
|
|
701
703
|
{
|
|
702
704
|
return hasFlag(VAR_ARRAY_OBJ);
|
|
703
705
|
}
|
|
704
|
-
inline bool
|
|
706
|
+
inline bool isConstantArray()
|
|
705
707
|
{
|
|
706
708
|
return hasFlag(CONST_ARRAY_OBJ);
|
|
707
709
|
}
|
|
@@ -709,9 +711,13 @@ public:
|
|
|
709
711
|
{
|
|
710
712
|
return hasFlag(VAR_ARRAY_OBJ) || hasFlag(CONST_ARRAY_OBJ);
|
|
711
713
|
}
|
|
712
|
-
inline bool
|
|
714
|
+
inline bool isConstDataOrConstGlobal()
|
|
715
|
+
{
|
|
716
|
+
return hasFlag(CONST_GLOBAL_OBJ) || hasFlag(CONST_DATA);
|
|
717
|
+
}
|
|
718
|
+
inline bool isConstantData()
|
|
713
719
|
{
|
|
714
|
-
return hasFlag(
|
|
720
|
+
return hasFlag(CONST_DATA);
|
|
715
721
|
}
|
|
716
722
|
inline bool hasPtrObj()
|
|
717
723
|
{
|
|
Binary file
|
|
Binary file
|
|
@@ -285,12 +285,16 @@ public:
|
|
|
285
285
|
{
|
|
286
286
|
return node->getNodeKind() == SVFVar::ValNode ||
|
|
287
287
|
node->getNodeKind() == SVFVar::GepValNode ||
|
|
288
|
+
node->getNodeKind() == SVFVar::RetNode ||
|
|
289
|
+
node->getNodeKind() == SVFVar::VarargNode ||
|
|
288
290
|
node->getNodeKind() == SVFVar::DummyValNode;
|
|
289
291
|
}
|
|
290
292
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
291
293
|
{
|
|
292
294
|
return node->getNodeKind() == SVFVar::ValNode ||
|
|
293
295
|
node->getNodeKind() == SVFVar::GepValNode ||
|
|
296
|
+
node->getNodeKind() == SVFVar::RetNode ||
|
|
297
|
+
node->getNodeKind() == SVFVar::VarargNode ||
|
|
294
298
|
node->getNodeKind() == SVFVar::DummyValNode;
|
|
295
299
|
}
|
|
296
300
|
//@}
|
|
@@ -578,7 +582,7 @@ public:
|
|
|
578
582
|
/*
|
|
579
583
|
* Unique Return node of a procedure
|
|
580
584
|
*/
|
|
581
|
-
class RetPN: public
|
|
585
|
+
class RetPN: public ValVar
|
|
582
586
|
{
|
|
583
587
|
|
|
584
588
|
public:
|
|
@@ -592,6 +596,10 @@ public:
|
|
|
592
596
|
{
|
|
593
597
|
return node->getNodeKind() == SVFVar::RetNode;
|
|
594
598
|
}
|
|
599
|
+
static inline bool classof(const ValVar *node)
|
|
600
|
+
{
|
|
601
|
+
return node->getNodeKind() == SVFVar::RetNode;
|
|
602
|
+
}
|
|
595
603
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
596
604
|
{
|
|
597
605
|
return node->getNodeKind() == SVFVar::RetNode;
|
|
@@ -600,7 +608,7 @@ public:
|
|
|
600
608
|
|
|
601
609
|
/// Constructor
|
|
602
610
|
RetPN(const SVFFunction* val, NodeID i) :
|
|
603
|
-
|
|
611
|
+
ValVar(val->getLLVMFun(), i, RetNode)
|
|
604
612
|
{
|
|
605
613
|
}
|
|
606
614
|
|
|
@@ -617,7 +625,7 @@ public:
|
|
|
617
625
|
/*
|
|
618
626
|
* Unique vararg node of a procedure
|
|
619
627
|
*/
|
|
620
|
-
class VarArgPN: public
|
|
628
|
+
class VarArgPN: public ValVar
|
|
621
629
|
{
|
|
622
630
|
|
|
623
631
|
public:
|
|
@@ -631,6 +639,10 @@ public:
|
|
|
631
639
|
{
|
|
632
640
|
return node->getNodeKind() == SVFVar::VarargNode;
|
|
633
641
|
}
|
|
642
|
+
static inline bool classof(const ValVar *node)
|
|
643
|
+
{
|
|
644
|
+
return node->getNodeKind() == SVFVar::VarargNode;
|
|
645
|
+
}
|
|
634
646
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
635
647
|
{
|
|
636
648
|
return node->getNodeKind() == SVFVar::VarargNode;
|
|
@@ -639,7 +651,7 @@ public:
|
|
|
639
651
|
|
|
640
652
|
/// Constructor
|
|
641
653
|
VarArgPN(const SVFFunction* val, NodeID i) :
|
|
642
|
-
|
|
654
|
+
ValVar(val->getLLVMFun(), i, VarargNode)
|
|
643
655
|
{
|
|
644
656
|
}
|
|
645
657
|
|
|
@@ -672,6 +684,10 @@ public:
|
|
|
672
684
|
{
|
|
673
685
|
return node->getNodeKind() == SVFVar::DummyValNode;
|
|
674
686
|
}
|
|
687
|
+
static inline bool classof(const ValVar *node)
|
|
688
|
+
{
|
|
689
|
+
return node->getNodeKind() == SVFVar::DummyValNode;
|
|
690
|
+
}
|
|
675
691
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
676
692
|
{
|
|
677
693
|
return node->getNodeKind() == SVFVar::DummyValNode;
|
|
@@ -712,6 +728,11 @@ public:
|
|
|
712
728
|
return node->getNodeKind() == SVFVar::DummyObjNode
|
|
713
729
|
|| node->getNodeKind() == SVFVar::CloneDummyObjNode;
|
|
714
730
|
}
|
|
731
|
+
static inline bool classof(const ObjVar *node)
|
|
732
|
+
{
|
|
733
|
+
return node->getNodeKind() == SVFVar::DummyObjNode
|
|
734
|
+
|| node->getNodeKind() == SVFVar::CloneDummyObjNode;
|
|
735
|
+
}
|
|
715
736
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
716
737
|
{
|
|
717
738
|
return node->getNodeKind() == SVFVar::DummyObjNode
|