-
Notifications
You must be signed in to change notification settings - Fork 0
/
ParserGraphs.h
58 lines (43 loc) · 1.47 KB
/
ParserGraphs.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
57
58
#pragma once
#ifndef PARGERGRAPHS_H
#define PARSERGRAPHS_H
#include "parser\definations.h"
#include "GraphDatabase.h"
#include "MemoryGraph.h"
#include "GraphSchema.h"
class FromConditionGraph;
class MemoryGraph;
class WhereConditionGraph {
public:
MemoryGraph* mGraph;
FromConditionGraph* fcg;
int type = 0;
vector<string> paras; // of the func
string querytype;
string related_file;
vector<int> nodes;
unordered_map<int, unordered_map<string, string>>* nodeAttributes;
unordered_map<int, unordered_map<int, unordered_map<string, string>>>* edgeAttributes;
vector<unordered_map<int, vector<string>>>* outedges;
vector<unordered_map<int, vector<string>>>* inedges;
vector<string>* nodeLabels;
WhereConditionGraph() { mGraph = NULL; };
void init(WhereCondition* wc);
void loadPatternGraph(string filename, vector<int>& nodes
, unordered_map<int, unordered_map<string, string>>& nodeAttributes
, unordered_map<int, unordered_map<int, unordered_map<string, string>>>& edgeAttributes
, vector<unordered_map<int, vector<string>>>& outedges
, vector<unordered_map<int, vector<string>>>& inedges, vector<string>* nodeLabels);
void loadComboParameter(string filename, unordered_map<string, string>& paras);
void convert(GraphSchema& gschema);
void generateFirstOrderStatGraph(FirstOrderStat* fos);
void analyzeFirstOrderUnit(FirstOrderUnit* fou);
};
class FromConditionGraph {
public:
FromConditionGraph() {};
void init(FromCondition* fc);
int type;
string gsid;
};
#endif