Static Value-Flow Analysis
Loading...
Searching...
No Matches
WPAStat.h
Go to the documentation of this file.
1//===- WPAStat.h -- WPA statistics--------------------------------------------//
2//
3// SVF: Static Value-Flow Analysis
4//
5// Copyright (C) <2013-2017> <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/*
25 * FlowSensitiveStat.h
26 *
27 * Created on: 27/11/2013
28 * Author: yesen
29 */
30
31#ifndef FLOWSENSITIVESTAT_H_
32#define FLOWSENSITIVESTAT_H_
33
34#include "Util/PTAStat.h"
35#include "WPA/FlowSensitive.h"
37
38namespace SVF
39{
40
41class AndersenBase;
42class SVFIR;
43class ConstraintGraph;
44
48class AndersenStat : public PTAStat
49{
50
51private:
53
54public:
55 static const char* CollapseTime;
56
65
67
68 virtual ~AndersenStat()
69 {
70
71 }
72
73 virtual void performStat();
74
76
77 void statNullPtr();
78
80};
81
86{
87public:
90
92
99
101
102 virtual void performStat();
103
104private:
106 {
108 OUT
109 };
110
111 void clearStat();
112
113 void statNullPtr();
114
115 void statPtsSize();
116
117 void statAddrVarPtsSize();
118
119 void calculateAddrVarPts(NodeID pointer, const SVFGNode* node);
120
122
126
136
148
153
155
156 double _AvgPtsSize;
160
163};
164
220} // End namespace SVF
221
222#endif /* FLOWSENSITIVESTAT_H_ */
cJSON * p
Definition cJSON.cpp:2559
u32_t _NumOfBlackholePtr
Definition WPAStat.h:64
virtual ~AndersenStat()
Definition WPAStat.h:68
u32_t _NumOfNullPtr
Definition WPAStat.h:62
static const char * CollapseTime
Definition WPAStat.h:55
virtual void performStat()
static u32_t _NumOfCycles
Definition WPAStat.h:58
static u32_t _MaxPtsSize
Definition WPAStat.h:57
AndersenBase * pta
Definition WPAStat.h:52
static u32_t _NumOfNodesInCycles
Definition WPAStat.h:60
u32_t _NumOfConstantPtr
Definition WPAStat.h:63
static u32_t _MaxNumOfNodesInSCC
Definition WPAStat.h:61
void collectCycleInfo(ConstraintGraph *consCG)
static u32_t _NumOfPWCCycles
Definition WPAStat.h:59
void calculateAddrVarPts(NodeID pointer, const SVFGNode *node)
u32_t _NumOfActualInSVFGNodesHaveInOut[2]
Definition WPAStat.h:131
double _AvgPtsSize
average points-to set size.
Definition WPAStat.h:156
double _AvgAddrTakenVarPtsSize
average points-to set size of addr-taken variables.
Definition WPAStat.h:159
u32_t _PotentialNumOfVarHaveINOUTPts[2]
Definition WPAStat.h:147
u32_t _NumOfVarHaveINOUTPtsInFormalOut[2]
Definition WPAStat.h:141
FlowSensitive::PtsMap PtsMap
Definition WPAStat.h:89
u32_t _NumOfFormalOutSVFGNodesHaveInOut[2]
Definition WPAStat.h:130
u32_t _NumOfVarHaveEmptyINOUTPts[2]
Definition WPAStat.h:139
u32_t _NumOfVarHaveINOUTPtsInStore[2]
Definition WPAStat.h:145
FlowSensitiveStat(FlowSensitive *pta)
Definition WPAStat.h:93
u32_t _NumOfFormalInSVFGNodesHaveInOut[2]
Definition WPAStat.h:129
virtual ~FlowSensitiveStat()
Definition WPAStat.h:100
double _AvgTopLvlPtsSize
average points-to set size in top-level pointers.
Definition WPAStat.h:157
u32_t _NumOfActualOutSVFGNodesHaveInOut[2]
Definition WPAStat.h:132
u32_t _NumOfVarHaveINOUTPtsInActualIn[2]
Definition WPAStat.h:142
FlowSensitive::DFInOutMap DFInOutMap
Definition WPAStat.h:88
u32_t _NumOfMSSAPhiSVFGNodesHaveInOut[2]
Definition WPAStat.h:135
u32_t _MaxPtsSize
sizes of points-to set
Definition WPAStat.h:150
u32_t _MaxAddrTakenVarPts
max points-to set size of addr-taken variables.
Definition WPAStat.h:161
void statInOutPtsSize(const DFInOutMap &data, ENUM_INOUT inOrOut)
u32_t _TotalPtsSize
total points-to set size.
Definition WPAStat.h:154
u32_t _NumOfVarHaveINOUTPtsInMSSAPhi[2]
Definition WPAStat.h:146
u32_t _NumOfSVFGNodesHaveInOut[2]
number of SVFG nodes which have IN/OUT set.
Definition WPAStat.h:128
u32_t _NumOfVarHaveINOUTPtsInLoad[2]
Definition WPAStat.h:144
u32_t _MaxInOutPtsSize[2]
max points-to set size in IN/OUT set.
Definition WPAStat.h:152
u32_t _NumOfVarHaveINOUTPts[2]
number of pag nodes which have points-to set in IN/OUT set.
Definition WPAStat.h:138
u32_t _NumOfLoadSVFGNodesHaveInOut[2]
Definition WPAStat.h:133
u32_t _NumOfVarHaveINOUTPtsInActualOut[2]
Definition WPAStat.h:143
u32_t _NumOfVarHaveINOUTPtsInFormalIn[2]
Definition WPAStat.h:140
u32_t _NumOfStoreSVFGNodesHaveInOut[2]
Definition WPAStat.h:134
u32_t _NumOfAddrTakeVar
number of occurrences of addr-taken variables in load/store.
Definition WPAStat.h:162
u32_t _MaxTopLvlPtsSize
max points-to set size in top-level pointers.
Definition WPAStat.h:151
double _AvgInOutPtsSize[2]
average points-to set size in IN set.
Definition WPAStat.h:158
FlowSensitive * fspta
Definition WPAStat.h:91
BVDataPTAImpl::MutDFPTDataTy::PtsMap PtsMap
BVDataPTAImpl::MutDFPTDataTy::DFPtsMap DFInOutMap
PointerAnalysis * pta
Definition PTAStat.h:74
virtual void startClk()
Definition SVFStat.h:58
VersionedFlowSensitive * vfspta
Definition WPAStat.h:168
double _AvgVersionPtsSize
Average points-to set size for address-taken objects.
Definition WPAStat.h:218
u32_t _NumSingleVersion
Number of objects which have a single version.
Definition WPAStat.h:201
u32_t _NumEmptyVersions
Number of versions with empty points-to sets (actually empty, not never-accessed).
Definition WPAStat.h:199
u32_t _NumNonEmptyVersions
Number of versions with non-empty points-to sets (since versioning is over-approximate).
Definition WPAStat.h:197
u32_t _TotalPtsSize
Total of points-to set sizes for calculating averages.
Definition WPAStat.h:211
double _AvgPtsSize
Average size across all points-to sets.
Definition WPAStat.h:214
VersionedFlowSensitiveStat(VersionedFlowSensitive *pta)
Definition WPAStat.h:170
u32_t _NumVersions
Total number of versions across all objects.
Definition WPAStat.h:191
double _AvgTopLvlPtsSize
Average points-to set size for top-level pointers.
Definition WPAStat.h:216
u32_t _MaxVersionPtsSize
Max address-taken points-to set size.
Definition WPAStat.h:208
u32_t _MaxPtsSize
Largest PTS size.
Definition WPAStat.h:204
u32_t _MaxVersions
Most versions for a single object.
Definition WPAStat.h:193
u32_t _MaxTopLvlPtsSize
Max points-to set size in top-level pointers.
Definition WPAStat.h:206
u32_t _NumUsedVersions
Number of version PTSs actually used (sum of next two fields).
Definition WPAStat.h:195
void ptsSizeStat(void)
For all PTS size related statistics not handled by versionStat.
void versionStat(void)
For all version-related statistics.
for isBitcode
Definition BasicTypes.h:68
u32_t NodeID
Definition GeneralType.h:55
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74
unsigned u32_t
Definition GeneralType.h:46