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#include "Util/GeneralType.h"
38
39namespace SVF
40{
41
42class AndersenBase;
43class SVFIR;
44class ConstraintGraph;
45
49class AndersenStat : public PTAStat
50{
51
52private:
54
55public:
56 static const char* CollapseTime;
57
66
68
69 virtual ~AndersenStat()
70 {
71
72 }
73
74 virtual void performStat();
75
77
78 void statNullPtr();
79
81};
82
87{
88public:
91
93
100
102
103 virtual void performStat();
104
105private:
111
112 void clearStat();
113
114 void statNullPtr();
115
116 void statPtsSize();
117
118 void statAddrVarPtsSize();
119
120 void calculateAddrVarPts(NodeID pointer, const SVFGNode* node);
121
123
127
137
149
154
156
157 double _AvgPtsSize;
161
164};
165
221} // End namespace SVF
222
223#endif /* FLOWSENSITIVESTAT_H_ */
cJSON * p
Definition cJSON.cpp:2559
u32_t _NumOfBlackholePtr
Definition WPAStat.h:65
virtual ~AndersenStat()
Definition WPAStat.h:69
u32_t _NumOfNullPtr
Definition WPAStat.h:63
static const char * CollapseTime
Definition WPAStat.h:56
virtual void performStat()
static u32_t _NumOfCycles
Definition WPAStat.h:59
static u32_t _MaxPtsSize
Definition WPAStat.h:58
AndersenBase * pta
Definition WPAStat.h:53
static u32_t _NumOfNodesInCycles
Definition WPAStat.h:61
u32_t _NumOfConstantPtr
Definition WPAStat.h:64
static u32_t _MaxNumOfNodesInSCC
Definition WPAStat.h:62
void collectCycleInfo(ConstraintGraph *consCG)
static u32_t _NumOfPWCCycles
Definition WPAStat.h:60
void calculateAddrVarPts(NodeID pointer, const SVFGNode *node)
u32_t _NumOfActualInSVFGNodesHaveInOut[2]
Definition WPAStat.h:132
double _AvgPtsSize
average points-to set size.
Definition WPAStat.h:157
double _AvgAddrTakenVarPtsSize
average points-to set size of addr-taken variables.
Definition WPAStat.h:160
u32_t _PotentialNumOfVarHaveINOUTPts[2]
Definition WPAStat.h:148
u32_t _NumOfVarHaveINOUTPtsInFormalOut[2]
Definition WPAStat.h:142
FlowSensitive::PtsMap PtsMap
Definition WPAStat.h:90
u32_t _NumOfFormalOutSVFGNodesHaveInOut[2]
Definition WPAStat.h:131
u32_t _NumOfVarHaveEmptyINOUTPts[2]
Definition WPAStat.h:140
u32_t _NumOfVarHaveINOUTPtsInStore[2]
Definition WPAStat.h:146
FlowSensitiveStat(FlowSensitive *pta)
Definition WPAStat.h:94
u32_t _NumOfFormalInSVFGNodesHaveInOut[2]
Definition WPAStat.h:130
virtual ~FlowSensitiveStat()
Definition WPAStat.h:101
double _AvgTopLvlPtsSize
average points-to set size in top-level pointers.
Definition WPAStat.h:158
u32_t _NumOfActualOutSVFGNodesHaveInOut[2]
Definition WPAStat.h:133
u32_t _NumOfVarHaveINOUTPtsInActualIn[2]
Definition WPAStat.h:143
FlowSensitive::DFInOutMap DFInOutMap
Definition WPAStat.h:89
u32_t _NumOfMSSAPhiSVFGNodesHaveInOut[2]
Definition WPAStat.h:136
u32_t _MaxPtsSize
sizes of points-to set
Definition WPAStat.h:151
u32_t _MaxAddrTakenVarPts
max points-to set size of addr-taken variables.
Definition WPAStat.h:162
void statInOutPtsSize(const DFInOutMap &data, ENUM_INOUT inOrOut)
u32_t _TotalPtsSize
total points-to set size.
Definition WPAStat.h:155
u32_t _NumOfVarHaveINOUTPtsInMSSAPhi[2]
Definition WPAStat.h:147
u32_t _NumOfSVFGNodesHaveInOut[2]
number of SVFG nodes which have IN/OUT set.
Definition WPAStat.h:129
u32_t _NumOfVarHaveINOUTPtsInLoad[2]
Definition WPAStat.h:145
u32_t _MaxInOutPtsSize[2]
max points-to set size in IN/OUT set.
Definition WPAStat.h:153
u32_t _NumOfVarHaveINOUTPts[2]
number of pag nodes which have points-to set in IN/OUT set.
Definition WPAStat.h:139
u32_t _NumOfLoadSVFGNodesHaveInOut[2]
Definition WPAStat.h:134
u32_t _NumOfVarHaveINOUTPtsInActualOut[2]
Definition WPAStat.h:144
u32_t _NumOfVarHaveINOUTPtsInFormalIn[2]
Definition WPAStat.h:141
u32_t _NumOfStoreSVFGNodesHaveInOut[2]
Definition WPAStat.h:135
u32_t _NumOfAddrTakeVar
number of occurrences of addr-taken variables in load/store.
Definition WPAStat.h:163
u32_t _MaxTopLvlPtsSize
max points-to set size in top-level pointers.
Definition WPAStat.h:152
double _AvgInOutPtsSize[2]
average points-to set size in IN set.
Definition WPAStat.h:159
FlowSensitive * fspta
Definition WPAStat.h:92
BVDataPTAImpl::MutDFPTDataTy::PtsMap PtsMap
BVDataPTAImpl::MutDFPTDataTy::DFPtsMap DFInOutMap
PointerAnalysis * pta
Definition PTAStat.h:73
virtual void startClk()
Definition SVFStat.h:61
VersionedFlowSensitive * vfspta
Definition WPAStat.h:169
double _AvgVersionPtsSize
Average points-to set size for address-taken objects.
Definition WPAStat.h:219
u32_t _NumSingleVersion
Number of objects which have a single version.
Definition WPAStat.h:202
u32_t _NumEmptyVersions
Number of versions with empty points-to sets (actually empty, not never-accessed).
Definition WPAStat.h:200
u32_t _NumNonEmptyVersions
Number of versions with non-empty points-to sets (since versioning is over-approximate).
Definition WPAStat.h:198
u32_t _TotalPtsSize
Total of points-to set sizes for calculating averages.
Definition WPAStat.h:212
double _AvgPtsSize
Average size across all points-to sets.
Definition WPAStat.h:215
VersionedFlowSensitiveStat(VersionedFlowSensitive *pta)
Definition WPAStat.h:171
u32_t _NumVersions
Total number of versions across all objects.
Definition WPAStat.h:192
double _AvgTopLvlPtsSize
Average points-to set size for top-level pointers.
Definition WPAStat.h:217
u32_t _MaxVersionPtsSize
Max address-taken points-to set size.
Definition WPAStat.h:209
u32_t _MaxPtsSize
Largest PTS size.
Definition WPAStat.h:205
u32_t _MaxVersions
Most versions for a single object.
Definition WPAStat.h:194
u32_t _MaxTopLvlPtsSize
Max points-to set size in top-level pointers.
Definition WPAStat.h:207
u32_t _NumUsedVersions
Number of version PTSs actually used (sum of next two fields).
Definition WPAStat.h:196
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:70
u32_t NodeID
Definition GeneralType.h:76
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:76
unsigned u32_t
Definition GeneralType.h:67