-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFeatureAnalyzer.h
56 lines (39 loc) · 1.04 KB
/
FeatureAnalyzer.h
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
#ifndef FEATURE_ANALYZER_H
#define FEATURE_ANALYZER_H
#include "CFG.h"
#include "feature.h"
#include <unordered_map>
#define dprintf if (config->debug) printf
struct InstanceDataType {
ParseAPI::Function* f;
std::unordered_map<std::string, double> featPair;
};
class FeatureAnalyzer {
public:
virtual void ProduceAFunction(InstanceDataType*) = 0;
};
class IdiomAnalyzer : public FeatureAnalyzer {
public:
virtual void ProduceAFunction(InstanceDataType*);
};
class GraphletAnalyzer : public FeatureAnalyzer {
static bool ANON;
static int MERGE;
bool color;
public:
GraphletAnalyzer(bool c): color(c) {}
virtual void ProduceAFunction(InstanceDataType*);
};
class RegisterLivenessAnalyzer : public FeatureAnalyzer {
public:
virtual void ProduceAFunction(InstanceDataType*);
};
class StackHeightAnalyzer : public FeatureAnalyzer {
public:
virtual void ProduceAFunction(InstanceDataType*);
};
class SlicingAnalyzer : public FeatureAnalyzer {
public:
virtual void ProduceAFunction(InstanceDataType*);
};
#endif