svf-lib 1.0.2172 → 1.0.2174
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/bin/ae +0 -0
- package/SVF-linux/Release-build/bin/cfl +0 -0
- package/SVF-linux/Release-build/bin/dvf +0 -0
- package/SVF-linux/Release-build/bin/llvm2svf +0 -0
- package/SVF-linux/Release-build/bin/mta +0 -0
- package/SVF-linux/Release-build/bin/saber +0 -0
- package/SVF-linux/Release-build/bin/svf-ex +0 -0
- package/SVF-linux/Release-build/bin/wpa +0 -0
- package/SVF-linux/Release-build/include/Graphs/GenericGraph.h +45 -17
- package/SVF-linux/Release-build/include/SVF-LLVM/LLVMModule.h +4 -4
- package/SVF-linux/Release-build/include/SVF-LLVM/SVFIRBuilder.h +3 -1
- package/SVF-linux/Release-build/include/SVFIR/SVFIR.h +93 -0
- package/SVF-linux/Release-build/include/SVFIR/SVFVariables.h +579 -2
- package/SVF-linux/Release-build/lib/libSvfCore.a +0 -0
- package/SVF-linux/Release-build/lib/libSvfLLVM.a +0 -0
- package/SVF-osx/Release-build/bin/ae +0 -0
- package/SVF-osx/Release-build/bin/cfl +0 -0
- package/SVF-osx/Release-build/bin/dvf +0 -0
- package/SVF-osx/Release-build/bin/llvm2svf +0 -0
- package/SVF-osx/Release-build/bin/mta +0 -0
- package/SVF-osx/Release-build/bin/saber +0 -0
- package/SVF-osx/Release-build/bin/svf-ex +0 -0
- package/SVF-osx/Release-build/bin/wpa +0 -0
- package/SVF-osx/Release-build/include/Graphs/GenericGraph.h +45 -17
- package/SVF-osx/Release-build/include/SVF-LLVM/LLVMModule.h +4 -4
- package/SVF-osx/Release-build/include/SVF-LLVM/SVFIRBuilder.h +3 -1
- package/SVF-osx/Release-build/include/SVFIR/SVFIR.h +93 -0
- package/SVF-osx/Release-build/include/SVFIR/SVFVariables.h +579 -2
- package/SVF-osx/Release-build/lib/libSvfCore.a +0 -0
- package/SVF-osx/Release-build/lib/libSvfLLVM.a +0 -0
- package/package.json +1 -1
|
@@ -400,6 +400,7 @@ class GepValVar: public ValVar
|
|
|
400
400
|
|
|
401
401
|
private:
|
|
402
402
|
AccessPath ap; // AccessPath
|
|
403
|
+
NodeID base; // base node id
|
|
403
404
|
const SVFType* gepValType;
|
|
404
405
|
|
|
405
406
|
/// Constructor to create empty GeValVar (for SVFIRReader/deserialization)
|
|
@@ -427,9 +428,9 @@ public:
|
|
|
427
428
|
//@}
|
|
428
429
|
|
|
429
430
|
/// Constructor
|
|
430
|
-
GepValVar(const SVFValue* val, NodeID i, const AccessPath& ap,
|
|
431
|
+
GepValVar(NodeID baseID, const SVFValue* val, NodeID i, const AccessPath& ap,
|
|
431
432
|
const SVFType* ty)
|
|
432
|
-
: ValVar(val, i, GepValNode), ap(ap), gepValType(ty)
|
|
433
|
+
: ValVar(val, i, GepValNode), ap(ap), base(baseID), gepValType(ty)
|
|
433
434
|
{
|
|
434
435
|
}
|
|
435
436
|
|
|
@@ -439,6 +440,12 @@ public:
|
|
|
439
440
|
return ap.getConstantStructFldIdx();
|
|
440
441
|
}
|
|
441
442
|
|
|
443
|
+
/// Return the base object from which this GEP node came from.
|
|
444
|
+
inline NodeID getBaseNode(void) const
|
|
445
|
+
{
|
|
446
|
+
return base;
|
|
447
|
+
}
|
|
448
|
+
|
|
442
449
|
/// Return name of a LLVM value
|
|
443
450
|
inline const std::string getValueName() const
|
|
444
451
|
{
|
|
@@ -820,6 +827,572 @@ public:
|
|
|
820
827
|
virtual const std::string toString() const;
|
|
821
828
|
};
|
|
822
829
|
|
|
830
|
+
class GlobalValVar : public ValVar
|
|
831
|
+
{
|
|
832
|
+
friend class SVFIRWriter;
|
|
833
|
+
friend class SVFIRReader;
|
|
834
|
+
|
|
835
|
+
public:
|
|
836
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
837
|
+
//@{
|
|
838
|
+
static inline bool classof(const GlobalValVar*)
|
|
839
|
+
{
|
|
840
|
+
return true;
|
|
841
|
+
}
|
|
842
|
+
static inline bool classof(const ValVar* node)
|
|
843
|
+
{
|
|
844
|
+
return node->getNodeKind() == GlobalValNode;
|
|
845
|
+
}
|
|
846
|
+
static inline bool classof(const SVFVar* node)
|
|
847
|
+
{
|
|
848
|
+
return node->getNodeKind() == GlobalValNode;
|
|
849
|
+
}
|
|
850
|
+
static inline bool classof(const GenericPAGNodeTy* node)
|
|
851
|
+
{
|
|
852
|
+
return node->getNodeKind() == GlobalValNode;
|
|
853
|
+
}
|
|
854
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
855
|
+
{
|
|
856
|
+
return node->getNodeKind() == GlobalValNode;
|
|
857
|
+
}
|
|
858
|
+
//@}
|
|
859
|
+
|
|
860
|
+
/// Constructor
|
|
861
|
+
GlobalValVar(const SVFValue* val, NodeID i, const ICFGNode* icn,
|
|
862
|
+
PNODEK ty = GlobalValNode)
|
|
863
|
+
: ValVar(val, i, ty, icn)
|
|
864
|
+
{
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
virtual const std::string toString() const;
|
|
868
|
+
};
|
|
869
|
+
|
|
870
|
+
class ConstantDataValVar: public ValVar
|
|
871
|
+
{
|
|
872
|
+
friend class SVFIRWriter;
|
|
873
|
+
friend class SVFIRReader;
|
|
874
|
+
|
|
875
|
+
public:
|
|
876
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
877
|
+
//@{
|
|
878
|
+
static inline bool classof(const ConstantDataValVar*)
|
|
879
|
+
{
|
|
880
|
+
return true;
|
|
881
|
+
}
|
|
882
|
+
static inline bool classof(const ValVar* node)
|
|
883
|
+
{
|
|
884
|
+
return isConstantDataValVar(node->getNodeKind());
|
|
885
|
+
}
|
|
886
|
+
static inline bool classof(const SVFVar* node)
|
|
887
|
+
{
|
|
888
|
+
return isConstantDataValVar(node->getNodeKind());
|
|
889
|
+
}
|
|
890
|
+
static inline bool classof(const GenericPAGNodeTy* node)
|
|
891
|
+
{
|
|
892
|
+
return isConstantDataValVar(node->getNodeKind());
|
|
893
|
+
}
|
|
894
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
895
|
+
{
|
|
896
|
+
return isConstantDataValVar(node->getNodeKind());
|
|
897
|
+
}
|
|
898
|
+
//@}
|
|
899
|
+
|
|
900
|
+
/// Constructor
|
|
901
|
+
ConstantDataValVar(const SVFValue* val, NodeID i, const ICFGNode* icn,
|
|
902
|
+
PNODEK ty = ConstantDataValNode)
|
|
903
|
+
: ValVar(val, i, ty, icn)
|
|
904
|
+
{
|
|
905
|
+
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
virtual const std::string toString() const;
|
|
909
|
+
};
|
|
910
|
+
|
|
911
|
+
class BlackHoleVar: public ConstantDataValVar
|
|
912
|
+
{
|
|
913
|
+
friend class SVFIRWriter;
|
|
914
|
+
friend class SVFIRReader;
|
|
915
|
+
|
|
916
|
+
public:
|
|
917
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
918
|
+
//@{
|
|
919
|
+
static inline bool classof(const BlackHoleVar*)
|
|
920
|
+
{
|
|
921
|
+
return true;
|
|
922
|
+
}
|
|
923
|
+
static inline bool classof(const ConstantDataValVar* node)
|
|
924
|
+
{
|
|
925
|
+
return node->getNodeKind() == BlackHoleNode;
|
|
926
|
+
}
|
|
927
|
+
static inline bool classof(const ValVar* node)
|
|
928
|
+
{
|
|
929
|
+
return node->getNodeKind() == BlackHoleNode;
|
|
930
|
+
}
|
|
931
|
+
static inline bool classof(const SVFVar* node)
|
|
932
|
+
{
|
|
933
|
+
return node->getNodeKind() == BlackHoleNode;
|
|
934
|
+
}
|
|
935
|
+
static inline bool classof(const GenericPAGNodeTy* node)
|
|
936
|
+
{
|
|
937
|
+
return node->getNodeKind() == BlackHoleNode;
|
|
938
|
+
}
|
|
939
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
940
|
+
{
|
|
941
|
+
return node->getNodeKind() == BlackHoleNode;
|
|
942
|
+
}
|
|
943
|
+
//@}
|
|
944
|
+
|
|
945
|
+
/// Constructor
|
|
946
|
+
BlackHoleVar(NodeID i, PNODEK ty = BlackHoleNode)
|
|
947
|
+
: ConstantDataValVar(nullptr, i, nullptr, ty)
|
|
948
|
+
{
|
|
949
|
+
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
virtual const std::string toString() const
|
|
953
|
+
{
|
|
954
|
+
return "BlackHoleVar";
|
|
955
|
+
}
|
|
956
|
+
};
|
|
957
|
+
|
|
958
|
+
class ConstantFPValVar: public ConstantDataValVar
|
|
959
|
+
{
|
|
960
|
+
friend class SVFIRWriter;
|
|
961
|
+
friend class SVFIRReader;
|
|
962
|
+
private:
|
|
963
|
+
double dval;
|
|
964
|
+
|
|
965
|
+
public:
|
|
966
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
967
|
+
//@{
|
|
968
|
+
static inline bool classof(const ConstantFPValVar*)
|
|
969
|
+
{
|
|
970
|
+
return true;
|
|
971
|
+
}
|
|
972
|
+
static inline bool classof(const ConstantDataValVar* node)
|
|
973
|
+
{
|
|
974
|
+
return node->getNodeKind() == ConstantFPValNode;
|
|
975
|
+
}
|
|
976
|
+
static inline bool classof(const ValVar* node)
|
|
977
|
+
{
|
|
978
|
+
return node->getNodeKind() == ConstantFPValNode;
|
|
979
|
+
}
|
|
980
|
+
static inline bool classof(const SVFVar* node)
|
|
981
|
+
{
|
|
982
|
+
return node->getNodeKind() == ConstantFPValNode;
|
|
983
|
+
}
|
|
984
|
+
static inline bool classof(const GenericPAGNodeTy* node)
|
|
985
|
+
{
|
|
986
|
+
return node->getNodeKind() == ConstantFPValNode;
|
|
987
|
+
}
|
|
988
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
989
|
+
{
|
|
990
|
+
return node->getNodeKind() == ConstantFPValNode;
|
|
991
|
+
}
|
|
992
|
+
//@}
|
|
993
|
+
|
|
994
|
+
inline double getFPValue() const
|
|
995
|
+
{
|
|
996
|
+
return dval;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
/// Constructor
|
|
1000
|
+
ConstantFPValVar(const SVFValue* val, double dv, NodeID i, const ICFGNode* icn,
|
|
1001
|
+
PNODEK ty = ConstantFPValNode)
|
|
1002
|
+
: ConstantDataValVar(val, i, icn, ty), dval(dv)
|
|
1003
|
+
{
|
|
1004
|
+
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
virtual const std::string toString() const;
|
|
1008
|
+
};
|
|
1009
|
+
|
|
1010
|
+
class ConstantIntValVar: public ConstantDataValVar
|
|
1011
|
+
{
|
|
1012
|
+
friend class SVFIRWriter;
|
|
1013
|
+
friend class SVFIRReader;
|
|
1014
|
+
private:
|
|
1015
|
+
u64_t zval;
|
|
1016
|
+
s64_t sval;
|
|
1017
|
+
|
|
1018
|
+
public:
|
|
1019
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
1020
|
+
//@{
|
|
1021
|
+
static inline bool classof(const ConstantIntValVar*)
|
|
1022
|
+
{
|
|
1023
|
+
return true;
|
|
1024
|
+
}
|
|
1025
|
+
static inline bool classof(const ConstantDataValVar* node)
|
|
1026
|
+
{
|
|
1027
|
+
return node->getNodeKind() == ConstantIntValNode;
|
|
1028
|
+
}
|
|
1029
|
+
static inline bool classof(const ValVar* node)
|
|
1030
|
+
{
|
|
1031
|
+
return node->getNodeKind() == ConstantIntValNode;
|
|
1032
|
+
}
|
|
1033
|
+
static inline bool classof(const SVFVar* node)
|
|
1034
|
+
{
|
|
1035
|
+
return node->getNodeKind() == ConstantIntValNode;
|
|
1036
|
+
}
|
|
1037
|
+
static inline bool classof(const GenericPAGNodeTy* node)
|
|
1038
|
+
{
|
|
1039
|
+
return node->getNodeKind() == ConstantIntValNode;
|
|
1040
|
+
}
|
|
1041
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
1042
|
+
{
|
|
1043
|
+
return node->getNodeKind() == ConstantIntValNode;
|
|
1044
|
+
}
|
|
1045
|
+
//@}
|
|
1046
|
+
|
|
1047
|
+
s64_t getSExtValue() const
|
|
1048
|
+
{
|
|
1049
|
+
return sval;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
u64_t getZExtValue() const
|
|
1054
|
+
{
|
|
1055
|
+
return zval;
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
/// Constructor
|
|
1059
|
+
ConstantIntValVar(const SVFValue* val, s64_t sv, u64_t zv, NodeID i, const ICFGNode* icn,
|
|
1060
|
+
PNODEK ty = ConstantIntValNode)
|
|
1061
|
+
: ConstantDataValVar(val, i, icn, ty), zval(zv), sval(sv)
|
|
1062
|
+
{
|
|
1063
|
+
|
|
1064
|
+
}
|
|
1065
|
+
virtual const std::string toString() const;
|
|
1066
|
+
};
|
|
1067
|
+
|
|
1068
|
+
class ConstantNullPtrValVar: public ConstantDataValVar
|
|
1069
|
+
{
|
|
1070
|
+
friend class SVFIRWriter;
|
|
1071
|
+
friend class SVFIRReader;
|
|
1072
|
+
|
|
1073
|
+
public:
|
|
1074
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
1075
|
+
//@{
|
|
1076
|
+
static inline bool classof(const ConstantNullPtrValVar*)
|
|
1077
|
+
{
|
|
1078
|
+
return true;
|
|
1079
|
+
}
|
|
1080
|
+
static inline bool classof(const ConstantDataValVar* node)
|
|
1081
|
+
{
|
|
1082
|
+
return node->getNodeKind() == ConstantNullptrValNode;
|
|
1083
|
+
}
|
|
1084
|
+
static inline bool classof(const ValVar* node)
|
|
1085
|
+
{
|
|
1086
|
+
return node->getNodeKind() == ConstantNullptrValNode;
|
|
1087
|
+
}
|
|
1088
|
+
static inline bool classof(const SVFVar* node)
|
|
1089
|
+
{
|
|
1090
|
+
return node->getNodeKind() == ConstantNullptrValNode;
|
|
1091
|
+
}
|
|
1092
|
+
static inline bool classof(const GenericPAGNodeTy* node)
|
|
1093
|
+
{
|
|
1094
|
+
return node->getNodeKind() == ConstantNullptrValNode;
|
|
1095
|
+
}
|
|
1096
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
1097
|
+
{
|
|
1098
|
+
return node->getNodeKind() == ConstantNullptrValNode;
|
|
1099
|
+
}
|
|
1100
|
+
//@}
|
|
1101
|
+
|
|
1102
|
+
/// Constructor
|
|
1103
|
+
ConstantNullPtrValVar(const SVFValue* val, NodeID i, const ICFGNode* icn,
|
|
1104
|
+
PNODEK ty = ConstantNullptrValNode)
|
|
1105
|
+
: ConstantDataValVar(val, i, icn, ty)
|
|
1106
|
+
{
|
|
1107
|
+
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
virtual const std::string toString() const;
|
|
1111
|
+
};
|
|
1112
|
+
|
|
1113
|
+
class GlobalObjVar : public BaseObjVar
|
|
1114
|
+
{
|
|
1115
|
+
friend class SVFIRWriter;
|
|
1116
|
+
friend class SVFIRReader;
|
|
1117
|
+
|
|
1118
|
+
private:
|
|
1119
|
+
/// Constructor to create empty ObjVar (for SVFIRReader/deserialization)
|
|
1120
|
+
GlobalObjVar(NodeID i, PNODEK ty = GlobalObjNode) : BaseObjVar(i, ty) {}
|
|
1121
|
+
|
|
1122
|
+
public:
|
|
1123
|
+
/// Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
1124
|
+
//@{
|
|
1125
|
+
static inline bool classof(const GlobalObjVar*)
|
|
1126
|
+
{
|
|
1127
|
+
return true;
|
|
1128
|
+
}
|
|
1129
|
+
static inline bool classof(const BaseObjVar* node)
|
|
1130
|
+
{
|
|
1131
|
+
return node->getNodeKind() == GlobalObjNode;
|
|
1132
|
+
}
|
|
1133
|
+
static inline bool classof(const ObjVar* node)
|
|
1134
|
+
{
|
|
1135
|
+
return node->getNodeKind() == GlobalObjNode;
|
|
1136
|
+
}
|
|
1137
|
+
static inline bool classof(const SVFVar* node)
|
|
1138
|
+
{
|
|
1139
|
+
return node->getNodeKind() == GlobalObjNode;
|
|
1140
|
+
}
|
|
1141
|
+
static inline bool classof(const GenericPAGNodeTy* node)
|
|
1142
|
+
{
|
|
1143
|
+
return node->getNodeKind() == GlobalObjNode;
|
|
1144
|
+
}
|
|
1145
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
1146
|
+
{
|
|
1147
|
+
return node->getNodeKind() == GlobalObjNode;
|
|
1148
|
+
}
|
|
1149
|
+
//@}
|
|
1150
|
+
|
|
1151
|
+
/// Constructor
|
|
1152
|
+
GlobalObjVar(const SVFValue* val, NodeID i, const MemObj* mem,
|
|
1153
|
+
PNODEK ty = GlobalObjNode): BaseObjVar(val, i,mem,ty)
|
|
1154
|
+
{
|
|
1155
|
+
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
virtual const std::string toString() const;
|
|
1160
|
+
};
|
|
1161
|
+
|
|
1162
|
+
class ConstantDataObjVar: public BaseObjVar
|
|
1163
|
+
{
|
|
1164
|
+
friend class SVFIRWriter;
|
|
1165
|
+
friend class SVFIRReader;
|
|
1166
|
+
|
|
1167
|
+
protected:
|
|
1168
|
+
/// Constructor to create empty DummyObjVar (for SVFIRReader/deserialization)
|
|
1169
|
+
ConstantDataObjVar(NodeID i) : BaseObjVar(i, ConstantDataObjNode) {}
|
|
1170
|
+
|
|
1171
|
+
public:
|
|
1172
|
+
//@{ Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
1173
|
+
static inline bool classof(const ConstantDataObjVar*)
|
|
1174
|
+
{
|
|
1175
|
+
return true;
|
|
1176
|
+
}
|
|
1177
|
+
static inline bool classof(const BaseObjVar* node)
|
|
1178
|
+
{
|
|
1179
|
+
return isConstantDataObjVarKinds(node->getNodeKind());
|
|
1180
|
+
}
|
|
1181
|
+
static inline bool classof(const SVFVar* node)
|
|
1182
|
+
{
|
|
1183
|
+
return isConstantDataObjVarKinds(node->getNodeKind());
|
|
1184
|
+
}
|
|
1185
|
+
static inline bool classof(const ObjVar* node)
|
|
1186
|
+
{
|
|
1187
|
+
return isConstantDataObjVarKinds(node->getNodeKind());
|
|
1188
|
+
}
|
|
1189
|
+
static inline bool classof(const GenericPAGNodeTy* node)
|
|
1190
|
+
{
|
|
1191
|
+
return isConstantDataObjVarKinds(node->getNodeKind());
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
1195
|
+
{
|
|
1196
|
+
return isConstantDataObjVarKinds(node->getNodeKind());
|
|
1197
|
+
}
|
|
1198
|
+
//@}
|
|
1199
|
+
|
|
1200
|
+
/// Constructor
|
|
1201
|
+
ConstantDataObjVar(const SVFValue* val, NodeID i, const MemObj* m, PNODEK ty = ConstantDataObjNode)
|
|
1202
|
+
: BaseObjVar(val, i, m, ty)
|
|
1203
|
+
{
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
virtual const std::string toString() const;
|
|
1207
|
+
};
|
|
1208
|
+
|
|
1209
|
+
class ConstantFPObjVar: public ConstantDataObjVar
|
|
1210
|
+
{
|
|
1211
|
+
friend class SVFIRWriter;
|
|
1212
|
+
friend class SVFIRReader;
|
|
1213
|
+
|
|
1214
|
+
private:
|
|
1215
|
+
/// Constructor to create empty DummyObjVar (for SVFIRReader/deserialization)
|
|
1216
|
+
ConstantFPObjVar(NodeID i) : ConstantDataObjVar(i) {}
|
|
1217
|
+
|
|
1218
|
+
private:
|
|
1219
|
+
float dval;
|
|
1220
|
+
|
|
1221
|
+
public:
|
|
1222
|
+
//@{ Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
1223
|
+
static inline bool classof(const ConstantFPObjVar*)
|
|
1224
|
+
{
|
|
1225
|
+
return true;
|
|
1226
|
+
}
|
|
1227
|
+
static inline bool classof(const ConstantDataObjVar* node)
|
|
1228
|
+
{
|
|
1229
|
+
return node->getNodeKind() == SVFVar::ConstantFPObjNode;
|
|
1230
|
+
}
|
|
1231
|
+
static inline bool classof(const BaseObjVar* node)
|
|
1232
|
+
{
|
|
1233
|
+
return node->getNodeKind() == SVFVar::ConstantFPObjNode;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
static inline bool classof(const SVFVar* node)
|
|
1237
|
+
{
|
|
1238
|
+
return node->getNodeKind() == SVFVar::ConstantFPObjNode;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
static inline bool classof(const ObjVar* node)
|
|
1242
|
+
{
|
|
1243
|
+
return node->getNodeKind() == SVFVar::ConstantFPObjNode;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
static inline bool classof(const GenericPAGNodeTy* node)
|
|
1247
|
+
{
|
|
1248
|
+
return node->getNodeKind() == SVFVar::ConstantFPObjNode;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
1252
|
+
{
|
|
1253
|
+
return node->getNodeKind() == SVFVar::ConstantFPObjNode;
|
|
1254
|
+
}
|
|
1255
|
+
//@}
|
|
1256
|
+
|
|
1257
|
+
/// Constructor
|
|
1258
|
+
ConstantFPObjVar(const SVFValue* val, double dv, NodeID i, const MemObj* m, PNODEK ty = ConstantFPObjNode)
|
|
1259
|
+
: ConstantDataObjVar(val, i, m, ty), dval(dv)
|
|
1260
|
+
{
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
inline double getFPValue() const
|
|
1264
|
+
{
|
|
1265
|
+
return dval;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
|
|
1269
|
+
virtual const std::string toString() const;
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1272
|
+
class ConstantIntObjVar: public ConstantDataObjVar
|
|
1273
|
+
{
|
|
1274
|
+
friend class SVFIRWriter;
|
|
1275
|
+
friend class SVFIRReader;
|
|
1276
|
+
|
|
1277
|
+
private:
|
|
1278
|
+
/// Constructor to create empty DummyObjVar (for SVFIRReader/deserialization)
|
|
1279
|
+
ConstantIntObjVar(NodeID i) : ConstantDataObjVar(i) {}
|
|
1280
|
+
|
|
1281
|
+
private:
|
|
1282
|
+
u64_t zval;
|
|
1283
|
+
s64_t sval;
|
|
1284
|
+
|
|
1285
|
+
public:
|
|
1286
|
+
//@{ Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
1287
|
+
static inline bool classof(const ConstantIntObjVar*)
|
|
1288
|
+
{
|
|
1289
|
+
return true;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1292
|
+
static inline bool classof(const ConstantDataObjVar* node)
|
|
1293
|
+
{
|
|
1294
|
+
return node->getNodeKind() == SVFVar::ConstantIntObjNode;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
static inline bool classof(const BaseObjVar* node)
|
|
1298
|
+
{
|
|
1299
|
+
return node->getNodeKind() == SVFVar::ConstantIntObjNode;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
static inline bool classof(const SVFVar* node)
|
|
1303
|
+
{
|
|
1304
|
+
return node->getNodeKind() == SVFVar::ConstantIntObjNode;
|
|
1305
|
+
}
|
|
1306
|
+
static inline bool classof(const ObjVar* node)
|
|
1307
|
+
{
|
|
1308
|
+
return node->getNodeKind() == SVFVar::ConstantIntObjNode;
|
|
1309
|
+
}
|
|
1310
|
+
static inline bool classof(const GenericPAGNodeTy* node)
|
|
1311
|
+
{
|
|
1312
|
+
return node->getNodeKind() == SVFVar::ConstantIntObjNode;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
1316
|
+
{
|
|
1317
|
+
return node->getNodeKind() == SVFVar::ConstantIntObjNode;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
s64_t getSExtValue() const
|
|
1321
|
+
{
|
|
1322
|
+
return sval;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
|
|
1326
|
+
u64_t getZExtValue() const
|
|
1327
|
+
{
|
|
1328
|
+
return zval;
|
|
1329
|
+
}
|
|
1330
|
+
//@}
|
|
1331
|
+
|
|
1332
|
+
/// Constructor
|
|
1333
|
+
ConstantIntObjVar(const SVFValue* val, s64_t sv, u64_t zv, NodeID i, const MemObj* m, PNODEK ty = ConstantIntObjNode)
|
|
1334
|
+
: ConstantDataObjVar(val, i, m, ty), zval(zv), sval(sv)
|
|
1335
|
+
{
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
|
|
1339
|
+
virtual const std::string toString() const;
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
class ConstantNullPtrObjVar: public ConstantDataObjVar
|
|
1343
|
+
{
|
|
1344
|
+
friend class SVFIRWriter;
|
|
1345
|
+
friend class SVFIRReader;
|
|
1346
|
+
|
|
1347
|
+
private:
|
|
1348
|
+
/// Constructor to create empty DummyObjVar (for SVFIRReader/deserialization)
|
|
1349
|
+
ConstantNullPtrObjVar(NodeID i) : ConstantDataObjVar(i) {}
|
|
1350
|
+
|
|
1351
|
+
public:
|
|
1352
|
+
//@{ Methods for support type inquiry through isa, cast, and dyn_cast:
|
|
1353
|
+
static inline bool classof(const ConstantNullPtrObjVar*)
|
|
1354
|
+
{
|
|
1355
|
+
return true;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
static inline bool classof(const ConstantDataObjVar* node)
|
|
1359
|
+
{
|
|
1360
|
+
return node->getNodeKind() == SVFVar::ConstantNullptrObjNode;
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
static inline bool classof(const BaseObjVar* node)
|
|
1364
|
+
{
|
|
1365
|
+
return node->getNodeKind() == SVFVar::ConstantNullptrObjNode;
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
static inline bool classof(const SVFVar* node)
|
|
1369
|
+
{
|
|
1370
|
+
return node->getNodeKind() == SVFVar::ConstantNullptrObjNode;
|
|
1371
|
+
}
|
|
1372
|
+
static inline bool classof(const ObjVar* node)
|
|
1373
|
+
{
|
|
1374
|
+
return node->getNodeKind() == SVFVar::ConstantNullptrObjNode;
|
|
1375
|
+
}
|
|
1376
|
+
static inline bool classof(const GenericPAGNodeTy* node)
|
|
1377
|
+
{
|
|
1378
|
+
return node->getNodeKind() == SVFVar::ConstantNullptrObjNode;
|
|
1379
|
+
}
|
|
1380
|
+
|
|
1381
|
+
static inline bool classof(const SVFBaseNode* node)
|
|
1382
|
+
{
|
|
1383
|
+
return node->getNodeKind() == SVFVar::ConstantNullptrObjNode;
|
|
1384
|
+
}
|
|
1385
|
+
//@}
|
|
1386
|
+
|
|
1387
|
+
/// Constructor
|
|
1388
|
+
ConstantNullPtrObjVar(const SVFValue* val, NodeID i, const MemObj* m, PNODEK ty = ConstantNullptrObjNode)
|
|
1389
|
+
: ConstantDataObjVar(val, i, m, ty)
|
|
1390
|
+
{
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
|
|
1394
|
+
virtual const std::string toString() const;
|
|
1395
|
+
};
|
|
823
1396
|
/*
|
|
824
1397
|
* Unique Return node of a procedure
|
|
825
1398
|
*/
|
|
@@ -986,6 +1559,10 @@ public:
|
|
|
986
1559
|
{
|
|
987
1560
|
return true;
|
|
988
1561
|
}
|
|
1562
|
+
static inline bool classof(const BaseObjVar* node)
|
|
1563
|
+
{
|
|
1564
|
+
return node->getNodeKind() == SVFVar::DummyObjNode;
|
|
1565
|
+
}
|
|
989
1566
|
static inline bool classof(const SVFVar* node)
|
|
990
1567
|
{
|
|
991
1568
|
return node->getNodeKind() == SVFVar::DummyObjNode;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|