-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathFlow.cpp
More file actions
executable file
·61 lines (48 loc) · 1 KB
/
Flow.cpp
File metadata and controls
executable file
·61 lines (48 loc) · 1 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
/*
* Flow.cpp
*
* Created on: 2014-05-29
* Author: jtestard
*/
#include "Flow.h"
const string Flow::TOP = "top";
const string Flow::BOTTOM = "bottom";
/**
* For the basic static analysis, just compare strings.
*/
bool Flow::equals(Flow* other){
return this->basic==other->basic;
}
string Flow::jsonString(){
return "\"" + basic + "\"";
}
bool Flow::isBasic() {
return basic!="";
}
bool Flow::basicEquals(Flow* other){
return this->basic==other->basic;
}
void Flow::copy(Flow *rhs){
this->basic = rhs->basic;
}
Flow::Flow(){
basic = "";
}
Flow::Flow(string input){
basic = input;
}
Flow::Flow(Flow* flow){
basic = flow->basic;
}
//Most basic join operation possible.
Flow* Flow::join(Flow* other){
//join bottom-bottom gives you bottom. Anything else gives you top.
errs()<< "I just entered into the superclassed join... \n";
if (this->basic==BOTTOM && other->basic==BOTTOM)
return new Flow(BOTTOM);
else
return new Flow(TOP);
}
Flow::~Flow(){
//Nothing for basic static analysis
}