Static Value-Flow Analysis
MTA.h
Go to the documentation of this file.
1 //===- MTA.h -- Analysis of multithreaded programs-------------//
2 //
3 // SVF: Static Value-Flow Analysis
4 //
5 // Copyright (C) <2013-> <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  * MTA.h
25  *
26  * Created on: May 14, 2014
27  * Author: Yulei Sui, Peng Di
28  *
29  * The implementation is based on
30  * Yulei Sui, Peng Di, and Jingling Xue. "Sparse Flow-Sensitive Pointer Analysis for Multithreaded Programs".
31  * 2016 International Symposium on Code Generation and Optimization (CGO'16)
32  */
33 
34 #ifndef MTA_H_
35 #define MTA_H_
36 
37 #include <set>
38 #include <vector>
39 #include "SVFIR/SVFValue.h"
40 
41 namespace SVF
42 {
43 
44 class PointerAnalysis;
45 class AndersenWaveDiff;
46 class ThreadCallGraph;
47 class MTAStat;
48 class TCT;
49 class MHP;
50 class LockAnalysis;
51 class SVFModule;
52 
56 class MTA
57 {
58 
59 public:
61  MTA();
62 
64  virtual ~MTA();
65 
66 
68  virtual bool runOnModule(SVFIR* module);
70  virtual MHP* computeMHP(SVFModule* module);
74  virtual void detect(SVFModule* module);
75 
76  // Not implemented for now
77  // void dump(Module &module, MHP *mhp, LockAnalysis *lsa);
78 
80  {
81  return mhp;
82  }
83 
85  {
86  return lsa;
87  }
88 private:
90  std::unique_ptr<TCT> tct;
91  std::unique_ptr<MTAStat> stat;
92  MHP* mhp;
94 };
95 
96 } // End namespace SVF
97 
98 #endif /* MTA_H_ */
Definition: MHP.h:46
Definition: MTA.h:57
virtual LockAnalysis * computeLocksets(TCT *tct)
Compute locksets.
Definition: MTA.cpp:75
ThreadCallGraph * tcg
Definition: MTA.h:89
std::unique_ptr< TCT > tct
Definition: MTA.h:90
virtual MHP * computeMHP(SVFModule *module)
Compute MHP.
Definition: MTA.cpp:82
virtual void detect(SVFModule *module)
Perform detection.
LockAnalysis * getLockAnalysis()
Definition: MTA.h:84
virtual ~MTA()
Destructor.
Definition: MTA.cpp:48
LockAnalysis * lsa
Definition: MTA.h:93
MHP * getMHP()
Definition: MTA.h:79
MHP * mhp
Definition: MTA.h:92
MTA()
Constructor.
Definition: MTA.cpp:43
std::unique_ptr< MTAStat > stat
Definition: MTA.h:91
virtual bool runOnModule(SVFIR *module)
We start the pass here.
Definition: MTA.cpp:61
Definition: TCT.h:154
for isBitcode
Definition: BasicTypes.h:68