-
Notifications
You must be signed in to change notification settings - Fork 0
/
out59.txt
147 lines (108 loc) · 904 Bytes
/
out59.txt
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
Scheme Evaluation
Fact Evaluation
a
x='a'
b
c
d
e
f
g
h
i
j
Rule Evaluation
Dependency Graph
R0: R1
R1: R2
R2: R3
R3: R4
R4: R5
R5: R6
R6: R7
R7: R8
R8:
Reverse Graph
R0:
R1: R0
R2: R1
R3: R2
R4: R3
R5: R4
R6: R5
R7: R6
R8: R7
Postorder Numbers
R0: 1
R1: 2
R2: 3
R3: 4
R4: 5
R5: 6
R6: 7
R7: 8
R8: 9
SCC Search Order
R8
R7
R6
R5
R4
R3
R2
R1
R0
SCC: R8
b(x) :- a(x)
x='a'
SCC: R7
c(x) :- b(x)
x='a'
SCC: R6
d(x) :- c(x)
x='a'
SCC: R5
e(x) :- d(x)
x='a'
SCC: R4
f(x) :- e(x)
x='a'
SCC: R3
g(x) :- f(x)
x='a'
SCC: R2
h(x) :- g(x)
x='a'
SCC: R1
i(x) :- h(x)
x='a'
SCC: R0
j(x) :- i(x)
x='a'
Rule Evaluation Complete
a
x='a'
b
x='a'
c
x='a'
d
x='a'
e
x='a'
f
x='a'
g
x='a'
h
x='a'
i
x='a'
j
x='a'
Query Evaluation
j('a')? Yes(1)
select
x='a'
project
rename