Repository navigation
Expand file tree
/
Copy pathPointerAnalysisFlow.h
More file actions
executable file
·68 lines (52 loc) · 1.58 KB
/
Copy pathPointerAnalysisFlow.h
File metadata and controls
executable file
·68 lines (52 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* Flow.h
*
* Created on: 2014-05-29
* Author: jtestard
*/
#ifndef POINTER_ANALYSIS_FLOW_H_
#define POINTER_ANALYSIS_FLOW_H_
#include <string>
#include <map>
#include <set>
#include <algorithm>
#include <sstream>
#include "llvm/Support/raw_ostream.h"
#include "Flow.h"
using namespace std;
using namespace llvm;
/*
* This class is the FLow class for the pointer analysis.
* This is a May-Point-To Analysis.
*/
class PointerAnalysisFlow: public Flow {
public:
//The equality operator is used by the worklist algorithm and must be overloaded by the analysis.
bool equals(Flow* other);
/* This method is used by the JSONCFG function of the analysis to output the graph in JSON format.
* It must output a proper representation of the flow in JSON format :
*
* { "X" : "Z", "Z" : ["W","Y"] }
*
* Where the left hand side are variable names and right hand side are also variable names.
*/
string jsonString();
/*
* The equality operator must also be overloaded when we want to assign a variable to top or bottom (or something else).
*/
void copy(Flow* rhs);
/*
* The join function must be overloaded by the Flow subclasses.
*/
Flow* join(Flow* other);
//This constructor initializes an empty map.
PointerAnalysisFlow();
//This constructor should be used for top or bottom.
PointerAnalysisFlow(string input);
//Required for type casting within overloaded functions.
PointerAnalysisFlow(PointerAnalysisFlow* flow);
~PointerAnalysisFlow();
//Variables are represented as strings.
map<string, set<string> > value;
};
#endif /* POINTER_ANALYSIS_FLOW_H_ */