svf-lib 1.0.1062 → 1.0.1063
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/PointerAnalysis.h +0 -1
- package/SVF-linux/include/MemoryModel/SVFVariables.h +11 -140
- package/SVF-linux/include/SVF-FE/LLVMModule.h +0 -24
- package/SVF-linux/include/Util/Options.h +0 -7
- package/SVF-linux/include/WPA/FlowSensitive.h +0 -4
- package/package.json +1 -1
|
Binary file
|
|
@@ -76,7 +76,6 @@ public:
|
|
|
76
76
|
CSSummary_WPA, ///< Summary based context sensitive WPA
|
|
77
77
|
FSDATAFLOW_WPA, ///< Traditional Dataflow-based flow sensitive WPA
|
|
78
78
|
FSSPARSE_WPA, ///< Sparse flow sensitive WPA
|
|
79
|
-
FSTBHC_WPA, ///< Sparse flow-sensitive type-based heap cloning WPA
|
|
80
79
|
VFS_WPA, ///< Versioned sparse flow-sensitive WPA
|
|
81
80
|
FSCS_WPA, ///< Flow-, context- sensitive WPA
|
|
82
81
|
CFLFICI_WPA, ///< Flow-, context-, insensitive CFL-reachability-based analysis
|
|
@@ -58,7 +58,6 @@ public:
|
|
|
58
58
|
/// GepValNode: tempory gep obj node for field sensitivity
|
|
59
59
|
/// FIObjNode: for field insensitive analysis
|
|
60
60
|
/// DummyValNode and DummyObjNode: for non-llvm-value node
|
|
61
|
-
/// Clone*Node: objects created by TBHC.
|
|
62
61
|
enum PNODEK
|
|
63
62
|
{
|
|
64
63
|
ValNode,
|
|
@@ -70,9 +69,6 @@ public:
|
|
|
70
69
|
FIObjNode,
|
|
71
70
|
DummyValNode,
|
|
72
71
|
DummyObjNode,
|
|
73
|
-
CloneGepObjNode, // NOTE: only used for TBHC.
|
|
74
|
-
CloneFIObjNode, // NOTE: only used for TBHC.
|
|
75
|
-
CloneDummyObjNode // NOTE: only used for TBHC.
|
|
76
72
|
};
|
|
77
73
|
|
|
78
74
|
|
|
@@ -327,20 +323,14 @@ public:
|
|
|
327
323
|
return node->getNodeKind() == SVFVar::ObjNode ||
|
|
328
324
|
node->getNodeKind() == SVFVar::GepObjNode ||
|
|
329
325
|
node->getNodeKind() == SVFVar::FIObjNode ||
|
|
330
|
-
node->getNodeKind() == SVFVar::DummyObjNode
|
|
331
|
-
node->getNodeKind() == SVFVar::CloneGepObjNode ||
|
|
332
|
-
node->getNodeKind() == SVFVar::CloneFIObjNode ||
|
|
333
|
-
node->getNodeKind() == SVFVar::CloneDummyObjNode;
|
|
326
|
+
node->getNodeKind() == SVFVar::DummyObjNode;
|
|
334
327
|
}
|
|
335
328
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
336
329
|
{
|
|
337
330
|
return node->getNodeKind() == SVFVar::ObjNode ||
|
|
338
331
|
node->getNodeKind() == SVFVar::GepObjNode ||
|
|
339
332
|
node->getNodeKind() == SVFVar::FIObjNode ||
|
|
340
|
-
node->getNodeKind() == SVFVar::DummyObjNode
|
|
341
|
-
node->getNodeKind() == SVFVar::CloneGepObjNode ||
|
|
342
|
-
node->getNodeKind() == SVFVar::CloneFIObjNode ||
|
|
343
|
-
node->getNodeKind() == SVFVar::CloneDummyObjNode;
|
|
333
|
+
node->getNodeKind() == SVFVar::DummyObjNode;
|
|
344
334
|
}
|
|
345
335
|
//@}
|
|
346
336
|
|
|
@@ -448,18 +438,15 @@ public:
|
|
|
448
438
|
}
|
|
449
439
|
static inline bool classof(const ObjVar * node)
|
|
450
440
|
{
|
|
451
|
-
return node->getNodeKind() == SVFVar::GepObjNode
|
|
452
|
-
|| node->getNodeKind() == SVFVar::CloneGepObjNode;
|
|
441
|
+
return node->getNodeKind() == SVFVar::GepObjNode;
|
|
453
442
|
}
|
|
454
443
|
static inline bool classof(const SVFVar *node)
|
|
455
444
|
{
|
|
456
|
-
return node->getNodeKind() == SVFVar::GepObjNode
|
|
457
|
-
|| node->getNodeKind() == SVFVar::CloneGepObjNode;
|
|
445
|
+
return node->getNodeKind() == SVFVar::GepObjNode;
|
|
458
446
|
}
|
|
459
447
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
460
448
|
{
|
|
461
|
-
return node->getNodeKind() == SVFVar::GepObjNode
|
|
462
|
-
|| node->getNodeKind() == SVFVar::CloneGepObjNode;
|
|
449
|
+
return node->getNodeKind() == SVFVar::GepObjNode;
|
|
463
450
|
}
|
|
464
451
|
//@}
|
|
465
452
|
|
|
@@ -527,18 +514,15 @@ public:
|
|
|
527
514
|
}
|
|
528
515
|
static inline bool classof(const ObjVar * node)
|
|
529
516
|
{
|
|
530
|
-
return node->getNodeKind() == SVFVar::FIObjNode
|
|
531
|
-
|| node->getNodeKind() == SVFVar::CloneFIObjNode;
|
|
517
|
+
return node->getNodeKind() == SVFVar::FIObjNode;
|
|
532
518
|
}
|
|
533
519
|
static inline bool classof(const SVFVar *node)
|
|
534
520
|
{
|
|
535
|
-
return node->getNodeKind() == SVFVar::FIObjNode
|
|
536
|
-
|| node->getNodeKind() == SVFVar::CloneFIObjNode;
|
|
521
|
+
return node->getNodeKind() == SVFVar::FIObjNode;
|
|
537
522
|
}
|
|
538
523
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
539
524
|
{
|
|
540
|
-
return node->getNodeKind() == SVFVar::FIObjNode
|
|
541
|
-
|| node->getNodeKind() == SVFVar::CloneFIObjNode;
|
|
525
|
+
return node->getNodeKind() == SVFVar::FIObjNode;
|
|
542
526
|
}
|
|
543
527
|
//@}
|
|
544
528
|
|
|
@@ -705,18 +689,15 @@ public:
|
|
|
705
689
|
}
|
|
706
690
|
static inline bool classof(const SVFVar *node)
|
|
707
691
|
{
|
|
708
|
-
return node->getNodeKind() == SVFVar::DummyObjNode
|
|
709
|
-
|| node->getNodeKind() == SVFVar::CloneDummyObjNode;
|
|
692
|
+
return node->getNodeKind() == SVFVar::DummyObjNode;
|
|
710
693
|
}
|
|
711
694
|
static inline bool classof(const ObjVar *node)
|
|
712
695
|
{
|
|
713
|
-
return node->getNodeKind() == SVFVar::DummyObjNode
|
|
714
|
-
|| node->getNodeKind() == SVFVar::CloneDummyObjNode;
|
|
696
|
+
return node->getNodeKind() == SVFVar::DummyObjNode;
|
|
715
697
|
}
|
|
716
698
|
static inline bool classof(const GenericPAGNodeTy *node)
|
|
717
699
|
{
|
|
718
|
-
return node->getNodeKind() == SVFVar::DummyObjNode
|
|
719
|
-
|| node->getNodeKind() == SVFVar::CloneDummyObjNode;
|
|
700
|
+
return node->getNodeKind() == SVFVar::DummyObjNode;
|
|
720
701
|
}
|
|
721
702
|
//@}
|
|
722
703
|
|
|
@@ -735,116 +716,6 @@ public:
|
|
|
735
716
|
virtual const std::string toString() const;
|
|
736
717
|
};
|
|
737
718
|
|
|
738
|
-
/*
|
|
739
|
-
* Clone object node for dummy objects.
|
|
740
|
-
*/
|
|
741
|
-
class CloneDummyObjVar: public DummyObjVar
|
|
742
|
-
{
|
|
743
|
-
public:
|
|
744
|
-
//@{ Methods to support type inquiry through isa, cast, and dyn_cast:
|
|
745
|
-
static inline bool classof(const CloneDummyObjVar *)
|
|
746
|
-
{
|
|
747
|
-
return true;
|
|
748
|
-
}
|
|
749
|
-
static inline bool classof(const SVFVar *node)
|
|
750
|
-
{
|
|
751
|
-
return node->getNodeKind() == SVFVar::CloneDummyObjNode;
|
|
752
|
-
}
|
|
753
|
-
static inline bool classof(const GenericPAGNodeTy *node)
|
|
754
|
-
{
|
|
755
|
-
return node->getNodeKind() == SVFVar::CloneDummyObjNode;
|
|
756
|
-
}
|
|
757
|
-
//@}
|
|
758
|
-
|
|
759
|
-
/// Constructor
|
|
760
|
-
CloneDummyObjVar(NodeID i, const MemObj* m, PNODEK ty = CloneDummyObjNode)
|
|
761
|
-
: DummyObjVar(i, m, ty)
|
|
762
|
-
{
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
/// Return name of this node
|
|
766
|
-
inline const std::string getValueName() const
|
|
767
|
-
{
|
|
768
|
-
return "clone of " + ObjVar::getValueName();
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
virtual const std::string toString() const;
|
|
772
|
-
};
|
|
773
|
-
|
|
774
|
-
/*
|
|
775
|
-
* Clone object for GEP objects.
|
|
776
|
-
*/
|
|
777
|
-
class CloneGepObjVar : public GepObjVar
|
|
778
|
-
{
|
|
779
|
-
public:
|
|
780
|
-
//@{ Methods to support type inquiry through isa, cast, and dyn_cast:
|
|
781
|
-
static inline bool classof(const CloneGepObjVar *)
|
|
782
|
-
{
|
|
783
|
-
return true;
|
|
784
|
-
}
|
|
785
|
-
static inline bool classof(const SVFVar *node)
|
|
786
|
-
{
|
|
787
|
-
return node->getNodeKind() == SVFVar::CloneGepObjNode;
|
|
788
|
-
}
|
|
789
|
-
static inline bool classof(const GenericPAGNodeTy *node)
|
|
790
|
-
{
|
|
791
|
-
return node->getNodeKind() == SVFVar::CloneGepObjNode;
|
|
792
|
-
}
|
|
793
|
-
//@}
|
|
794
|
-
|
|
795
|
-
/// Constructor
|
|
796
|
-
CloneGepObjVar(const MemObj* mem, NodeID i, const LocationSet& l, PNODEK ty = CloneGepObjNode) :
|
|
797
|
-
GepObjVar(mem, i, l, ty)
|
|
798
|
-
{
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
/// Return name of this node
|
|
802
|
-
inline const std::string getValueName() const
|
|
803
|
-
{
|
|
804
|
-
return "clone (gep) of " + GepObjVar::getValueName();
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
virtual const std::string toString() const;
|
|
808
|
-
};
|
|
809
|
-
|
|
810
|
-
/*
|
|
811
|
-
* Clone object for FI objects.
|
|
812
|
-
*/
|
|
813
|
-
class CloneFIObjVar : public FIObjVar
|
|
814
|
-
{
|
|
815
|
-
public:
|
|
816
|
-
//@{ Methods to support type inquiry through isa, cast, and dyn_cast:
|
|
817
|
-
static inline bool classof(const CloneFIObjVar *)
|
|
818
|
-
{
|
|
819
|
-
return true;
|
|
820
|
-
}
|
|
821
|
-
static inline bool classof(const SVFVar *node)
|
|
822
|
-
{
|
|
823
|
-
return node->getNodeKind() == SVFVar::CloneFIObjNode;
|
|
824
|
-
}
|
|
825
|
-
static inline bool classof(const GenericPAGNodeTy *node)
|
|
826
|
-
{
|
|
827
|
-
return node->getNodeKind() == SVFVar::CloneFIObjNode;
|
|
828
|
-
}
|
|
829
|
-
//@}
|
|
830
|
-
|
|
831
|
-
/// Constructor
|
|
832
|
-
CloneFIObjVar(const Value* val, NodeID i, const MemObj* mem, PNODEK ty = CloneFIObjNode) :
|
|
833
|
-
FIObjVar(val, i, mem, ty)
|
|
834
|
-
{
|
|
835
|
-
}
|
|
836
|
-
|
|
837
|
-
/// Return name of this node
|
|
838
|
-
inline const std::string getValueName() const
|
|
839
|
-
{
|
|
840
|
-
return "clone (FI) of " + FIObjVar::getValueName();
|
|
841
|
-
}
|
|
842
|
-
|
|
843
|
-
virtual const std::string toString() const;
|
|
844
|
-
};
|
|
845
|
-
|
|
846
719
|
} // End namespace SVF
|
|
847
720
|
|
|
848
|
-
|
|
849
|
-
|
|
850
721
|
#endif /* OBJECTANDSYMBOL_H_ */
|
|
@@ -208,30 +208,6 @@ public:
|
|
|
208
208
|
return getModuleNum() == 0;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
-
/// Returns true if all LLVM modules are compiled with ctir.
|
|
212
|
-
bool allCTir(void) const
|
|
213
|
-
{
|
|
214
|
-
// Iterate over all modules. If a single module does not have the correct ctir module flag,
|
|
215
|
-
// short-circuit and return false.
|
|
216
|
-
for (u32_t i = 0; i < getModuleNum(); ++i)
|
|
217
|
-
{
|
|
218
|
-
llvm::Metadata *ctirModuleFlag = llvmModuleSet->getModule(i)->getModuleFlag(cppUtil::ctir::derefMDName);
|
|
219
|
-
if (ctirModuleFlag == nullptr)
|
|
220
|
-
{
|
|
221
|
-
return false;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
llvm::ConstantAsMetadata *flagConstMetadata = SVFUtil::dyn_cast<llvm::ConstantAsMetadata>(ctirModuleFlag);
|
|
225
|
-
ConstantInt *flagConstInt = SVFUtil::dyn_cast<ConstantInt>(flagConstMetadata->getValue());
|
|
226
|
-
if (flagConstInt->getZExtValue() != cppUtil::ctir::moduleFlagValue)
|
|
227
|
-
{
|
|
228
|
-
return false;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
return true;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
211
|
private:
|
|
236
212
|
void loadModules(const std::vector<std::string> &moduleNameVec);
|
|
237
213
|
void addSVFMain();
|
|
@@ -237,13 +237,6 @@ public:
|
|
|
237
237
|
static const llvm::cl::opt<bool> PtsDiff;
|
|
238
238
|
static const llvm::cl::opt<bool> MergePWC;
|
|
239
239
|
|
|
240
|
-
// FlowSensitive.cpp
|
|
241
|
-
static const llvm::cl::opt<bool> CTirAliasEval;
|
|
242
|
-
|
|
243
|
-
//FlowSensitiveTBHC.cpp
|
|
244
|
-
static const llvm::cl::opt<bool> TBHCStoreReuse;
|
|
245
|
-
static const llvm::cl::opt<bool> TBHCAllReuse;
|
|
246
|
-
|
|
247
240
|
// WPAPass.cpp
|
|
248
241
|
static const llvm::cl::opt<bool> AnderSVFG;
|
|
249
242
|
static const llvm::cl::opt<bool> SABERFULLSVFG;
|
|
@@ -240,10 +240,6 @@ protected:
|
|
|
240
240
|
/// Return TRUE if this is a strong update STORE statement.
|
|
241
241
|
bool isStrongUpdate(const SVFGNode* node, NodeID& singleton);
|
|
242
242
|
|
|
243
|
-
/// Prints some easily parseable stats on aliasing of relevant CTir TL PTS.
|
|
244
|
-
/// Format: eval-ctir-aliases #TOTAL_TESTS #MAY_ALIAS #NO_ALIAS
|
|
245
|
-
virtual void printCTirAliasStats(void);
|
|
246
|
-
|
|
247
243
|
/// Fills may/noAliases for the location/pointer pairs in cmp.
|
|
248
244
|
virtual void countAliases(Set<std::pair<NodeID, NodeID>> cmp, unsigned *mayAliases, unsigned *noAliases);
|
|
249
245
|
|