-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathTabulation.h
55 lines (42 loc) · 1.08 KB
/
Tabulation.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
/* Copyright (C), 2016-present, Sourcebrella, Inc Ltd - All rights reserved.
* Unauthorized copying, using, modifying of this file, via any medium is
* strictly prohibited, proprietary, and confidential.
*
* Author:
* Qingkai Shi <qingkai.sqk@alibaba-inc.com>
*
* File Description:
*
*
* Creation Date: 2021/7/10
* Modification History:
**/
#ifndef _TABULATION_H
#define _TABULATION_H
#include <map>
#include <set>
#include "Graph.h"
#include "AbstractQuery.h"
class Tabulation : public AbstractQuery {
private:
Graph &vfg;
std::set<int> visited;
std::set<int> func_visited;
public:
explicit Tabulation(Graph &g);
bool reach(int s, int t) override;
bool reach_func(int s, int t);
bool is_call(int s, int t);
bool is_return(int s, int t);
double tc();
void traverse(int s, std::set<int> &tc);
void traverse_func(int s, std::set<int> &tc);
const char *method() const override {
return "Tabulate";
}
void reset() override {
visited.clear();
func_visited.clear();
}
};
#endif //_TABULATION_H