1 | #define SOUFFLE_GENERATOR_VERSION "39d42a366"
|
2 | #include "souffle/CompiledSouffle.h"
|
3 | #include "souffle/SignalHandler.h"
|
4 | #include "souffle/SouffleInterface.h"
|
5 | #include "souffle/datastructure/BTree.h"
|
6 | #include "souffle/io/IOSystem.h"
|
7 | #include <any>
|
8 | namespace functors {
|
9 | extern "C" {
|
10 | }
|
11 | } //namespace functors
|
12 | namespace souffle::t_btree_iii__0_1_2__111 {
|
13 | using namespace souffle;
|
14 | struct Type {
|
15 | static constexpr Relation::arity_type Arity = 3;
|
16 | using t_tuple = Tuple<RamDomain, 3>;
|
17 | struct t_comparator_0{
|
18 | int operator()(const t_tuple& a, const t_tuple& b) const {
|
19 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0])) ? -1 : (ramBitCast<RamSigned>(a[0]) > ramBitCast<RamSigned>(b[0])) ? 1 :((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1])) ? -1 : (ramBitCast<RamSigned>(a[1]) > ramBitCast<RamSigned>(b[1])) ? 1 :((ramBitCast<RamSigned>(a[2]) < ramBitCast<RamSigned>(b[2])) ? -1 : (ramBitCast<RamSigned>(a[2]) > ramBitCast<RamSigned>(b[2])) ? 1 :(0)));
|
20 | }
|
21 | bool less(const t_tuple& a, const t_tuple& b) const {
|
22 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0]))|| ((ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0])) && ((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1]))|| ((ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1])) && ((ramBitCast<RamSigned>(a[2]) < ramBitCast<RamSigned>(b[2]))))));
|
23 | }
|
24 | bool equal(const t_tuple& a, const t_tuple& b) const {
|
25 | return (ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0]))&&(ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1]))&&(ramBitCast<RamSigned>(a[2]) == ramBitCast<RamSigned>(b[2]));
|
26 | }
|
27 | };
|
28 | using t_ind_0 = btree_set<t_tuple,t_comparator_0>;
|
29 | t_ind_0 ind_0;
|
30 | using iterator = t_ind_0::iterator;
|
31 | struct context {
|
32 | t_ind_0::operation_hints hints_0_lower;
|
33 | t_ind_0::operation_hints hints_0_upper;
|
34 | };
|
35 | context createContext() { return context(); }
|
36 | bool insert(const t_tuple& t);
|
37 | bool insert(const t_tuple& t, context& h);
|
38 | bool insert(const RamDomain* ramDomain);
|
39 | bool insert(RamDomain a0,RamDomain a1,RamDomain a2);
|
40 | bool contains(const t_tuple& t, context& h) const;
|
41 | bool contains(const t_tuple& t) const;
|
42 | std::size_t size() const;
|
43 | iterator find(const t_tuple& t, context& h) const;
|
44 | iterator find(const t_tuple& t) const;
|
45 | range<iterator> lowerUpperRange_000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const;
|
46 | range<iterator> lowerUpperRange_000(const t_tuple& /* lower */, const t_tuple& /* upper */) const;
|
47 | range<t_ind_0::iterator> lowerUpperRange_111(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
48 | range<t_ind_0::iterator> lowerUpperRange_111(const t_tuple& lower, const t_tuple& upper) const;
|
49 | bool empty() const;
|
50 | std::vector<range<iterator>> partition() const;
|
51 | void purge();
|
52 | iterator begin() const;
|
53 | iterator end() const;
|
54 | void printStatistics(std::ostream& o) const;
|
55 | };
|
56 | } // namespace souffle::t_btree_iii__0_1_2__111
|
57 | namespace souffle::t_btree_iii__0_1_2__111 {
|
58 | using namespace souffle;
|
59 | using t_ind_0 = Type::t_ind_0;
|
60 | using iterator = Type::iterator;
|
61 | using context = Type::context;
|
62 | bool Type::insert(const t_tuple& t) {
|
63 | context h;
|
64 | return insert(t, h);
|
65 | }
|
66 | bool Type::insert(const t_tuple& t, context& h) {
|
67 | if (ind_0.insert(t, h.hints_0_lower)) {
|
68 | return true;
|
69 | } else return false;
|
70 | }
|
71 | bool Type::insert(const RamDomain* ramDomain) {
|
72 | RamDomain data[3];
|
73 | std::copy(ramDomain, ramDomain + 3, data);
|
74 | const t_tuple& tuple = reinterpret_cast<const t_tuple&>(data);
|
75 | context h;
|
76 | return insert(tuple, h);
|
77 | }
|
78 | bool Type::insert(RamDomain a0,RamDomain a1,RamDomain a2) {
|
79 | RamDomain data[3] = {a0,a1,a2};
|
80 | return insert(data);
|
81 | }
|
82 | bool Type::contains(const t_tuple& t, context& h) const {
|
83 | return ind_0.contains(t, h.hints_0_lower);
|
84 | }
|
85 | bool Type::contains(const t_tuple& t) const {
|
86 | context h;
|
87 | return contains(t, h);
|
88 | }
|
89 | std::size_t Type::size() const {
|
90 | return ind_0.size();
|
91 | }
|
92 | iterator Type::find(const t_tuple& t, context& h) const {
|
93 | return ind_0.find(t, h.hints_0_lower);
|
94 | }
|
95 | iterator Type::find(const t_tuple& t) const {
|
96 | context h;
|
97 | return find(t, h);
|
98 | }
|
99 | range<iterator> Type::lowerUpperRange_000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const {
|
100 | return range<iterator>(ind_0.begin(),ind_0.end());
|
101 | }
|
102 | range<iterator> Type::lowerUpperRange_000(const t_tuple& /* lower */, const t_tuple& /* upper */) const {
|
103 | return range<iterator>(ind_0.begin(),ind_0.end());
|
104 | }
|
105 | range<t_ind_0::iterator> Type::lowerUpperRange_111(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
106 | t_comparator_0 comparator;
|
107 | int cmp = comparator(lower, upper);
|
108 | if (cmp == 0) {
|
109 | auto pos = ind_0.find(lower, h.hints_0_lower);
|
110 | auto fin = ind_0.end();
|
111 | if (pos != fin) {fin = pos; ++fin;}
|
112 | return make_range(pos, fin);
|
113 | }
|
114 | if (cmp > 0) {
|
115 | return make_range(ind_0.end(), ind_0.end());
|
116 | }
|
117 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
118 | }
|
119 | range<t_ind_0::iterator> Type::lowerUpperRange_111(const t_tuple& lower, const t_tuple& upper) const {
|
120 | context h;
|
121 | return lowerUpperRange_111(lower,upper,h);
|
122 | }
|
123 | bool Type::empty() const {
|
124 | return ind_0.empty();
|
125 | }
|
126 | std::vector<range<iterator>> Type::partition() const {
|
127 | return ind_0.getChunks(400);
|
128 | }
|
129 | void Type::purge() {
|
130 | ind_0.clear();
|
131 | }
|
132 | iterator Type::begin() const {
|
133 | return ind_0.begin();
|
134 | }
|
135 | iterator Type::end() const {
|
136 | return ind_0.end();
|
137 | }
|
138 | void Type::printStatistics(std::ostream& o) const {
|
139 | o << " arity 3 direct b-tree index 0 lex-order [0,1,2]\n";
|
140 | ind_0.printStats(o);
|
141 | }
|
142 | } // namespace souffle::t_btree_iii__0_1_2__111
|
143 | namespace souffle::t_btree_iiii__0_1_2_3__1110__1111 {
|
144 | using namespace souffle;
|
145 | struct Type {
|
146 | static constexpr Relation::arity_type Arity = 4;
|
147 | using t_tuple = Tuple<RamDomain, 4>;
|
148 | struct t_comparator_0{
|
149 | int operator()(const t_tuple& a, const t_tuple& b) const {
|
150 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0])) ? -1 : (ramBitCast<RamSigned>(a[0]) > ramBitCast<RamSigned>(b[0])) ? 1 :((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1])) ? -1 : (ramBitCast<RamSigned>(a[1]) > ramBitCast<RamSigned>(b[1])) ? 1 :((ramBitCast<RamSigned>(a[2]) < ramBitCast<RamSigned>(b[2])) ? -1 : (ramBitCast<RamSigned>(a[2]) > ramBitCast<RamSigned>(b[2])) ? 1 :((ramBitCast<RamSigned>(a[3]) < ramBitCast<RamSigned>(b[3])) ? -1 : (ramBitCast<RamSigned>(a[3]) > ramBitCast<RamSigned>(b[3])) ? 1 :(0))));
|
151 | }
|
152 | bool less(const t_tuple& a, const t_tuple& b) const {
|
153 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0]))|| ((ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0])) && ((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1]))|| ((ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1])) && ((ramBitCast<RamSigned>(a[2]) < ramBitCast<RamSigned>(b[2]))|| ((ramBitCast<RamSigned>(a[2]) == ramBitCast<RamSigned>(b[2])) && ((ramBitCast<RamSigned>(a[3]) < ramBitCast<RamSigned>(b[3]))))))));
|
154 | }
|
155 | bool equal(const t_tuple& a, const t_tuple& b) const {
|
156 | return (ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0]))&&(ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1]))&&(ramBitCast<RamSigned>(a[2]) == ramBitCast<RamSigned>(b[2]))&&(ramBitCast<RamSigned>(a[3]) == ramBitCast<RamSigned>(b[3]));
|
157 | }
|
158 | };
|
159 | using t_ind_0 = btree_set<t_tuple,t_comparator_0>;
|
160 | t_ind_0 ind_0;
|
161 | using iterator = t_ind_0::iterator;
|
162 | struct context {
|
163 | t_ind_0::operation_hints hints_0_lower;
|
164 | t_ind_0::operation_hints hints_0_upper;
|
165 | };
|
166 | context createContext() { return context(); }
|
167 | bool insert(const t_tuple& t);
|
168 | bool insert(const t_tuple& t, context& h);
|
169 | bool insert(const RamDomain* ramDomain);
|
170 | bool insert(RamDomain a0,RamDomain a1,RamDomain a2,RamDomain a3);
|
171 | bool contains(const t_tuple& t, context& h) const;
|
172 | bool contains(const t_tuple& t) const;
|
173 | std::size_t size() const;
|
174 | iterator find(const t_tuple& t, context& h) const;
|
175 | iterator find(const t_tuple& t) const;
|
176 | range<iterator> lowerUpperRange_0000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const;
|
177 | range<iterator> lowerUpperRange_0000(const t_tuple& /* lower */, const t_tuple& /* upper */) const;
|
178 | range<t_ind_0::iterator> lowerUpperRange_1110(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
179 | range<t_ind_0::iterator> lowerUpperRange_1110(const t_tuple& lower, const t_tuple& upper) const;
|
180 | range<t_ind_0::iterator> lowerUpperRange_1111(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
181 | range<t_ind_0::iterator> lowerUpperRange_1111(const t_tuple& lower, const t_tuple& upper) const;
|
182 | bool empty() const;
|
183 | std::vector<range<iterator>> partition() const;
|
184 | void purge();
|
185 | iterator begin() const;
|
186 | iterator end() const;
|
187 | void printStatistics(std::ostream& o) const;
|
188 | };
|
189 | } // namespace souffle::t_btree_iiii__0_1_2_3__1110__1111
|
190 | namespace souffle::t_btree_iiii__0_1_2_3__1110__1111 {
|
191 | using namespace souffle;
|
192 | using t_ind_0 = Type::t_ind_0;
|
193 | using iterator = Type::iterator;
|
194 | using context = Type::context;
|
195 | bool Type::insert(const t_tuple& t) {
|
196 | context h;
|
197 | return insert(t, h);
|
198 | }
|
199 | bool Type::insert(const t_tuple& t, context& h) {
|
200 | if (ind_0.insert(t, h.hints_0_lower)) {
|
201 | return true;
|
202 | } else return false;
|
203 | }
|
204 | bool Type::insert(const RamDomain* ramDomain) {
|
205 | RamDomain data[4];
|
206 | std::copy(ramDomain, ramDomain + 4, data);
|
207 | const t_tuple& tuple = reinterpret_cast<const t_tuple&>(data);
|
208 | context h;
|
209 | return insert(tuple, h);
|
210 | }
|
211 | bool Type::insert(RamDomain a0,RamDomain a1,RamDomain a2,RamDomain a3) {
|
212 | RamDomain data[4] = {a0,a1,a2,a3};
|
213 | return insert(data);
|
214 | }
|
215 | bool Type::contains(const t_tuple& t, context& h) const {
|
216 | return ind_0.contains(t, h.hints_0_lower);
|
217 | }
|
218 | bool Type::contains(const t_tuple& t) const {
|
219 | context h;
|
220 | return contains(t, h);
|
221 | }
|
222 | std::size_t Type::size() const {
|
223 | return ind_0.size();
|
224 | }
|
225 | iterator Type::find(const t_tuple& t, context& h) const {
|
226 | return ind_0.find(t, h.hints_0_lower);
|
227 | }
|
228 | iterator Type::find(const t_tuple& t) const {
|
229 | context h;
|
230 | return find(t, h);
|
231 | }
|
232 | range<iterator> Type::lowerUpperRange_0000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const {
|
233 | return range<iterator>(ind_0.begin(),ind_0.end());
|
234 | }
|
235 | range<iterator> Type::lowerUpperRange_0000(const t_tuple& /* lower */, const t_tuple& /* upper */) const {
|
236 | return range<iterator>(ind_0.begin(),ind_0.end());
|
237 | }
|
238 | range<t_ind_0::iterator> Type::lowerUpperRange_1110(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
239 | t_comparator_0 comparator;
|
240 | int cmp = comparator(lower, upper);
|
241 | if (cmp > 0) {
|
242 | return make_range(ind_0.end(), ind_0.end());
|
243 | }
|
244 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
245 | }
|
246 | range<t_ind_0::iterator> Type::lowerUpperRange_1110(const t_tuple& lower, const t_tuple& upper) const {
|
247 | context h;
|
248 | return lowerUpperRange_1110(lower,upper,h);
|
249 | }
|
250 | range<t_ind_0::iterator> Type::lowerUpperRange_1111(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
251 | t_comparator_0 comparator;
|
252 | int cmp = comparator(lower, upper);
|
253 | if (cmp == 0) {
|
254 | auto pos = ind_0.find(lower, h.hints_0_lower);
|
255 | auto fin = ind_0.end();
|
256 | if (pos != fin) {fin = pos; ++fin;}
|
257 | return make_range(pos, fin);
|
258 | }
|
259 | if (cmp > 0) {
|
260 | return make_range(ind_0.end(), ind_0.end());
|
261 | }
|
262 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
263 | }
|
264 | range<t_ind_0::iterator> Type::lowerUpperRange_1111(const t_tuple& lower, const t_tuple& upper) const {
|
265 | context h;
|
266 | return lowerUpperRange_1111(lower,upper,h);
|
267 | }
|
268 | bool Type::empty() const {
|
269 | return ind_0.empty();
|
270 | }
|
271 | std::vector<range<iterator>> Type::partition() const {
|
272 | return ind_0.getChunks(400);
|
273 | }
|
274 | void Type::purge() {
|
275 | ind_0.clear();
|
276 | }
|
277 | iterator Type::begin() const {
|
278 | return ind_0.begin();
|
279 | }
|
280 | iterator Type::end() const {
|
281 | return ind_0.end();
|
282 | }
|
283 | void Type::printStatistics(std::ostream& o) const {
|
284 | o << " arity 4 direct b-tree index 0 lex-order [0,1,2,3]\n";
|
285 | ind_0.printStats(o);
|
286 | }
|
287 | } // namespace souffle::t_btree_iiii__0_1_2_3__1110__1111
|
288 | namespace souffle::t_btree_iiii__0_1_2_3__1111 {
|
289 | using namespace souffle;
|
290 | struct Type {
|
291 | static constexpr Relation::arity_type Arity = 4;
|
292 | using t_tuple = Tuple<RamDomain, 4>;
|
293 | struct t_comparator_0{
|
294 | int operator()(const t_tuple& a, const t_tuple& b) const {
|
295 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0])) ? -1 : (ramBitCast<RamSigned>(a[0]) > ramBitCast<RamSigned>(b[0])) ? 1 :((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1])) ? -1 : (ramBitCast<RamSigned>(a[1]) > ramBitCast<RamSigned>(b[1])) ? 1 :((ramBitCast<RamSigned>(a[2]) < ramBitCast<RamSigned>(b[2])) ? -1 : (ramBitCast<RamSigned>(a[2]) > ramBitCast<RamSigned>(b[2])) ? 1 :((ramBitCast<RamSigned>(a[3]) < ramBitCast<RamSigned>(b[3])) ? -1 : (ramBitCast<RamSigned>(a[3]) > ramBitCast<RamSigned>(b[3])) ? 1 :(0))));
|
296 | }
|
297 | bool less(const t_tuple& a, const t_tuple& b) const {
|
298 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0]))|| ((ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0])) && ((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1]))|| ((ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1])) && ((ramBitCast<RamSigned>(a[2]) < ramBitCast<RamSigned>(b[2]))|| ((ramBitCast<RamSigned>(a[2]) == ramBitCast<RamSigned>(b[2])) && ((ramBitCast<RamSigned>(a[3]) < ramBitCast<RamSigned>(b[3]))))))));
|
299 | }
|
300 | bool equal(const t_tuple& a, const t_tuple& b) const {
|
301 | return (ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0]))&&(ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1]))&&(ramBitCast<RamSigned>(a[2]) == ramBitCast<RamSigned>(b[2]))&&(ramBitCast<RamSigned>(a[3]) == ramBitCast<RamSigned>(b[3]));
|
302 | }
|
303 | };
|
304 | using t_ind_0 = btree_set<t_tuple,t_comparator_0>;
|
305 | t_ind_0 ind_0;
|
306 | using iterator = t_ind_0::iterator;
|
307 | struct context {
|
308 | t_ind_0::operation_hints hints_0_lower;
|
309 | t_ind_0::operation_hints hints_0_upper;
|
310 | };
|
311 | context createContext() { return context(); }
|
312 | bool insert(const t_tuple& t);
|
313 | bool insert(const t_tuple& t, context& h);
|
314 | bool insert(const RamDomain* ramDomain);
|
315 | bool insert(RamDomain a0,RamDomain a1,RamDomain a2,RamDomain a3);
|
316 | bool contains(const t_tuple& t, context& h) const;
|
317 | bool contains(const t_tuple& t) const;
|
318 | std::size_t size() const;
|
319 | iterator find(const t_tuple& t, context& h) const;
|
320 | iterator find(const t_tuple& t) const;
|
321 | range<iterator> lowerUpperRange_0000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const;
|
322 | range<iterator> lowerUpperRange_0000(const t_tuple& /* lower */, const t_tuple& /* upper */) const;
|
323 | range<t_ind_0::iterator> lowerUpperRange_1111(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
324 | range<t_ind_0::iterator> lowerUpperRange_1111(const t_tuple& lower, const t_tuple& upper) const;
|
325 | bool empty() const;
|
326 | std::vector<range<iterator>> partition() const;
|
327 | void purge();
|
328 | iterator begin() const;
|
329 | iterator end() const;
|
330 | void printStatistics(std::ostream& o) const;
|
331 | };
|
332 | } // namespace souffle::t_btree_iiii__0_1_2_3__1111
|
333 | namespace souffle::t_btree_iiii__0_1_2_3__1111 {
|
334 | using namespace souffle;
|
335 | using t_ind_0 = Type::t_ind_0;
|
336 | using iterator = Type::iterator;
|
337 | using context = Type::context;
|
338 | bool Type::insert(const t_tuple& t) {
|
339 | context h;
|
340 | return insert(t, h);
|
341 | }
|
342 | bool Type::insert(const t_tuple& t, context& h) {
|
343 | if (ind_0.insert(t, h.hints_0_lower)) {
|
344 | return true;
|
345 | } else return false;
|
346 | }
|
347 | bool Type::insert(const RamDomain* ramDomain) {
|
348 | RamDomain data[4];
|
349 | std::copy(ramDomain, ramDomain + 4, data);
|
350 | const t_tuple& tuple = reinterpret_cast<const t_tuple&>(data);
|
351 | context h;
|
352 | return insert(tuple, h);
|
353 | }
|
354 | bool Type::insert(RamDomain a0,RamDomain a1,RamDomain a2,RamDomain a3) {
|
355 | RamDomain data[4] = {a0,a1,a2,a3};
|
356 | return insert(data);
|
357 | }
|
358 | bool Type::contains(const t_tuple& t, context& h) const {
|
359 | return ind_0.contains(t, h.hints_0_lower);
|
360 | }
|
361 | bool Type::contains(const t_tuple& t) const {
|
362 | context h;
|
363 | return contains(t, h);
|
364 | }
|
365 | std::size_t Type::size() const {
|
366 | return ind_0.size();
|
367 | }
|
368 | iterator Type::find(const t_tuple& t, context& h) const {
|
369 | return ind_0.find(t, h.hints_0_lower);
|
370 | }
|
371 | iterator Type::find(const t_tuple& t) const {
|
372 | context h;
|
373 | return find(t, h);
|
374 | }
|
375 | range<iterator> Type::lowerUpperRange_0000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const {
|
376 | return range<iterator>(ind_0.begin(),ind_0.end());
|
377 | }
|
378 | range<iterator> Type::lowerUpperRange_0000(const t_tuple& /* lower */, const t_tuple& /* upper */) const {
|
379 | return range<iterator>(ind_0.begin(),ind_0.end());
|
380 | }
|
381 | range<t_ind_0::iterator> Type::lowerUpperRange_1111(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
382 | t_comparator_0 comparator;
|
383 | int cmp = comparator(lower, upper);
|
384 | if (cmp == 0) {
|
385 | auto pos = ind_0.find(lower, h.hints_0_lower);
|
386 | auto fin = ind_0.end();
|
387 | if (pos != fin) {fin = pos; ++fin;}
|
388 | return make_range(pos, fin);
|
389 | }
|
390 | if (cmp > 0) {
|
391 | return make_range(ind_0.end(), ind_0.end());
|
392 | }
|
393 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
394 | }
|
395 | range<t_ind_0::iterator> Type::lowerUpperRange_1111(const t_tuple& lower, const t_tuple& upper) const {
|
396 | context h;
|
397 | return lowerUpperRange_1111(lower,upper,h);
|
398 | }
|
399 | bool Type::empty() const {
|
400 | return ind_0.empty();
|
401 | }
|
402 | std::vector<range<iterator>> Type::partition() const {
|
403 | return ind_0.getChunks(400);
|
404 | }
|
405 | void Type::purge() {
|
406 | ind_0.clear();
|
407 | }
|
408 | iterator Type::begin() const {
|
409 | return ind_0.begin();
|
410 | }
|
411 | iterator Type::end() const {
|
412 | return ind_0.end();
|
413 | }
|
414 | void Type::printStatistics(std::ostream& o) const {
|
415 | o << " arity 4 direct b-tree index 0 lex-order [0,1,2,3]\n";
|
416 | ind_0.printStats(o);
|
417 | }
|
418 | } // namespace souffle::t_btree_iiii__0_1_2_3__1111
|
419 | namespace souffle::t_btree_iiii__0_1_2_3__1000__1111 {
|
420 | using namespace souffle;
|
421 | struct Type {
|
422 | static constexpr Relation::arity_type Arity = 4;
|
423 | using t_tuple = Tuple<RamDomain, 4>;
|
424 | struct t_comparator_0{
|
425 | int operator()(const t_tuple& a, const t_tuple& b) const {
|
426 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0])) ? -1 : (ramBitCast<RamSigned>(a[0]) > ramBitCast<RamSigned>(b[0])) ? 1 :((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1])) ? -1 : (ramBitCast<RamSigned>(a[1]) > ramBitCast<RamSigned>(b[1])) ? 1 :((ramBitCast<RamSigned>(a[2]) < ramBitCast<RamSigned>(b[2])) ? -1 : (ramBitCast<RamSigned>(a[2]) > ramBitCast<RamSigned>(b[2])) ? 1 :((ramBitCast<RamSigned>(a[3]) < ramBitCast<RamSigned>(b[3])) ? -1 : (ramBitCast<RamSigned>(a[3]) > ramBitCast<RamSigned>(b[3])) ? 1 :(0))));
|
427 | }
|
428 | bool less(const t_tuple& a, const t_tuple& b) const {
|
429 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0]))|| ((ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0])) && ((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1]))|| ((ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1])) && ((ramBitCast<RamSigned>(a[2]) < ramBitCast<RamSigned>(b[2]))|| ((ramBitCast<RamSigned>(a[2]) == ramBitCast<RamSigned>(b[2])) && ((ramBitCast<RamSigned>(a[3]) < ramBitCast<RamSigned>(b[3]))))))));
|
430 | }
|
431 | bool equal(const t_tuple& a, const t_tuple& b) const {
|
432 | return (ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0]))&&(ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1]))&&(ramBitCast<RamSigned>(a[2]) == ramBitCast<RamSigned>(b[2]))&&(ramBitCast<RamSigned>(a[3]) == ramBitCast<RamSigned>(b[3]));
|
433 | }
|
434 | };
|
435 | using t_ind_0 = btree_set<t_tuple,t_comparator_0>;
|
436 | t_ind_0 ind_0;
|
437 | using iterator = t_ind_0::iterator;
|
438 | struct context {
|
439 | t_ind_0::operation_hints hints_0_lower;
|
440 | t_ind_0::operation_hints hints_0_upper;
|
441 | };
|
442 | context createContext() { return context(); }
|
443 | bool insert(const t_tuple& t);
|
444 | bool insert(const t_tuple& t, context& h);
|
445 | bool insert(const RamDomain* ramDomain);
|
446 | bool insert(RamDomain a0,RamDomain a1,RamDomain a2,RamDomain a3);
|
447 | bool contains(const t_tuple& t, context& h) const;
|
448 | bool contains(const t_tuple& t) const;
|
449 | std::size_t size() const;
|
450 | iterator find(const t_tuple& t, context& h) const;
|
451 | iterator find(const t_tuple& t) const;
|
452 | range<iterator> lowerUpperRange_0000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const;
|
453 | range<iterator> lowerUpperRange_0000(const t_tuple& /* lower */, const t_tuple& /* upper */) const;
|
454 | range<t_ind_0::iterator> lowerUpperRange_1000(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
455 | range<t_ind_0::iterator> lowerUpperRange_1000(const t_tuple& lower, const t_tuple& upper) const;
|
456 | range<t_ind_0::iterator> lowerUpperRange_1111(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
457 | range<t_ind_0::iterator> lowerUpperRange_1111(const t_tuple& lower, const t_tuple& upper) const;
|
458 | bool empty() const;
|
459 | std::vector<range<iterator>> partition() const;
|
460 | void purge();
|
461 | iterator begin() const;
|
462 | iterator end() const;
|
463 | void printStatistics(std::ostream& o) const;
|
464 | };
|
465 | } // namespace souffle::t_btree_iiii__0_1_2_3__1000__1111
|
466 | namespace souffle::t_btree_iiii__0_1_2_3__1000__1111 {
|
467 | using namespace souffle;
|
468 | using t_ind_0 = Type::t_ind_0;
|
469 | using iterator = Type::iterator;
|
470 | using context = Type::context;
|
471 | bool Type::insert(const t_tuple& t) {
|
472 | context h;
|
473 | return insert(t, h);
|
474 | }
|
475 | bool Type::insert(const t_tuple& t, context& h) {
|
476 | if (ind_0.insert(t, h.hints_0_lower)) {
|
477 | return true;
|
478 | } else return false;
|
479 | }
|
480 | bool Type::insert(const RamDomain* ramDomain) {
|
481 | RamDomain data[4];
|
482 | std::copy(ramDomain, ramDomain + 4, data);
|
483 | const t_tuple& tuple = reinterpret_cast<const t_tuple&>(data);
|
484 | context h;
|
485 | return insert(tuple, h);
|
486 | }
|
487 | bool Type::insert(RamDomain a0,RamDomain a1,RamDomain a2,RamDomain a3) {
|
488 | RamDomain data[4] = {a0,a1,a2,a3};
|
489 | return insert(data);
|
490 | }
|
491 | bool Type::contains(const t_tuple& t, context& h) const {
|
492 | return ind_0.contains(t, h.hints_0_lower);
|
493 | }
|
494 | bool Type::contains(const t_tuple& t) const {
|
495 | context h;
|
496 | return contains(t, h);
|
497 | }
|
498 | std::size_t Type::size() const {
|
499 | return ind_0.size();
|
500 | }
|
501 | iterator Type::find(const t_tuple& t, context& h) const {
|
502 | return ind_0.find(t, h.hints_0_lower);
|
503 | }
|
504 | iterator Type::find(const t_tuple& t) const {
|
505 | context h;
|
506 | return find(t, h);
|
507 | }
|
508 | range<iterator> Type::lowerUpperRange_0000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const {
|
509 | return range<iterator>(ind_0.begin(),ind_0.end());
|
510 | }
|
511 | range<iterator> Type::lowerUpperRange_0000(const t_tuple& /* lower */, const t_tuple& /* upper */) const {
|
512 | return range<iterator>(ind_0.begin(),ind_0.end());
|
513 | }
|
514 | range<t_ind_0::iterator> Type::lowerUpperRange_1000(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
515 | t_comparator_0 comparator;
|
516 | int cmp = comparator(lower, upper);
|
517 | if (cmp > 0) {
|
518 | return make_range(ind_0.end(), ind_0.end());
|
519 | }
|
520 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
521 | }
|
522 | range<t_ind_0::iterator> Type::lowerUpperRange_1000(const t_tuple& lower, const t_tuple& upper) const {
|
523 | context h;
|
524 | return lowerUpperRange_1000(lower,upper,h);
|
525 | }
|
526 | range<t_ind_0::iterator> Type::lowerUpperRange_1111(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
527 | t_comparator_0 comparator;
|
528 | int cmp = comparator(lower, upper);
|
529 | if (cmp == 0) {
|
530 | auto pos = ind_0.find(lower, h.hints_0_lower);
|
531 | auto fin = ind_0.end();
|
532 | if (pos != fin) {fin = pos; ++fin;}
|
533 | return make_range(pos, fin);
|
534 | }
|
535 | if (cmp > 0) {
|
536 | return make_range(ind_0.end(), ind_0.end());
|
537 | }
|
538 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
539 | }
|
540 | range<t_ind_0::iterator> Type::lowerUpperRange_1111(const t_tuple& lower, const t_tuple& upper) const {
|
541 | context h;
|
542 | return lowerUpperRange_1111(lower,upper,h);
|
543 | }
|
544 | bool Type::empty() const {
|
545 | return ind_0.empty();
|
546 | }
|
547 | std::vector<range<iterator>> Type::partition() const {
|
548 | return ind_0.getChunks(400);
|
549 | }
|
550 | void Type::purge() {
|
551 | ind_0.clear();
|
552 | }
|
553 | iterator Type::begin() const {
|
554 | return ind_0.begin();
|
555 | }
|
556 | iterator Type::end() const {
|
557 | return ind_0.end();
|
558 | }
|
559 | void Type::printStatistics(std::ostream& o) const {
|
560 | o << " arity 4 direct b-tree index 0 lex-order [0,1,2,3]\n";
|
561 | ind_0.printStats(o);
|
562 | }
|
563 | } // namespace souffle::t_btree_iiii__0_1_2_3__1000__1111
|
564 | namespace souffle::t_btree_iiiiii__0_1_2_3_4_5__111111 {
|
565 | using namespace souffle;
|
566 | struct Type {
|
567 | static constexpr Relation::arity_type Arity = 6;
|
568 | using t_tuple = Tuple<RamDomain, 6>;
|
569 | struct t_comparator_0{
|
570 | int operator()(const t_tuple& a, const t_tuple& b) const {
|
571 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0])) ? -1 : (ramBitCast<RamSigned>(a[0]) > ramBitCast<RamSigned>(b[0])) ? 1 :((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1])) ? -1 : (ramBitCast<RamSigned>(a[1]) > ramBitCast<RamSigned>(b[1])) ? 1 :((ramBitCast<RamSigned>(a[2]) < ramBitCast<RamSigned>(b[2])) ? -1 : (ramBitCast<RamSigned>(a[2]) > ramBitCast<RamSigned>(b[2])) ? 1 :((ramBitCast<RamSigned>(a[3]) < ramBitCast<RamSigned>(b[3])) ? -1 : (ramBitCast<RamSigned>(a[3]) > ramBitCast<RamSigned>(b[3])) ? 1 :((ramBitCast<RamSigned>(a[4]) < ramBitCast<RamSigned>(b[4])) ? -1 : (ramBitCast<RamSigned>(a[4]) > ramBitCast<RamSigned>(b[4])) ? 1 :((ramBitCast<RamSigned>(a[5]) < ramBitCast<RamSigned>(b[5])) ? -1 : (ramBitCast<RamSigned>(a[5]) > ramBitCast<RamSigned>(b[5])) ? 1 :(0))))));
|
572 | }
|
573 | bool less(const t_tuple& a, const t_tuple& b) const {
|
574 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0]))|| ((ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0])) && ((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1]))|| ((ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1])) && ((ramBitCast<RamSigned>(a[2]) < ramBitCast<RamSigned>(b[2]))|| ((ramBitCast<RamSigned>(a[2]) == ramBitCast<RamSigned>(b[2])) && ((ramBitCast<RamSigned>(a[3]) < ramBitCast<RamSigned>(b[3]))|| ((ramBitCast<RamSigned>(a[3]) == ramBitCast<RamSigned>(b[3])) && ((ramBitCast<RamSigned>(a[4]) < ramBitCast<RamSigned>(b[4]))|| ((ramBitCast<RamSigned>(a[4]) == ramBitCast<RamSigned>(b[4])) && ((ramBitCast<RamSigned>(a[5]) < ramBitCast<RamSigned>(b[5]))))))))))));
|
575 | }
|
576 | bool equal(const t_tuple& a, const t_tuple& b) const {
|
577 | return (ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0]))&&(ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1]))&&(ramBitCast<RamSigned>(a[2]) == ramBitCast<RamSigned>(b[2]))&&(ramBitCast<RamSigned>(a[3]) == ramBitCast<RamSigned>(b[3]))&&(ramBitCast<RamSigned>(a[4]) == ramBitCast<RamSigned>(b[4]))&&(ramBitCast<RamSigned>(a[5]) == ramBitCast<RamSigned>(b[5]));
|
578 | }
|
579 | };
|
580 | using t_ind_0 = btree_set<t_tuple,t_comparator_0>;
|
581 | t_ind_0 ind_0;
|
582 | using iterator = t_ind_0::iterator;
|
583 | struct context {
|
584 | t_ind_0::operation_hints hints_0_lower;
|
585 | t_ind_0::operation_hints hints_0_upper;
|
586 | };
|
587 | context createContext() { return context(); }
|
588 | bool insert(const t_tuple& t);
|
589 | bool insert(const t_tuple& t, context& h);
|
590 | bool insert(const RamDomain* ramDomain);
|
591 | bool insert(RamDomain a0,RamDomain a1,RamDomain a2,RamDomain a3,RamDomain a4,RamDomain a5);
|
592 | bool contains(const t_tuple& t, context& h) const;
|
593 | bool contains(const t_tuple& t) const;
|
594 | std::size_t size() const;
|
595 | iterator find(const t_tuple& t, context& h) const;
|
596 | iterator find(const t_tuple& t) const;
|
597 | range<iterator> lowerUpperRange_000000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const;
|
598 | range<iterator> lowerUpperRange_000000(const t_tuple& /* lower */, const t_tuple& /* upper */) const;
|
599 | range<t_ind_0::iterator> lowerUpperRange_111111(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
600 | range<t_ind_0::iterator> lowerUpperRange_111111(const t_tuple& lower, const t_tuple& upper) const;
|
601 | bool empty() const;
|
602 | std::vector<range<iterator>> partition() const;
|
603 | void purge();
|
604 | iterator begin() const;
|
605 | iterator end() const;
|
606 | void printStatistics(std::ostream& o) const;
|
607 | };
|
608 | } // namespace souffle::t_btree_iiiiii__0_1_2_3_4_5__111111
|
609 | namespace souffle::t_btree_iiiiii__0_1_2_3_4_5__111111 {
|
610 | using namespace souffle;
|
611 | using t_ind_0 = Type::t_ind_0;
|
612 | using iterator = Type::iterator;
|
613 | using context = Type::context;
|
614 | bool Type::insert(const t_tuple& t) {
|
615 | context h;
|
616 | return insert(t, h);
|
617 | }
|
618 | bool Type::insert(const t_tuple& t, context& h) {
|
619 | if (ind_0.insert(t, h.hints_0_lower)) {
|
620 | return true;
|
621 | } else return false;
|
622 | }
|
623 | bool Type::insert(const RamDomain* ramDomain) {
|
624 | RamDomain data[6];
|
625 | std::copy(ramDomain, ramDomain + 6, data);
|
626 | const t_tuple& tuple = reinterpret_cast<const t_tuple&>(data);
|
627 | context h;
|
628 | return insert(tuple, h);
|
629 | }
|
630 | bool Type::insert(RamDomain a0,RamDomain a1,RamDomain a2,RamDomain a3,RamDomain a4,RamDomain a5) {
|
631 | RamDomain data[6] = {a0,a1,a2,a3,a4,a5};
|
632 | return insert(data);
|
633 | }
|
634 | bool Type::contains(const t_tuple& t, context& h) const {
|
635 | return ind_0.contains(t, h.hints_0_lower);
|
636 | }
|
637 | bool Type::contains(const t_tuple& t) const {
|
638 | context h;
|
639 | return contains(t, h);
|
640 | }
|
641 | std::size_t Type::size() const {
|
642 | return ind_0.size();
|
643 | }
|
644 | iterator Type::find(const t_tuple& t, context& h) const {
|
645 | return ind_0.find(t, h.hints_0_lower);
|
646 | }
|
647 | iterator Type::find(const t_tuple& t) const {
|
648 | context h;
|
649 | return find(t, h);
|
650 | }
|
651 | range<iterator> Type::lowerUpperRange_000000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const {
|
652 | return range<iterator>(ind_0.begin(),ind_0.end());
|
653 | }
|
654 | range<iterator> Type::lowerUpperRange_000000(const t_tuple& /* lower */, const t_tuple& /* upper */) const {
|
655 | return range<iterator>(ind_0.begin(),ind_0.end());
|
656 | }
|
657 | range<t_ind_0::iterator> Type::lowerUpperRange_111111(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
658 | t_comparator_0 comparator;
|
659 | int cmp = comparator(lower, upper);
|
660 | if (cmp == 0) {
|
661 | auto pos = ind_0.find(lower, h.hints_0_lower);
|
662 | auto fin = ind_0.end();
|
663 | if (pos != fin) {fin = pos; ++fin;}
|
664 | return make_range(pos, fin);
|
665 | }
|
666 | if (cmp > 0) {
|
667 | return make_range(ind_0.end(), ind_0.end());
|
668 | }
|
669 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
670 | }
|
671 | range<t_ind_0::iterator> Type::lowerUpperRange_111111(const t_tuple& lower, const t_tuple& upper) const {
|
672 | context h;
|
673 | return lowerUpperRange_111111(lower,upper,h);
|
674 | }
|
675 | bool Type::empty() const {
|
676 | return ind_0.empty();
|
677 | }
|
678 | std::vector<range<iterator>> Type::partition() const {
|
679 | return ind_0.getChunks(400);
|
680 | }
|
681 | void Type::purge() {
|
682 | ind_0.clear();
|
683 | }
|
684 | iterator Type::begin() const {
|
685 | return ind_0.begin();
|
686 | }
|
687 | iterator Type::end() const {
|
688 | return ind_0.end();
|
689 | }
|
690 | void Type::printStatistics(std::ostream& o) const {
|
691 | o << " arity 6 direct b-tree index 0 lex-order [0,1,2,3,4,5]\n";
|
692 | ind_0.printStats(o);
|
693 | }
|
694 | } // namespace souffle::t_btree_iiiiii__0_1_2_3_4_5__111111
|
695 | namespace souffle {
|
696 | using namespace souffle;
|
697 | class Stratum_CFGraph_edge_4d26e319bb257c49 {
|
698 | public:
|
699 | Stratum_CFGraph_edge_4d26e319bb257c49(SymbolTable& symTable,RecordTable& recordTable,ConcurrentCache<std::string,std::regex>& regexCache,bool& pruneImdtRels,bool& performIO,SignalHandler*& signalHandler,std::atomic<std::size_t>& iter,std::atomic<RamDomain>& ctr,std::string& inputDirectory,std::string& outputDirectory,t_btree_iiii__0_1_2_3__1110__1111::Type& rel_CFGraph_edge_db08b41d50d8a475,t_btree_iii__0_1_2__111::Type& rel_cf_edge_4931a04c8c74bb72);
|
700 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
701 | private:
|
702 | SymbolTable& symTable;
|
703 | RecordTable& recordTable;
|
704 | ConcurrentCache<std::string,std::regex>& regexCache;
|
705 | bool& pruneImdtRels;
|
706 | bool& performIO;
|
707 | SignalHandler*& signalHandler;
|
708 | std::atomic<std::size_t>& iter;
|
709 | std::atomic<RamDomain>& ctr;
|
710 | std::string& inputDirectory;
|
711 | std::string& outputDirectory;
|
712 | t_btree_iiii__0_1_2_3__1110__1111::Type* rel_CFGraph_edge_db08b41d50d8a475;
|
713 | t_btree_iii__0_1_2__111::Type* rel_cf_edge_4931a04c8c74bb72;
|
714 | };
|
715 | } // namespace souffle
|
716 | namespace souffle {
|
717 | using namespace souffle;
|
718 | Stratum_CFGraph_edge_4d26e319bb257c49::Stratum_CFGraph_edge_4d26e319bb257c49(SymbolTable& symTable,RecordTable& recordTable,ConcurrentCache<std::string,std::regex>& regexCache,bool& pruneImdtRels,bool& performIO,SignalHandler*& signalHandler,std::atomic<std::size_t>& iter,std::atomic<RamDomain>& ctr,std::string& inputDirectory,std::string& outputDirectory,t_btree_iiii__0_1_2_3__1110__1111::Type& rel_CFGraph_edge_db08b41d50d8a475,t_btree_iii__0_1_2__111::Type& rel_cf_edge_4931a04c8c74bb72):
|
719 | symTable(symTable),
|
720 | recordTable(recordTable),
|
721 | regexCache(regexCache),
|
722 | pruneImdtRels(pruneImdtRels),
|
723 | performIO(performIO),
|
724 | signalHandler(signalHandler),
|
725 | iter(iter),
|
726 | ctr(ctr),
|
727 | inputDirectory(inputDirectory),
|
728 | outputDirectory(outputDirectory),
|
729 | rel_CFGraph_edge_db08b41d50d8a475(&rel_CFGraph_edge_db08b41d50d8a475),
|
730 | rel_cf_edge_4931a04c8c74bb72(&rel_cf_edge_4931a04c8c74bb72){
|
731 | }
|
732 |
|
733 | void Stratum_CFGraph_edge_4d26e319bb257c49::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
734 | signalHandler->setMsg(R"_(CFGraph.edge(f,s1,f,s2) :-
|
735 | cf_edge(f,s1,s2).
|
736 | in file control-flow.dl [34:1-34:50])_");
|
737 | if(!(rel_cf_edge_4931a04c8c74bb72->empty())) {
|
738 | [&](){
|
739 | CREATE_OP_CONTEXT(rel_CFGraph_edge_db08b41d50d8a475_op_ctxt,rel_CFGraph_edge_db08b41d50d8a475->createContext());
|
740 | CREATE_OP_CONTEXT(rel_cf_edge_4931a04c8c74bb72_op_ctxt,rel_cf_edge_4931a04c8c74bb72->createContext());
|
741 | for(const auto& env0 : *rel_cf_edge_4931a04c8c74bb72) {
|
742 | Tuple<RamDomain,4> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[0]),ramBitCast(env0[2])}};
|
743 | rel_CFGraph_edge_db08b41d50d8a475->insert(tuple,READ_OP_CONTEXT(rel_CFGraph_edge_db08b41d50d8a475_op_ctxt));
|
744 | }
|
745 | }
|
746 | ();}
|
747 | if (pruneImdtRels) rel_cf_edge_4931a04c8c74bb72->purge();
|
748 | }
|
749 |
|
750 | } // namespace souffle
|
751 |
|
752 | namespace souffle {
|
753 | using namespace souffle;
|
754 | class Stratum_CFGraph_reachable_7410d937e4ac8127 {
|
755 | public:
|
756 | Stratum_CFGraph_reachable_7410d937e4ac8127(SymbolTable& symTable,RecordTable& recordTable,ConcurrentCache<std::string,std::regex>& regexCache,bool& pruneImdtRels,bool& performIO,SignalHandler*& signalHandler,std::atomic<std::size_t>& iter,std::atomic<RamDomain>& ctr,std::string& inputDirectory,std::string& outputDirectory,t_btree_iiii__0_1_2_3__1111::Type& rel_delta_CFGraph_reachable_3f3bf343bbb37861,t_btree_iiii__0_1_2_3__1111::Type& rel_new_CFGraph_reachable_c98538911662603c,t_btree_iiii__0_1_2_3__1110__1111::Type& rel_CFGraph_edge_db08b41d50d8a475,t_btree_iiii__0_1_2_3__1111::Type& rel_CFGraph_reachable_c344462befee4909);
|
757 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
758 | private:
|
759 | SymbolTable& symTable;
|
760 | RecordTable& recordTable;
|
761 | ConcurrentCache<std::string,std::regex>& regexCache;
|
762 | bool& pruneImdtRels;
|
763 | bool& performIO;
|
764 | SignalHandler*& signalHandler;
|
765 | std::atomic<std::size_t>& iter;
|
766 | std::atomic<RamDomain>& ctr;
|
767 | std::string& inputDirectory;
|
768 | std::string& outputDirectory;
|
769 | t_btree_iiii__0_1_2_3__1111::Type* rel_delta_CFGraph_reachable_3f3bf343bbb37861;
|
770 | t_btree_iiii__0_1_2_3__1111::Type* rel_new_CFGraph_reachable_c98538911662603c;
|
771 | t_btree_iiii__0_1_2_3__1110__1111::Type* rel_CFGraph_edge_db08b41d50d8a475;
|
772 | t_btree_iiii__0_1_2_3__1111::Type* rel_CFGraph_reachable_c344462befee4909;
|
773 | };
|
774 | } // namespace souffle
|
775 | namespace souffle {
|
776 | using namespace souffle;
|
777 | Stratum_CFGraph_reachable_7410d937e4ac8127::Stratum_CFGraph_reachable_7410d937e4ac8127(SymbolTable& symTable,RecordTable& recordTable,ConcurrentCache<std::string,std::regex>& regexCache,bool& pruneImdtRels,bool& performIO,SignalHandler*& signalHandler,std::atomic<std::size_t>& iter,std::atomic<RamDomain>& ctr,std::string& inputDirectory,std::string& outputDirectory,t_btree_iiii__0_1_2_3__1111::Type& rel_delta_CFGraph_reachable_3f3bf343bbb37861,t_btree_iiii__0_1_2_3__1111::Type& rel_new_CFGraph_reachable_c98538911662603c,t_btree_iiii__0_1_2_3__1110__1111::Type& rel_CFGraph_edge_db08b41d50d8a475,t_btree_iiii__0_1_2_3__1111::Type& rel_CFGraph_reachable_c344462befee4909):
|
778 | symTable(symTable),
|
779 | recordTable(recordTable),
|
780 | regexCache(regexCache),
|
781 | pruneImdtRels(pruneImdtRels),
|
782 | performIO(performIO),
|
783 | signalHandler(signalHandler),
|
784 | iter(iter),
|
785 | ctr(ctr),
|
786 | inputDirectory(inputDirectory),
|
787 | outputDirectory(outputDirectory),
|
788 | rel_delta_CFGraph_reachable_3f3bf343bbb37861(&rel_delta_CFGraph_reachable_3f3bf343bbb37861),
|
789 | rel_new_CFGraph_reachable_c98538911662603c(&rel_new_CFGraph_reachable_c98538911662603c),
|
790 | rel_CFGraph_edge_db08b41d50d8a475(&rel_CFGraph_edge_db08b41d50d8a475),
|
791 | rel_CFGraph_reachable_c344462befee4909(&rel_CFGraph_reachable_c344462befee4909){
|
792 | }
|
793 |
|
794 | void Stratum_CFGraph_reachable_7410d937e4ac8127::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
795 | signalHandler->setMsg(R"_(CFGraph.reachable(f,s1,g,s2) :-
|
796 | CFGraph.edge(f,s1,g,s2).
|
797 | in file control-flow.dl [15:2-15:48])_");
|
798 | if(!(rel_CFGraph_edge_db08b41d50d8a475->empty())) {
|
799 | [&](){
|
800 | CREATE_OP_CONTEXT(rel_CFGraph_edge_db08b41d50d8a475_op_ctxt,rel_CFGraph_edge_db08b41d50d8a475->createContext());
|
801 | CREATE_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt,rel_CFGraph_reachable_c344462befee4909->createContext());
|
802 | for(const auto& env0 : *rel_CFGraph_edge_db08b41d50d8a475) {
|
803 | Tuple<RamDomain,4> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2]),ramBitCast(env0[3])}};
|
804 | rel_CFGraph_reachable_c344462befee4909->insert(tuple,READ_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt));
|
805 | }
|
806 | }
|
807 | ();}
|
808 | [&](){
|
809 | CREATE_OP_CONTEXT(rel_delta_CFGraph_reachable_3f3bf343bbb37861_op_ctxt,rel_delta_CFGraph_reachable_3f3bf343bbb37861->createContext());
|
810 | CREATE_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt,rel_CFGraph_reachable_c344462befee4909->createContext());
|
811 | for(const auto& env0 : *rel_CFGraph_reachable_c344462befee4909) {
|
812 | Tuple<RamDomain,4> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2]),ramBitCast(env0[3])}};
|
813 | rel_delta_CFGraph_reachable_3f3bf343bbb37861->insert(tuple,READ_OP_CONTEXT(rel_delta_CFGraph_reachable_3f3bf343bbb37861_op_ctxt));
|
814 | }
|
815 | }
|
816 | ();auto loop_counter = RamUnsigned(1);
|
817 | iter = 0;
|
818 | for(;;) {
|
819 | signalHandler->setMsg(R"_(CFGraph.reachable(f,s1,f,s3) :-
|
820 | CFGraph.reachable(f,s1,f,s2),
|
821 | CFGraph.edge(f,s2,f,s3).
|
822 | in file control-flow.dl [16:2-16:73])_");
|
823 | if(!(rel_delta_CFGraph_reachable_3f3bf343bbb37861->empty()) && !(rel_CFGraph_edge_db08b41d50d8a475->empty())) {
|
824 | [&](){
|
825 | CREATE_OP_CONTEXT(rel_delta_CFGraph_reachable_3f3bf343bbb37861_op_ctxt,rel_delta_CFGraph_reachable_3f3bf343bbb37861->createContext());
|
826 | CREATE_OP_CONTEXT(rel_new_CFGraph_reachable_c98538911662603c_op_ctxt,rel_new_CFGraph_reachable_c98538911662603c->createContext());
|
827 | CREATE_OP_CONTEXT(rel_CFGraph_edge_db08b41d50d8a475_op_ctxt,rel_CFGraph_edge_db08b41d50d8a475->createContext());
|
828 | CREATE_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt,rel_CFGraph_reachable_c344462befee4909->createContext());
|
829 | for(const auto& env0 : *rel_delta_CFGraph_reachable_3f3bf343bbb37861) {
|
830 | if( (ramBitCast<RamDomain>(env0[0]) == ramBitCast<RamDomain>(env0[2]))) {
|
831 | auto range = rel_CFGraph_edge_db08b41d50d8a475->lowerUpperRange_1110(Tuple<RamDomain,4>{{ramBitCast(env0[0]), ramBitCast(env0[3]), ramBitCast(env0[0]), ramBitCast<RamDomain>(MIN_RAM_SIGNED)}},Tuple<RamDomain,4>{{ramBitCast(env0[0]), ramBitCast(env0[3]), ramBitCast(env0[0]), ramBitCast<RamDomain>(MAX_RAM_SIGNED)}},READ_OP_CONTEXT(rel_CFGraph_edge_db08b41d50d8a475_op_ctxt));
|
832 | for(const auto& env1 : range) {
|
833 | if( !(rel_CFGraph_reachable_c344462befee4909->contains(Tuple<RamDomain,4>{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[0]),ramBitCast(env1[3])}},READ_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt)))) {
|
834 | Tuple<RamDomain,4> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[0]),ramBitCast(env1[3])}};
|
835 | rel_new_CFGraph_reachable_c98538911662603c->insert(tuple,READ_OP_CONTEXT(rel_new_CFGraph_reachable_c98538911662603c_op_ctxt));
|
836 | }
|
837 | }
|
838 | }
|
839 | }
|
840 | }
|
841 | ();}
|
842 | if(rel_new_CFGraph_reachable_c98538911662603c->empty()) break;
|
843 | [&](){
|
844 | CREATE_OP_CONTEXT(rel_new_CFGraph_reachable_c98538911662603c_op_ctxt,rel_new_CFGraph_reachable_c98538911662603c->createContext());
|
845 | CREATE_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt,rel_CFGraph_reachable_c344462befee4909->createContext());
|
846 | for(const auto& env0 : *rel_new_CFGraph_reachable_c98538911662603c) {
|
847 | Tuple<RamDomain,4> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2]),ramBitCast(env0[3])}};
|
848 | rel_CFGraph_reachable_c344462befee4909->insert(tuple,READ_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt));
|
849 | }
|
850 | }
|
851 | ();std::swap(rel_delta_CFGraph_reachable_3f3bf343bbb37861, rel_new_CFGraph_reachable_c98538911662603c);
|
852 | rel_new_CFGraph_reachable_c98538911662603c->purge();
|
853 | loop_counter = (ramBitCast<RamUnsigned>(loop_counter) + ramBitCast<RamUnsigned>(RamUnsigned(1)));
|
854 | iter++;
|
855 | }
|
856 | iter = 0;
|
857 | rel_delta_CFGraph_reachable_3f3bf343bbb37861->purge();
|
858 | rel_new_CFGraph_reachable_c98538911662603c->purge();
|
859 | if (pruneImdtRels) rel_CFGraph_edge_db08b41d50d8a475->purge();
|
860 | }
|
861 |
|
862 | } // namespace souffle
|
863 |
|
864 | namespace souffle {
|
865 | using namespace souffle;
|
866 | class Stratum_alias_ba5aaebc28a379e5 {
|
867 | public:
|
868 | Stratum_alias_ba5aaebc28a379e5(SymbolTable& symTable,RecordTable& recordTable,ConcurrentCache<std::string,std::regex>& regexCache,bool& pruneImdtRels,bool& performIO,SignalHandler*& signalHandler,std::atomic<std::size_t>& iter,std::atomic<RamDomain>& ctr,std::string& inputDirectory,std::string& outputDirectory,t_btree_iiii__0_1_2_3__1111::Type& rel_CFGraph_reachable_c344462befee4909,t_btree_iiiiii__0_1_2_3_4_5__111111::Type& rel_alias_36893f0f24e80d93,t_btree_iiii__0_1_2_3__1000__1111::Type& rel_assign_e4bb6e0824a16a37,t_btree_iii__0_1_2__111::Type& rel_define_04bf38853652ecf1);
|
869 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
870 | private:
|
871 | SymbolTable& symTable;
|
872 | RecordTable& recordTable;
|
873 | ConcurrentCache<std::string,std::regex>& regexCache;
|
874 | bool& pruneImdtRels;
|
875 | bool& performIO;
|
876 | SignalHandler*& signalHandler;
|
877 | std::atomic<std::size_t>& iter;
|
878 | std::atomic<RamDomain>& ctr;
|
879 | std::string& inputDirectory;
|
880 | std::string& outputDirectory;
|
881 | t_btree_iiii__0_1_2_3__1111::Type* rel_CFGraph_reachable_c344462befee4909;
|
882 | t_btree_iiiiii__0_1_2_3_4_5__111111::Type* rel_alias_36893f0f24e80d93;
|
883 | t_btree_iiii__0_1_2_3__1000__1111::Type* rel_assign_e4bb6e0824a16a37;
|
884 | t_btree_iii__0_1_2__111::Type* rel_define_04bf38853652ecf1;
|
885 | };
|
886 | } // namespace souffle
|
887 | namespace souffle {
|
888 | using namespace souffle;
|
889 | Stratum_alias_ba5aaebc28a379e5::Stratum_alias_ba5aaebc28a379e5(SymbolTable& symTable,RecordTable& recordTable,ConcurrentCache<std::string,std::regex>& regexCache,bool& pruneImdtRels,bool& performIO,SignalHandler*& signalHandler,std::atomic<std::size_t>& iter,std::atomic<RamDomain>& ctr,std::string& inputDirectory,std::string& outputDirectory,t_btree_iiii__0_1_2_3__1111::Type& rel_CFGraph_reachable_c344462befee4909,t_btree_iiiiii__0_1_2_3_4_5__111111::Type& rel_alias_36893f0f24e80d93,t_btree_iiii__0_1_2_3__1000__1111::Type& rel_assign_e4bb6e0824a16a37,t_btree_iii__0_1_2__111::Type& rel_define_04bf38853652ecf1):
|
890 | symTable(symTable),
|
891 | recordTable(recordTable),
|
892 | regexCache(regexCache),
|
893 | pruneImdtRels(pruneImdtRels),
|
894 | performIO(performIO),
|
895 | signalHandler(signalHandler),
|
896 | iter(iter),
|
897 | ctr(ctr),
|
898 | inputDirectory(inputDirectory),
|
899 | outputDirectory(outputDirectory),
|
900 | rel_CFGraph_reachable_c344462befee4909(&rel_CFGraph_reachable_c344462befee4909),
|
901 | rel_alias_36893f0f24e80d93(&rel_alias_36893f0f24e80d93),
|
902 | rel_assign_e4bb6e0824a16a37(&rel_assign_e4bb6e0824a16a37),
|
903 | rel_define_04bf38853652ecf1(&rel_define_04bf38853652ecf1){
|
904 | }
|
905 |
|
906 | void Stratum_alias_ba5aaebc28a379e5::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
907 | signalHandler->setMsg(R"_(alias(f,s1,$Variable(v),f,s2,$Variable(v2)) :-
|
908 | define(f,s1,$Variable(v)),
|
909 | assign(f,s2,$Variable(v2),$Variable(v)),
|
910 | CFGraph.reachable(f,s1,f,s2).
|
911 | in file dataflow.dl [35:1-38:34])_");
|
912 | if(!(rel_assign_e4bb6e0824a16a37->empty()) && !(rel_CFGraph_reachable_c344462befee4909->empty()) && !(rel_define_04bf38853652ecf1->empty())) {
|
913 | [&](){
|
914 | CREATE_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt,rel_CFGraph_reachable_c344462befee4909->createContext());
|
915 | CREATE_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt,rel_alias_36893f0f24e80d93->createContext());
|
916 | CREATE_OP_CONTEXT(rel_assign_e4bb6e0824a16a37_op_ctxt,rel_assign_e4bb6e0824a16a37->createContext());
|
917 | CREATE_OP_CONTEXT(rel_define_04bf38853652ecf1_op_ctxt,rel_define_04bf38853652ecf1->createContext());
|
918 | for(const auto& env0 : *rel_define_04bf38853652ecf1) {
|
919 | RamDomain const ref = env0[2];
|
920 | if (ref == 0) continue;
|
921 | const RamDomain *env1 = recordTable.unpack(ref,2);
|
922 | {
|
923 | if( (ramBitCast<RamDomain>(env1[0]) == ramBitCast<RamDomain>(RamSigned(1)))) {
|
924 | auto range = rel_assign_e4bb6e0824a16a37->lowerUpperRange_1000(Tuple<RamDomain,4>{{ramBitCast(env0[0]), ramBitCast<RamDomain>(MIN_RAM_SIGNED), ramBitCast<RamDomain>(MIN_RAM_SIGNED), ramBitCast<RamDomain>(MIN_RAM_SIGNED)}},Tuple<RamDomain,4>{{ramBitCast(env0[0]), ramBitCast<RamDomain>(MAX_RAM_SIGNED), ramBitCast<RamDomain>(MAX_RAM_SIGNED), ramBitCast<RamDomain>(MAX_RAM_SIGNED)}},READ_OP_CONTEXT(rel_assign_e4bb6e0824a16a37_op_ctxt));
|
925 | for(const auto& env2 : range) {
|
926 | if( rel_CFGraph_reachable_c344462befee4909->contains(Tuple<RamDomain,4>{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[0]),ramBitCast(env2[1])}},READ_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt))) {
|
927 | RamDomain const ref = env2[2];
|
928 | if (ref == 0) continue;
|
929 | const RamDomain *env3 = recordTable.unpack(ref,2);
|
930 | {
|
931 | if( (ramBitCast<RamDomain>(env3[0]) == ramBitCast<RamDomain>(RamSigned(1)))) {
|
932 | RamDomain const ref = env2[3];
|
933 | if (ref == 0) continue;
|
934 | const RamDomain *env4 = recordTable.unpack(ref,2);
|
935 | {
|
936 | if( (ramBitCast<RamDomain>(env4[0]) == ramBitCast<RamDomain>(RamSigned(1))) && (ramBitCast<RamDomain>(env1[1]) == ramBitCast<RamDomain>(env4[1]))) {
|
937 | Tuple<RamDomain,6> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(pack(recordTable,Tuple<RamDomain,2>{{ramBitCast(ramBitCast(RamSigned(1))),ramBitCast(ramBitCast(env1[1]))}}
|
938 | )),ramBitCast(env0[0]),ramBitCast(env2[1]),ramBitCast(pack(recordTable,Tuple<RamDomain,2>{{ramBitCast(ramBitCast(RamSigned(1))),ramBitCast(ramBitCast(env3[1]))}}
|
939 | ))}};
|
940 | rel_alias_36893f0f24e80d93->insert(tuple,READ_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt));
|
941 | }
|
942 | }
|
943 | }
|
944 | }
|
945 | }
|
946 | }
|
947 | }
|
948 | }
|
949 | }
|
950 | }
|
951 | ();}
|
952 | signalHandler->setMsg(R"_(alias("heap",-1,$Member(c, m),f,s2,r) :-
|
953 | assign(_,_,$Member(c, m),_),
|
954 | assign(f,s2,r,$Member(c, m)).
|
955 | in file dataflow.dl [42:1-44:34])_");
|
956 | if(!(rel_assign_e4bb6e0824a16a37->empty())) {
|
957 | [&](){
|
958 | CREATE_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt,rel_alias_36893f0f24e80d93->createContext());
|
959 | CREATE_OP_CONTEXT(rel_assign_e4bb6e0824a16a37_op_ctxt,rel_assign_e4bb6e0824a16a37->createContext());
|
960 | for(const auto& env0 : *rel_assign_e4bb6e0824a16a37) {
|
961 | RamDomain const ref = env0[2];
|
962 | if (ref == 0) continue;
|
963 | const RamDomain *env1 = recordTable.unpack(ref,2);
|
964 | {
|
965 | if( (ramBitCast<RamDomain>(env1[0]) == ramBitCast<RamDomain>(RamSigned(0)))) {
|
966 | RamDomain const ref = env1[1];
|
967 | if (ref == 0) continue;
|
968 | const RamDomain *env2 = recordTable.unpack(ref,2);
|
969 | {
|
970 | for(const auto& env3 : *rel_assign_e4bb6e0824a16a37) {
|
971 | RamDomain const ref = env3[3];
|
972 | if (ref == 0) continue;
|
973 | const RamDomain *env4 = recordTable.unpack(ref,2);
|
974 | {
|
975 | if( (ramBitCast<RamDomain>(env4[0]) == ramBitCast<RamDomain>(RamSigned(0)))) {
|
976 | RamDomain const ref = env4[1];
|
977 | if (ref == 0) continue;
|
978 | const RamDomain *env5 = recordTable.unpack(ref,2);
|
979 | {
|
980 | if( (ramBitCast<RamDomain>(env2[1]) == ramBitCast<RamDomain>(env5[1])) && (ramBitCast<RamDomain>(env2[0]) == ramBitCast<RamDomain>(env5[0]))) {
|
981 | Tuple<RamDomain,6> tuple{{ramBitCast(RamSigned(0)),ramBitCast(RamSigned(-1)),ramBitCast(pack(recordTable,Tuple<RamDomain,2>{{ramBitCast(ramBitCast(RamSigned(0))),ramBitCast(ramBitCast(pack(recordTable,Tuple<RamDomain,2>{{ramBitCast(ramBitCast(env2[0])),ramBitCast(ramBitCast(env2[1]))}}
|
982 | )))}}
|
983 | )),ramBitCast(env3[0]),ramBitCast(env3[1]),ramBitCast(env3[2])}};
|
984 | rel_alias_36893f0f24e80d93->insert(tuple,READ_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt));
|
985 | }
|
986 | }
|
987 | }
|
988 | }
|
989 | }
|
990 | }
|
991 | }
|
992 | }
|
993 | }
|
994 | }
|
995 | ();}
|
996 | signalHandler->setMsg(R"_(alias(f,s1,$Variable(v),"heap",-1,$Member(c, m)) :-
|
997 | define(f,s1,$Variable(v)),
|
998 | assign(f,s2,$Member(c, m),$Variable(v)),
|
999 | CFGraph.reachable(f,s1,f,s2).
|
1000 | in file dataflow.dl [48:1-51:34])_");
|
1001 | if(!(rel_assign_e4bb6e0824a16a37->empty()) && !(rel_CFGraph_reachable_c344462befee4909->empty()) && !(rel_define_04bf38853652ecf1->empty())) {
|
1002 | [&](){
|
1003 | CREATE_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt,rel_CFGraph_reachable_c344462befee4909->createContext());
|
1004 | CREATE_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt,rel_alias_36893f0f24e80d93->createContext());
|
1005 | CREATE_OP_CONTEXT(rel_assign_e4bb6e0824a16a37_op_ctxt,rel_assign_e4bb6e0824a16a37->createContext());
|
1006 | CREATE_OP_CONTEXT(rel_define_04bf38853652ecf1_op_ctxt,rel_define_04bf38853652ecf1->createContext());
|
1007 | for(const auto& env0 : *rel_define_04bf38853652ecf1) {
|
1008 | RamDomain const ref = env0[2];
|
1009 | if (ref == 0) continue;
|
1010 | const RamDomain *env1 = recordTable.unpack(ref,2);
|
1011 | {
|
1012 | if( (ramBitCast<RamDomain>(env1[0]) == ramBitCast<RamDomain>(RamSigned(1)))) {
|
1013 | auto range = rel_assign_e4bb6e0824a16a37->lowerUpperRange_1000(Tuple<RamDomain,4>{{ramBitCast(env0[0]), ramBitCast<RamDomain>(MIN_RAM_SIGNED), ramBitCast<RamDomain>(MIN_RAM_SIGNED), ramBitCast<RamDomain>(MIN_RAM_SIGNED)}},Tuple<RamDomain,4>{{ramBitCast(env0[0]), ramBitCast<RamDomain>(MAX_RAM_SIGNED), ramBitCast<RamDomain>(MAX_RAM_SIGNED), ramBitCast<RamDomain>(MAX_RAM_SIGNED)}},READ_OP_CONTEXT(rel_assign_e4bb6e0824a16a37_op_ctxt));
|
1014 | for(const auto& env2 : range) {
|
1015 | if( rel_CFGraph_reachable_c344462befee4909->contains(Tuple<RamDomain,4>{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[0]),ramBitCast(env2[1])}},READ_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt))) {
|
1016 | RamDomain const ref = env2[2];
|
1017 | if (ref == 0) continue;
|
1018 | const RamDomain *env3 = recordTable.unpack(ref,2);
|
1019 | {
|
1020 | if( (ramBitCast<RamDomain>(env3[0]) == ramBitCast<RamDomain>(RamSigned(0)))) {
|
1021 | RamDomain const ref = env3[1];
|
1022 | if (ref == 0) continue;
|
1023 | const RamDomain *env4 = recordTable.unpack(ref,2);
|
1024 | {
|
1025 | RamDomain const ref = env2[3];
|
1026 | if (ref == 0) continue;
|
1027 | const RamDomain *env5 = recordTable.unpack(ref,2);
|
1028 | {
|
1029 | if( (ramBitCast<RamDomain>(env5[0]) == ramBitCast<RamDomain>(RamSigned(1))) && (ramBitCast<RamDomain>(env1[1]) == ramBitCast<RamDomain>(env5[1]))) {
|
1030 | Tuple<RamDomain,6> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(pack(recordTable,Tuple<RamDomain,2>{{ramBitCast(ramBitCast(RamSigned(1))),ramBitCast(ramBitCast(env1[1]))}}
|
1031 | )),ramBitCast(RamSigned(0)),ramBitCast(RamSigned(-1)),ramBitCast(pack(recordTable,Tuple<RamDomain,2>{{ramBitCast(ramBitCast(RamSigned(0))),ramBitCast(ramBitCast(pack(recordTable,Tuple<RamDomain,2>{{ramBitCast(ramBitCast(env4[0])),ramBitCast(ramBitCast(env4[1]))}}
|
1032 | )))}}
|
1033 | ))}};
|
1034 | rel_alias_36893f0f24e80d93->insert(tuple,READ_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt));
|
1035 | }
|
1036 | }
|
1037 | }
|
1038 | }
|
1039 | }
|
1040 | }
|
1041 | }
|
1042 | }
|
1043 | }
|
1044 | }
|
1045 | }
|
1046 | ();}
|
1047 | if (performIO) {
|
1048 | try {std::map<std::string, std::string> directiveMap({{"IO","file"},{"attributeNames","f\tsf\ta\tg\tsg\tb"},{"auxArity","0"},{"name","alias"},{"operation","output"},{"output-dir","."},{"params","{\"records\": {}, \"relation\": {\"arity\": 6, \"params\": [\"f\", \"sf\", \"a\", \"g\", \"sg\", \"b\"]}}"},{"types","{\"ADTs\": {\"+:Reference\": {\"arity\": 2, \"branches\": [{\"name\": \"Member\", \"types\": [\"s:symbol\", \"s:symbol\"]}, {\"name\": \"Variable\", \"types\": [\"s:symbol\"]}], \"enum\": false}}, \"records\": {}, \"relation\": {\"arity\": 6, \"types\": [\"s:Function\", \"i:Statement\", \"+:Reference\", \"s:Function\", \"i:Statement\", \"+:Reference\"]}}"}});
|
1049 | if (outputDirectory == "-"){directiveMap["IO"] = "stdout"; directiveMap["headers"] = "true";}
|
1050 | else if (!outputDirectory.empty()) {directiveMap["output-dir"] = outputDirectory;}
|
1051 | IOSystem::getInstance().getWriter(directiveMap, symTable, recordTable)->writeAll(*rel_alias_36893f0f24e80d93);
|
1052 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
1053 | }
|
1054 | if (pruneImdtRels) rel_CFGraph_reachable_c344462befee4909->purge();
|
1055 | if (pruneImdtRels) rel_assign_e4bb6e0824a16a37->purge();
|
1056 | if (pruneImdtRels) rel_define_04bf38853652ecf1->purge();
|
1057 | }
|
1058 |
|
1059 | } // namespace souffle
|
1060 |
|
1061 | namespace souffle {
|
1062 | using namespace souffle;
|
1063 | class Stratum_assign_e0d78e44f4df6411 {
|
1064 | public:
|
1065 | Stratum_assign_e0d78e44f4df6411(SymbolTable& symTable,RecordTable& recordTable,ConcurrentCache<std::string,std::regex>& regexCache,bool& pruneImdtRels,bool& performIO,SignalHandler*& signalHandler,std::atomic<std::size_t>& iter,std::atomic<RamDomain>& ctr,std::string& inputDirectory,std::string& outputDirectory,t_btree_iiii__0_1_2_3__1000__1111::Type& rel_assign_e4bb6e0824a16a37);
|
1066 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
1067 | private:
|
1068 | SymbolTable& symTable;
|
1069 | RecordTable& recordTable;
|
1070 | ConcurrentCache<std::string,std::regex>& regexCache;
|
1071 | bool& pruneImdtRels;
|
1072 | bool& performIO;
|
1073 | SignalHandler*& signalHandler;
|
1074 | std::atomic<std::size_t>& iter;
|
1075 | std::atomic<RamDomain>& ctr;
|
1076 | std::string& inputDirectory;
|
1077 | std::string& outputDirectory;
|
1078 | t_btree_iiii__0_1_2_3__1000__1111::Type* rel_assign_e4bb6e0824a16a37;
|
1079 | };
|
1080 | } // namespace souffle
|
1081 | namespace souffle {
|
1082 | using namespace souffle;
|
1083 | Stratum_assign_e0d78e44f4df6411::Stratum_assign_e0d78e44f4df6411(SymbolTable& symTable,RecordTable& recordTable,ConcurrentCache<std::string,std::regex>& regexCache,bool& pruneImdtRels,bool& performIO,SignalHandler*& signalHandler,std::atomic<std::size_t>& iter,std::atomic<RamDomain>& ctr,std::string& inputDirectory,std::string& outputDirectory,t_btree_iiii__0_1_2_3__1000__1111::Type& rel_assign_e4bb6e0824a16a37):
|
1084 | symTable(symTable),
|
1085 | recordTable(recordTable),
|
1086 | regexCache(regexCache),
|
1087 | pruneImdtRels(pruneImdtRels),
|
1088 | performIO(performIO),
|
1089 | signalHandler(signalHandler),
|
1090 | iter(iter),
|
1091 | ctr(ctr),
|
1092 | inputDirectory(inputDirectory),
|
1093 | outputDirectory(outputDirectory),
|
1094 | rel_assign_e4bb6e0824a16a37(&rel_assign_e4bb6e0824a16a37){
|
1095 | }
|
1096 |
|
1097 | void Stratum_assign_e0d78e44f4df6411::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
1098 | if (performIO) {
|
1099 | try {std::map<std::string, std::string> directiveMap({{"IO","file"},{"attributeNames","f\ts\ta\tb"},{"auxArity","0"},{"fact-dir","."},{"name","assign"},{"operation","input"},{"params","{\"records\": {}, \"relation\": {\"arity\": 4, \"params\": [\"f\", \"s\", \"a\", \"b\"]}}"},{"types","{\"ADTs\": {\"+:Reference\": {\"arity\": 2, \"branches\": [{\"name\": \"Member\", \"types\": [\"s:symbol\", \"s:symbol\"]}, {\"name\": \"Variable\", \"types\": [\"s:symbol\"]}], \"enum\": false}}, \"records\": {}, \"relation\": {\"arity\": 4, \"types\": [\"s:Function\", \"i:Statement\", \"+:Reference\", \"+:Reference\"]}}"}});
|
1100 | if (!inputDirectory.empty()) {directiveMap["fact-dir"] = inputDirectory;}
|
1101 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_assign_e4bb6e0824a16a37);
|
1102 | } catch (std::exception& e) {std::cerr << "Error loading assign data: " << e.what() << '\n';
|
1103 | exit(1);
|
1104 | }
|
1105 | }
|
1106 | }
|
1107 |
|
1108 | } // namespace souffle
|
1109 |
|
1110 | namespace souffle {
|
1111 | using namespace souffle;
|
1112 | class Stratum_cf_edge_c2ae152829fd6f1f {
|
1113 | public:
|
1114 | Stratum_cf_edge_c2ae152829fd6f1f(SymbolTable& symTable,RecordTable& recordTable,ConcurrentCache<std::string,std::regex>& regexCache,bool& pruneImdtRels,bool& performIO,SignalHandler*& signalHandler,std::atomic<std::size_t>& iter,std::atomic<RamDomain>& ctr,std::string& inputDirectory,std::string& outputDirectory,t_btree_iii__0_1_2__111::Type& rel_cf_edge_4931a04c8c74bb72);
|
1115 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
1116 | private:
|
1117 | SymbolTable& symTable;
|
1118 | RecordTable& recordTable;
|
1119 | ConcurrentCache<std::string,std::regex>& regexCache;
|
1120 | bool& pruneImdtRels;
|
1121 | bool& performIO;
|
1122 | SignalHandler*& signalHandler;
|
1123 | std::atomic<std::size_t>& iter;
|
1124 | std::atomic<RamDomain>& ctr;
|
1125 | std::string& inputDirectory;
|
1126 | std::string& outputDirectory;
|
1127 | t_btree_iii__0_1_2__111::Type* rel_cf_edge_4931a04c8c74bb72;
|
1128 | };
|
1129 | } // namespace souffle
|
1130 | namespace souffle {
|
1131 | using namespace souffle;
|
1132 | Stratum_cf_edge_c2ae152829fd6f1f::Stratum_cf_edge_c2ae152829fd6f1f(SymbolTable& symTable,RecordTable& recordTable,ConcurrentCache<std::string,std::regex>& regexCache,bool& pruneImdtRels,bool& performIO,SignalHandler*& signalHandler,std::atomic<std::size_t>& iter,std::atomic<RamDomain>& ctr,std::string& inputDirectory,std::string& outputDirectory,t_btree_iii__0_1_2__111::Type& rel_cf_edge_4931a04c8c74bb72):
|
1133 | symTable(symTable),
|
1134 | recordTable(recordTable),
|
1135 | regexCache(regexCache),
|
1136 | pruneImdtRels(pruneImdtRels),
|
1137 | performIO(performIO),
|
1138 | signalHandler(signalHandler),
|
1139 | iter(iter),
|
1140 | ctr(ctr),
|
1141 | inputDirectory(inputDirectory),
|
1142 | outputDirectory(outputDirectory),
|
1143 | rel_cf_edge_4931a04c8c74bb72(&rel_cf_edge_4931a04c8c74bb72){
|
1144 | }
|
1145 |
|
1146 | void Stratum_cf_edge_c2ae152829fd6f1f::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
1147 | if (performIO) {
|
1148 | try {std::map<std::string, std::string> directiveMap({{"IO","file"},{"attributeNames","f\ts1\ts2"},{"auxArity","0"},{"fact-dir","."},{"name","cf_edge"},{"operation","input"},{"params","{\"records\": {}, \"relation\": {\"arity\": 3, \"params\": [\"f\", \"s1\", \"s2\"]}}"},{"types","{\"ADTs\": {\"+:Reference\": {\"arity\": 2, \"branches\": [{\"name\": \"Member\", \"types\": [\"s:symbol\", \"s:symbol\"]}, {\"name\": \"Variable\", \"types\": [\"s:symbol\"]}], \"enum\": false}}, \"records\": {}, \"relation\": {\"arity\": 3, \"types\": [\"s:Function\", \"i:Statement\", \"i:Statement\"]}}"}});
|
1149 | if (!inputDirectory.empty()) {directiveMap["fact-dir"] = inputDirectory;}
|
1150 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_cf_edge_4931a04c8c74bb72);
|
1151 | } catch (std::exception& e) {std::cerr << "Error loading cf_edge data: " << e.what() << '\n';
|
1152 | exit(1);
|
1153 | }
|
1154 | }
|
1155 | }
|
1156 |
|
1157 | } // namespace souffle
|
1158 |
|
1159 | namespace souffle {
|
1160 | using namespace souffle;
|
1161 | class Stratum_define_391884c8e77907db {
|
1162 | public:
|
1163 | Stratum_define_391884c8e77907db(SymbolTable& symTable,RecordTable& recordTable,ConcurrentCache<std::string,std::regex>& regexCache,bool& pruneImdtRels,bool& performIO,SignalHandler*& signalHandler,std::atomic<std::size_t>& iter,std::atomic<RamDomain>& ctr,std::string& inputDirectory,std::string& outputDirectory,t_btree_iiii__0_1_2_3__1000__1111::Type& rel_assign_e4bb6e0824a16a37,t_btree_iii__0_1_2__111::Type& rel_define_04bf38853652ecf1);
|
1164 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
1165 | private:
|
1166 | SymbolTable& symTable;
|
1167 | RecordTable& recordTable;
|
1168 | ConcurrentCache<std::string,std::regex>& regexCache;
|
1169 | bool& pruneImdtRels;
|
1170 | bool& performIO;
|
1171 | SignalHandler*& signalHandler;
|
1172 | std::atomic<std::size_t>& iter;
|
1173 | std::atomic<RamDomain>& ctr;
|
1174 | std::string& inputDirectory;
|
1175 | std::string& outputDirectory;
|
1176 | t_btree_iiii__0_1_2_3__1000__1111::Type* rel_assign_e4bb6e0824a16a37;
|
1177 | t_btree_iii__0_1_2__111::Type* rel_define_04bf38853652ecf1;
|
1178 | };
|
1179 | } // namespace souffle
|
1180 | namespace souffle {
|
1181 | using namespace souffle;
|
1182 | Stratum_define_391884c8e77907db::Stratum_define_391884c8e77907db(SymbolTable& symTable,RecordTable& recordTable,ConcurrentCache<std::string,std::regex>& regexCache,bool& pruneImdtRels,bool& performIO,SignalHandler*& signalHandler,std::atomic<std::size_t>& iter,std::atomic<RamDomain>& ctr,std::string& inputDirectory,std::string& outputDirectory,t_btree_iiii__0_1_2_3__1000__1111::Type& rel_assign_e4bb6e0824a16a37,t_btree_iii__0_1_2__111::Type& rel_define_04bf38853652ecf1):
|
1183 | symTable(symTable),
|
1184 | recordTable(recordTable),
|
1185 | regexCache(regexCache),
|
1186 | pruneImdtRels(pruneImdtRels),
|
1187 | performIO(performIO),
|
1188 | signalHandler(signalHandler),
|
1189 | iter(iter),
|
1190 | ctr(ctr),
|
1191 | inputDirectory(inputDirectory),
|
1192 | outputDirectory(outputDirectory),
|
1193 | rel_assign_e4bb6e0824a16a37(&rel_assign_e4bb6e0824a16a37),
|
1194 | rel_define_04bf38853652ecf1(&rel_define_04bf38853652ecf1){
|
1195 | }
|
1196 |
|
1197 | void Stratum_define_391884c8e77907db::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
1198 | if (performIO) {
|
1199 | try {std::map<std::string, std::string> directiveMap({{"IO","file"},{"attributeNames","f\ts\tr"},{"auxArity","0"},{"fact-dir","."},{"name","define"},{"operation","input"},{"params","{\"records\": {}, \"relation\": {\"arity\": 3, \"params\": [\"f\", \"s\", \"r\"]}}"},{"types","{\"ADTs\": {\"+:Reference\": {\"arity\": 2, \"branches\": [{\"name\": \"Member\", \"types\": [\"s:symbol\", \"s:symbol\"]}, {\"name\": \"Variable\", \"types\": [\"s:symbol\"]}], \"enum\": false}}, \"records\": {}, \"relation\": {\"arity\": 3, \"types\": [\"s:Function\", \"i:Statement\", \"+:Reference\"]}}"}});
|
1200 | if (!inputDirectory.empty()) {directiveMap["fact-dir"] = inputDirectory;}
|
1201 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_define_04bf38853652ecf1);
|
1202 | } catch (std::exception& e) {std::cerr << "Error loading define data: " << e.what() << '\n';
|
1203 | exit(1);
|
1204 | }
|
1205 | }
|
1206 | signalHandler->setMsg(R"_(define(f,s,r) :-
|
1207 | assign(f,s,r,_).
|
1208 | in file dataflow.dl [31:1-31:39])_");
|
1209 | if(!(rel_assign_e4bb6e0824a16a37->empty())) {
|
1210 | [&](){
|
1211 | CREATE_OP_CONTEXT(rel_assign_e4bb6e0824a16a37_op_ctxt,rel_assign_e4bb6e0824a16a37->createContext());
|
1212 | CREATE_OP_CONTEXT(rel_define_04bf38853652ecf1_op_ctxt,rel_define_04bf38853652ecf1->createContext());
|
1213 | for(const auto& env0 : *rel_assign_e4bb6e0824a16a37) {
|
1214 | Tuple<RamDomain,3> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2])}};
|
1215 | rel_define_04bf38853652ecf1->insert(tuple,READ_OP_CONTEXT(rel_define_04bf38853652ecf1_op_ctxt));
|
1216 | }
|
1217 | }
|
1218 | ();}
|
1219 | }
|
1220 |
|
1221 | } // namespace souffle
|
1222 |
|
1223 | namespace souffle {
|
1224 | using namespace souffle;
|
1225 | class Sf__: public SouffleProgram {
|
1226 | public:
|
1227 | Sf__();
|
1228 | ~Sf__();
|
1229 | void run();
|
1230 | void runAll(std::string inputDirectoryArg = "",std::string outputDirectoryArg = "",bool performIOArg = true,bool pruneImdtRelsArg = true);
|
1231 | void printAll([[maybe_unused]] std::string outputDirectoryArg = "");
|
1232 | void loadAll([[maybe_unused]] std::string inputDirectoryArg = "");
|
1233 | void dumpInputs();
|
1234 | void dumpOutputs();
|
1235 | SymbolTable& getSymbolTable();
|
1236 | RecordTable& getRecordTable();
|
1237 | void setNumThreads(std::size_t numThreadsValue);
|
1238 | void executeSubroutine(std::string name,const std::vector<RamDomain>& args,std::vector<RamDomain>& ret);
|
1239 | private:
|
1240 | void runFunction(std::string inputDirectoryArg,std::string outputDirectoryArg,bool performIOArg,bool pruneImdtRelsArg);
|
1241 | SymbolTableImpl symTable;
|
1242 | SpecializedRecordTable<0,2> recordTable;
|
1243 | ConcurrentCache<std::string,std::regex> regexCache;
|
1244 | Own<t_btree_iii__0_1_2__111::Type> rel_cf_edge_4931a04c8c74bb72;
|
1245 | souffle::RelationWrapper<t_btree_iii__0_1_2__111::Type> wrapper_rel_cf_edge_4931a04c8c74bb72;
|
1246 | Own<t_btree_iiii__0_1_2_3__1110__1111::Type> rel_CFGraph_edge_db08b41d50d8a475;
|
1247 | souffle::RelationWrapper<t_btree_iiii__0_1_2_3__1110__1111::Type> wrapper_rel_CFGraph_edge_db08b41d50d8a475;
|
1248 | Own<t_btree_iiii__0_1_2_3__1111::Type> rel_CFGraph_reachable_c344462befee4909;
|
1249 | souffle::RelationWrapper<t_btree_iiii__0_1_2_3__1111::Type> wrapper_rel_CFGraph_reachable_c344462befee4909;
|
1250 | Own<t_btree_iiii__0_1_2_3__1111::Type> rel_delta_CFGraph_reachable_3f3bf343bbb37861;
|
1251 | Own<t_btree_iiii__0_1_2_3__1111::Type> rel_new_CFGraph_reachable_c98538911662603c;
|
1252 | Own<t_btree_iiii__0_1_2_3__1000__1111::Type> rel_assign_e4bb6e0824a16a37;
|
1253 | souffle::RelationWrapper<t_btree_iiii__0_1_2_3__1000__1111::Type> wrapper_rel_assign_e4bb6e0824a16a37;
|
1254 | Own<t_btree_iii__0_1_2__111::Type> rel_define_04bf38853652ecf1;
|
1255 | souffle::RelationWrapper<t_btree_iii__0_1_2__111::Type> wrapper_rel_define_04bf38853652ecf1;
|
1256 | Own<t_btree_iiiiii__0_1_2_3_4_5__111111::Type> rel_alias_36893f0f24e80d93;
|
1257 | souffle::RelationWrapper<t_btree_iiiiii__0_1_2_3_4_5__111111::Type> wrapper_rel_alias_36893f0f24e80d93;
|
1258 | Stratum_CFGraph_edge_4d26e319bb257c49 stratum_CFGraph_edge_656704795f0096ba;
|
1259 | Stratum_CFGraph_reachable_7410d937e4ac8127 stratum_CFGraph_reachable_a1359c86b6f7bd73;
|
1260 | Stratum_alias_ba5aaebc28a379e5 stratum_alias_0179d0f4f86c77c2;
|
1261 | Stratum_assign_e0d78e44f4df6411 stratum_assign_f550d366a9215d2a;
|
1262 | Stratum_cf_edge_c2ae152829fd6f1f stratum_cf_edge_4017fef287699967;
|
1263 | Stratum_define_391884c8e77907db stratum_define_ab922eb7ee2d8992;
|
1264 | std::string inputDirectory;
|
1265 | std::string outputDirectory;
|
1266 | SignalHandler* signalHandler{SignalHandler::instance()};
|
1267 | std::atomic<RamDomain> ctr{};
|
1268 | std::atomic<std::size_t> iter{};
|
1269 | };
|
1270 | } // namespace souffle
|
1271 | namespace souffle {
|
1272 | using namespace souffle;
|
1273 | Sf__::Sf__():
|
1274 | symTable({
|
1275 | R"_(heap)_",
|
1276 | }),
|
1277 | recordTable(),
|
1278 | regexCache(),
|
1279 | rel_cf_edge_4931a04c8c74bb72(mk<t_btree_iii__0_1_2__111::Type>()),
|
1280 | wrapper_rel_cf_edge_4931a04c8c74bb72(0, *rel_cf_edge_4931a04c8c74bb72, *this, "cf_edge", std::array<const char *,3>{{"s:Function","i:Statement","i:Statement"}}, std::array<const char *,3>{{"f","s1","s2"}}, 0),
|
1281 | rel_CFGraph_edge_db08b41d50d8a475(mk<t_btree_iiii__0_1_2_3__1110__1111::Type>()),
|
1282 | wrapper_rel_CFGraph_edge_db08b41d50d8a475(1, *rel_CFGraph_edge_db08b41d50d8a475, *this, "CFGraph.edge", std::array<const char *,4>{{"s:Function","i:Statement","s:Function","i:Statement"}}, std::array<const char *,4>{{"f","u","g","v"}}, 0),
|
1283 | rel_CFGraph_reachable_c344462befee4909(mk<t_btree_iiii__0_1_2_3__1111::Type>()),
|
1284 | wrapper_rel_CFGraph_reachable_c344462befee4909(2, *rel_CFGraph_reachable_c344462befee4909, *this, "CFGraph.reachable", std::array<const char *,4>{{"s:Function","i:Statement","s:Function","i:Statement"}}, std::array<const char *,4>{{"f","u","g","v"}}, 0),
|
1285 | rel_delta_CFGraph_reachable_3f3bf343bbb37861(mk<t_btree_iiii__0_1_2_3__1111::Type>()),
|
1286 | rel_new_CFGraph_reachable_c98538911662603c(mk<t_btree_iiii__0_1_2_3__1111::Type>()),
|
1287 | rel_assign_e4bb6e0824a16a37(mk<t_btree_iiii__0_1_2_3__1000__1111::Type>()),
|
1288 | wrapper_rel_assign_e4bb6e0824a16a37(3, *rel_assign_e4bb6e0824a16a37, *this, "assign", std::array<const char *,4>{{"s:Function","i:Statement","+:Reference","+:Reference"}}, std::array<const char *,4>{{"f","s","a","b"}}, 0),
|
1289 | rel_define_04bf38853652ecf1(mk<t_btree_iii__0_1_2__111::Type>()),
|
1290 | wrapper_rel_define_04bf38853652ecf1(4, *rel_define_04bf38853652ecf1, *this, "define", std::array<const char *,3>{{"s:Function","i:Statement","+:Reference"}}, std::array<const char *,3>{{"f","s","r"}}, 0),
|
1291 | rel_alias_36893f0f24e80d93(mk<t_btree_iiiiii__0_1_2_3_4_5__111111::Type>()),
|
1292 | wrapper_rel_alias_36893f0f24e80d93(5, *rel_alias_36893f0f24e80d93, *this, "alias", std::array<const char *,6>{{"s:Function","i:Statement","+:Reference","s:Function","i:Statement","+:Reference"}}, std::array<const char *,6>{{"f","sf","a","g","sg","b"}}, 0),
|
1293 | stratum_CFGraph_edge_656704795f0096ba(symTable,recordTable,regexCache,pruneImdtRels,performIO,signalHandler,iter,ctr,inputDirectory,outputDirectory,*rel_CFGraph_edge_db08b41d50d8a475,*rel_cf_edge_4931a04c8c74bb72),
|
1294 | stratum_CFGraph_reachable_a1359c86b6f7bd73(symTable,recordTable,regexCache,pruneImdtRels,performIO,signalHandler,iter,ctr,inputDirectory,outputDirectory,*rel_delta_CFGraph_reachable_3f3bf343bbb37861,*rel_new_CFGraph_reachable_c98538911662603c,*rel_CFGraph_edge_db08b41d50d8a475,*rel_CFGraph_reachable_c344462befee4909),
|
1295 | stratum_alias_0179d0f4f86c77c2(symTable,recordTable,regexCache,pruneImdtRels,performIO,signalHandler,iter,ctr,inputDirectory,outputDirectory,*rel_CFGraph_reachable_c344462befee4909,*rel_alias_36893f0f24e80d93,*rel_assign_e4bb6e0824a16a37,*rel_define_04bf38853652ecf1),
|
1296 | stratum_assign_f550d366a9215d2a(symTable,recordTable,regexCache,pruneImdtRels,performIO,signalHandler,iter,ctr,inputDirectory,outputDirectory,*rel_assign_e4bb6e0824a16a37),
|
1297 | stratum_cf_edge_4017fef287699967(symTable,recordTable,regexCache,pruneImdtRels,performIO,signalHandler,iter,ctr,inputDirectory,outputDirectory,*rel_cf_edge_4931a04c8c74bb72),
|
1298 | stratum_define_ab922eb7ee2d8992(symTable,recordTable,regexCache,pruneImdtRels,performIO,signalHandler,iter,ctr,inputDirectory,outputDirectory,*rel_assign_e4bb6e0824a16a37,*rel_define_04bf38853652ecf1){
|
1299 | addRelation("cf_edge", wrapper_rel_cf_edge_4931a04c8c74bb72, true, false);
|
1300 | addRelation("CFGraph.edge", wrapper_rel_CFGraph_edge_db08b41d50d8a475, false, false);
|
1301 | addRelation("CFGraph.reachable", wrapper_rel_CFGraph_reachable_c344462befee4909, false, false);
|
1302 | addRelation("assign", wrapper_rel_assign_e4bb6e0824a16a37, true, false);
|
1303 | addRelation("define", wrapper_rel_define_04bf38853652ecf1, true, false);
|
1304 | addRelation("alias", wrapper_rel_alias_36893f0f24e80d93, false, true);
|
1305 | }
|
1306 |
|
1307 | Sf__::~Sf__(){
|
1308 | }
|
1309 |
|
1310 | void Sf__::runFunction(std::string inputDirectoryArg,std::string outputDirectoryArg,bool performIOArg,bool pruneImdtRelsArg){
|
1311 |
|
1312 | this->inputDirectory = std::move(inputDirectoryArg);
|
1313 | this->outputDirectory = std::move(outputDirectoryArg);
|
1314 | this->performIO = performIOArg;
|
1315 | this->pruneImdtRels = pruneImdtRelsArg;
|
1316 |
|
1317 | // set default threads (in embedded mode)
|
1318 | // if this is not set, and omp is used, the default omp setting of number of cores is used.
|
1319 | #if defined(_OPENMP)
|
1320 | if (0 < getNumThreads()) { omp_set_num_threads(static_cast<int>(getNumThreads())); }
|
1321 | #endif
|
1322 |
|
1323 | signalHandler->set();
|
1324 | // -- query evaluation --
|
1325 | {
|
1326 | std::vector<RamDomain> args, ret;
|
1327 | stratum_cf_edge_4017fef287699967.run(args, ret);
|
1328 | }
|
1329 | {
|
1330 | std::vector<RamDomain> args, ret;
|
1331 | stratum_CFGraph_edge_656704795f0096ba.run(args, ret);
|
1332 | }
|
1333 | {
|
1334 | std::vector<RamDomain> args, ret;
|
1335 | stratum_CFGraph_reachable_a1359c86b6f7bd73.run(args, ret);
|
1336 | }
|
1337 | {
|
1338 | std::vector<RamDomain> args, ret;
|
1339 | stratum_assign_f550d366a9215d2a.run(args, ret);
|
1340 | }
|
1341 | {
|
1342 | std::vector<RamDomain> args, ret;
|
1343 | stratum_define_ab922eb7ee2d8992.run(args, ret);
|
1344 | }
|
1345 | {
|
1346 | std::vector<RamDomain> args, ret;
|
1347 | stratum_alias_0179d0f4f86c77c2.run(args, ret);
|
1348 | }
|
1349 |
|
1350 | // -- relation hint statistics --
|
1351 | signalHandler->reset();
|
1352 | }
|
1353 |
|
1354 | void Sf__::run(){
|
1355 | runFunction("", "", false, false);
|
1356 | }
|
1357 |
|
1358 | void Sf__::runAll(std::string inputDirectoryArg,std::string outputDirectoryArg,bool performIOArg,bool pruneImdtRelsArg){
|
1359 | runFunction(inputDirectoryArg, outputDirectoryArg, performIOArg, pruneImdtRelsArg);
|
1360 | }
|
1361 |
|
1362 | void Sf__::printAll([[maybe_unused]] std::string outputDirectoryArg){
|
1363 | try {std::map<std::string, std::string> directiveMap({{"IO","file"},{"attributeNames","f\tsf\ta\tg\tsg\tb"},{"auxArity","0"},{"name","alias"},{"operation","output"},{"output-dir","."},{"params","{\"records\": {}, \"relation\": {\"arity\": 6, \"params\": [\"f\", \"sf\", \"a\", \"g\", \"sg\", \"b\"]}}"},{"types","{\"ADTs\": {\"+:Reference\": {\"arity\": 2, \"branches\": [{\"name\": \"Member\", \"types\": [\"s:symbol\", \"s:symbol\"]}, {\"name\": \"Variable\", \"types\": [\"s:symbol\"]}], \"enum\": false}}, \"records\": {}, \"relation\": {\"arity\": 6, \"types\": [\"s:Function\", \"i:Statement\", \"+:Reference\", \"s:Function\", \"i:Statement\", \"+:Reference\"]}}"}});
|
1364 | if (!outputDirectoryArg.empty()) {directiveMap["output-dir"] = outputDirectoryArg;}
|
1365 | IOSystem::getInstance().getWriter(directiveMap, symTable, recordTable)->writeAll(*rel_alias_36893f0f24e80d93);
|
1366 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
1367 | }
|
1368 |
|
1369 | void Sf__::loadAll([[maybe_unused]] std::string inputDirectoryArg){
|
1370 | try {std::map<std::string, std::string> directiveMap({{"IO","file"},{"attributeNames","f\ts1\ts2"},{"auxArity","0"},{"fact-dir","."},{"name","cf_edge"},{"operation","input"},{"params","{\"records\": {}, \"relation\": {\"arity\": 3, \"params\": [\"f\", \"s1\", \"s2\"]}}"},{"types","{\"ADTs\": {\"+:Reference\": {\"arity\": 2, \"branches\": [{\"name\": \"Member\", \"types\": [\"s:symbol\", \"s:symbol\"]}, {\"name\": \"Variable\", \"types\": [\"s:symbol\"]}], \"enum\": false}}, \"records\": {}, \"relation\": {\"arity\": 3, \"types\": [\"s:Function\", \"i:Statement\", \"i:Statement\"]}}"}});
|
1371 | if (!inputDirectoryArg.empty()) {directiveMap["fact-dir"] = inputDirectoryArg;}
|
1372 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_cf_edge_4931a04c8c74bb72);
|
1373 | } catch (std::exception& e) {std::cerr << "Error loading cf_edge data: " << e.what() << '\n';
|
1374 | exit(1);
|
1375 | }
|
1376 | try {std::map<std::string, std::string> directiveMap({{"IO","file"},{"attributeNames","f\ts\tr"},{"auxArity","0"},{"fact-dir","."},{"name","define"},{"operation","input"},{"params","{\"records\": {}, \"relation\": {\"arity\": 3, \"params\": [\"f\", \"s\", \"r\"]}}"},{"types","{\"ADTs\": {\"+:Reference\": {\"arity\": 2, \"branches\": [{\"name\": \"Member\", \"types\": [\"s:symbol\", \"s:symbol\"]}, {\"name\": \"Variable\", \"types\": [\"s:symbol\"]}], \"enum\": false}}, \"records\": {}, \"relation\": {\"arity\": 3, \"types\": [\"s:Function\", \"i:Statement\", \"+:Reference\"]}}"}});
|
1377 | if (!inputDirectoryArg.empty()) {directiveMap["fact-dir"] = inputDirectoryArg;}
|
1378 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_define_04bf38853652ecf1);
|
1379 | } catch (std::exception& e) {std::cerr << "Error loading define data: " << e.what() << '\n';
|
1380 | exit(1);
|
1381 | }
|
1382 | try {std::map<std::string, std::string> directiveMap({{"IO","file"},{"attributeNames","f\ts\ta\tb"},{"auxArity","0"},{"fact-dir","."},{"name","assign"},{"operation","input"},{"params","{\"records\": {}, \"relation\": {\"arity\": 4, \"params\": [\"f\", \"s\", \"a\", \"b\"]}}"},{"types","{\"ADTs\": {\"+:Reference\": {\"arity\": 2, \"branches\": [{\"name\": \"Member\", \"types\": [\"s:symbol\", \"s:symbol\"]}, {\"name\": \"Variable\", \"types\": [\"s:symbol\"]}], \"enum\": false}}, \"records\": {}, \"relation\": {\"arity\": 4, \"types\": [\"s:Function\", \"i:Statement\", \"+:Reference\", \"+:Reference\"]}}"}});
|
1383 | if (!inputDirectoryArg.empty()) {directiveMap["fact-dir"] = inputDirectoryArg;}
|
1384 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_assign_e4bb6e0824a16a37);
|
1385 | } catch (std::exception& e) {std::cerr << "Error loading assign data: " << e.what() << '\n';
|
1386 | exit(1);
|
1387 | }
|
1388 | }
|
1389 |
|
1390 | void Sf__::dumpInputs(){
|
1391 | try {std::map<std::string, std::string> rwOperation;
|
1392 | rwOperation["IO"] = "stdout";
|
1393 | rwOperation["name"] = "cf_edge";
|
1394 | rwOperation["types"] = "{\"relation\": {\"arity\": 3, \"auxArity\": 0, \"types\": [\"s:Function\", \"i:Statement\", \"i:Statement\"]}}";
|
1395 | IOSystem::getInstance().getWriter(rwOperation, symTable, recordTable)->writeAll(*rel_cf_edge_4931a04c8c74bb72);
|
1396 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
1397 | try {std::map<std::string, std::string> rwOperation;
|
1398 | rwOperation["IO"] = "stdout";
|
1399 | rwOperation["name"] = "define";
|
1400 | rwOperation["types"] = "{\"relation\": {\"arity\": 3, \"auxArity\": 0, \"types\": [\"s:Function\", \"i:Statement\", \"+:Reference\"]}}";
|
1401 | IOSystem::getInstance().getWriter(rwOperation, symTable, recordTable)->writeAll(*rel_define_04bf38853652ecf1);
|
1402 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
1403 | try {std::map<std::string, std::string> rwOperation;
|
1404 | rwOperation["IO"] = "stdout";
|
1405 | rwOperation["name"] = "assign";
|
1406 | rwOperation["types"] = "{\"relation\": {\"arity\": 4, \"auxArity\": 0, \"types\": [\"s:Function\", \"i:Statement\", \"+:Reference\", \"+:Reference\"]}}";
|
1407 | IOSystem::getInstance().getWriter(rwOperation, symTable, recordTable)->writeAll(*rel_assign_e4bb6e0824a16a37);
|
1408 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
1409 | }
|
1410 |
|
1411 | void Sf__::dumpOutputs(){
|
1412 | try {std::map<std::string, std::string> rwOperation;
|
1413 | rwOperation["IO"] = "stdout";
|
1414 | rwOperation["name"] = "alias";
|
1415 | rwOperation["types"] = "{\"relation\": {\"arity\": 6, \"auxArity\": 0, \"types\": [\"s:Function\", \"i:Statement\", \"+:Reference\", \"s:Function\", \"i:Statement\", \"+:Reference\"]}}";
|
1416 | IOSystem::getInstance().getWriter(rwOperation, symTable, recordTable)->writeAll(*rel_alias_36893f0f24e80d93);
|
1417 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
1418 | }
|
1419 |
|
1420 | SymbolTable& Sf__::getSymbolTable(){
|
1421 | return symTable;
|
1422 | }
|
1423 |
|
1424 | RecordTable& Sf__::getRecordTable(){
|
1425 | return recordTable;
|
1426 | }
|
1427 |
|
1428 | void Sf__::setNumThreads(std::size_t numThreadsValue){
|
1429 | SouffleProgram::setNumThreads(numThreadsValue);
|
1430 | symTable.setNumLanes(getNumThreads());
|
1431 | recordTable.setNumLanes(getNumThreads());
|
1432 | regexCache.setNumLanes(getNumThreads());
|
1433 | }
|
1434 |
|
1435 | void Sf__::executeSubroutine(std::string name,const std::vector<RamDomain>& args,std::vector<RamDomain>& ret){
|
1436 | if (name == "CFGraph.edge") {
|
1437 | stratum_CFGraph_edge_656704795f0096ba.run(args, ret);
|
1438 | return;}
|
1439 | if (name == "CFGraph.reachable") {
|
1440 | stratum_CFGraph_reachable_a1359c86b6f7bd73.run(args, ret);
|
1441 | return;}
|
1442 | if (name == "alias") {
|
1443 | stratum_alias_0179d0f4f86c77c2.run(args, ret);
|
1444 | return;}
|
1445 | if (name == "assign") {
|
1446 | stratum_assign_f550d366a9215d2a.run(args, ret);
|
1447 | return;}
|
1448 | if (name == "cf_edge") {
|
1449 | stratum_cf_edge_4017fef287699967.run(args, ret);
|
1450 | return;}
|
1451 | if (name == "define") {
|
1452 | stratum_define_ab922eb7ee2d8992.run(args, ret);
|
1453 | return;}
|
1454 | fatal(("unknown subroutine " + name).c_str());
|
1455 | }
|
1456 |
|
1457 | } // namespace souffle
|
1458 | namespace souffle {
|
1459 | SouffleProgram *newInstance__(){return new souffle::Sf__;}
|
1460 | SymbolTable *getST__(SouffleProgram *p){return &reinterpret_cast<souffle::Sf__*>(p)->getSymbolTable();}
|
1461 | } // namespace souffle
|
1462 |
|
1463 | #ifndef __EMBEDDED_SOUFFLE__
|
1464 | #include "souffle/CompiledOptions.h"
|
1465 | int main(int argc, char** argv)
|
1466 | {
|
1467 | try{
|
1468 | souffle::CmdOptions opt(R"(mycpp/datalog/dataflow.dl)",
|
1469 | R"()",
|
1470 | R"()",
|
1471 | false,
|
1472 | R"()",
|
1473 | 1);
|
1474 | if (!opt.parse(argc,argv)) return 1;
|
1475 | souffle::Sf__ obj;
|
1476 | #if defined(_OPENMP)
|
1477 | obj.setNumThreads(opt.getNumJobs());
|
1478 |
|
1479 | #endif
|
1480 | obj.runAll(opt.getInputFileDir(), opt.getOutputFileDir());
|
1481 | return 0;
|
1482 | } catch(std::exception &e) { souffle::SignalHandler::instance()->error(e.what());}
|
1483 | }
|
1484 | #endif
|
1485 |
|
1486 | namespace souffle {
|
1487 | using namespace souffle;
|
1488 | class factory_Sf__: souffle::ProgramFactory {
|
1489 | public:
|
1490 | souffle::SouffleProgram* newInstance();
|
1491 | factory_Sf__();
|
1492 | private:
|
1493 | };
|
1494 | } // namespace souffle
|
1495 | namespace souffle {
|
1496 | using namespace souffle;
|
1497 | souffle::SouffleProgram* factory_Sf__::newInstance(){
|
1498 | return new souffle::Sf__();
|
1499 | }
|
1500 |
|
1501 | factory_Sf__::factory_Sf__():
|
1502 | souffle::ProgramFactory("_"){
|
1503 | }
|
1504 |
|
1505 | } // namespace souffle
|
1506 | namespace souffle {
|
1507 |
|
1508 | #ifdef __EMBEDDED_SOUFFLE__
|
1509 | extern "C" {
|
1510 | souffle::factory_Sf__ __factory_Sf___instance;
|
1511 | }
|
1512 | #endif
|
1513 | } // namespace souffle
|
1514 |
|