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_2_1_3_4_5__111111__101000 {
|
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[2]) < ramBitCast<RamSigned>(b[2])) ? -1 : (ramBitCast<RamSigned>(a[2]) > ramBitCast<RamSigned>(b[2])) ? 1 :((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1])) ? -1 : (ramBitCast<RamSigned>(a[1]) > ramBitCast<RamSigned>(b[1])) ? 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[2]) < ramBitCast<RamSigned>(b[2]))|| ((ramBitCast<RamSigned>(a[2]) == ramBitCast<RamSigned>(b[2])) && ((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1]))|| ((ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1])) && ((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[2]) == ramBitCast<RamSigned>(b[2]))&&(ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1]))&&(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 | range<t_ind_0::iterator> lowerUpperRange_101000(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
602 | range<t_ind_0::iterator> lowerUpperRange_101000(const t_tuple& lower, const t_tuple& upper) const;
|
603 | bool empty() const;
|
604 | std::vector<range<iterator>> partition() const;
|
605 | void purge();
|
606 | iterator begin() const;
|
607 | iterator end() const;
|
608 | void printStatistics(std::ostream& o) const;
|
609 | };
|
610 | } // namespace souffle::t_btree_iiiiii__0_2_1_3_4_5__111111__101000
|
611 | namespace souffle::t_btree_iiiiii__0_2_1_3_4_5__111111__101000 {
|
612 | using namespace souffle;
|
613 | using t_ind_0 = Type::t_ind_0;
|
614 | using iterator = Type::iterator;
|
615 | using context = Type::context;
|
616 | bool Type::insert(const t_tuple& t) {
|
617 | context h;
|
618 | return insert(t, h);
|
619 | }
|
620 | bool Type::insert(const t_tuple& t, context& h) {
|
621 | if (ind_0.insert(t, h.hints_0_lower)) {
|
622 | return true;
|
623 | } else return false;
|
624 | }
|
625 | bool Type::insert(const RamDomain* ramDomain) {
|
626 | RamDomain data[6];
|
627 | std::copy(ramDomain, ramDomain + 6, data);
|
628 | const t_tuple& tuple = reinterpret_cast<const t_tuple&>(data);
|
629 | context h;
|
630 | return insert(tuple, h);
|
631 | }
|
632 | bool Type::insert(RamDomain a0,RamDomain a1,RamDomain a2,RamDomain a3,RamDomain a4,RamDomain a5) {
|
633 | RamDomain data[6] = {a0,a1,a2,a3,a4,a5};
|
634 | return insert(data);
|
635 | }
|
636 | bool Type::contains(const t_tuple& t, context& h) const {
|
637 | return ind_0.contains(t, h.hints_0_lower);
|
638 | }
|
639 | bool Type::contains(const t_tuple& t) const {
|
640 | context h;
|
641 | return contains(t, h);
|
642 | }
|
643 | std::size_t Type::size() const {
|
644 | return ind_0.size();
|
645 | }
|
646 | iterator Type::find(const t_tuple& t, context& h) const {
|
647 | return ind_0.find(t, h.hints_0_lower);
|
648 | }
|
649 | iterator Type::find(const t_tuple& t) const {
|
650 | context h;
|
651 | return find(t, h);
|
652 | }
|
653 | range<iterator> Type::lowerUpperRange_000000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const {
|
654 | return range<iterator>(ind_0.begin(),ind_0.end());
|
655 | }
|
656 | range<iterator> Type::lowerUpperRange_000000(const t_tuple& /* lower */, const t_tuple& /* upper */) const {
|
657 | return range<iterator>(ind_0.begin(),ind_0.end());
|
658 | }
|
659 | range<t_ind_0::iterator> Type::lowerUpperRange_111111(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
660 | t_comparator_0 comparator;
|
661 | int cmp = comparator(lower, upper);
|
662 | if (cmp == 0) {
|
663 | auto pos = ind_0.find(lower, h.hints_0_lower);
|
664 | auto fin = ind_0.end();
|
665 | if (pos != fin) {fin = pos; ++fin;}
|
666 | return make_range(pos, fin);
|
667 | }
|
668 | if (cmp > 0) {
|
669 | return make_range(ind_0.end(), ind_0.end());
|
670 | }
|
671 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
672 | }
|
673 | range<t_ind_0::iterator> Type::lowerUpperRange_111111(const t_tuple& lower, const t_tuple& upper) const {
|
674 | context h;
|
675 | return lowerUpperRange_111111(lower,upper,h);
|
676 | }
|
677 | range<t_ind_0::iterator> Type::lowerUpperRange_101000(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
678 | t_comparator_0 comparator;
|
679 | int cmp = comparator(lower, upper);
|
680 | if (cmp > 0) {
|
681 | return make_range(ind_0.end(), ind_0.end());
|
682 | }
|
683 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
684 | }
|
685 | range<t_ind_0::iterator> Type::lowerUpperRange_101000(const t_tuple& lower, const t_tuple& upper) const {
|
686 | context h;
|
687 | return lowerUpperRange_101000(lower,upper,h);
|
688 | }
|
689 | bool Type::empty() const {
|
690 | return ind_0.empty();
|
691 | }
|
692 | std::vector<range<iterator>> Type::partition() const {
|
693 | return ind_0.getChunks(400);
|
694 | }
|
695 | void Type::purge() {
|
696 | ind_0.clear();
|
697 | }
|
698 | iterator Type::begin() const {
|
699 | return ind_0.begin();
|
700 | }
|
701 | iterator Type::end() const {
|
702 | return ind_0.end();
|
703 | }
|
704 | void Type::printStatistics(std::ostream& o) const {
|
705 | o << " arity 6 direct b-tree index 0 lex-order [0,2,1,3,4,5]\n";
|
706 | ind_0.printStats(o);
|
707 | }
|
708 | } // namespace souffle::t_btree_iiiiii__0_2_1_3_4_5__111111__101000
|
709 | namespace souffle::t_btree_iiiiii__0_2_3_4_5_1__111111__101000__101111 {
|
710 | using namespace souffle;
|
711 | struct Type {
|
712 | static constexpr Relation::arity_type Arity = 6;
|
713 | using t_tuple = Tuple<RamDomain, 6>;
|
714 | struct t_comparator_0{
|
715 | int operator()(const t_tuple& a, const t_tuple& b) const {
|
716 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0])) ? -1 : (ramBitCast<RamSigned>(a[0]) > ramBitCast<RamSigned>(b[0])) ? 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 :((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1])) ? -1 : (ramBitCast<RamSigned>(a[1]) > ramBitCast<RamSigned>(b[1])) ? 1 :(0))))));
|
717 | }
|
718 | bool less(const t_tuple& a, const t_tuple& b) const {
|
719 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0]))|| ((ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0])) && ((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]))|| ((ramBitCast<RamSigned>(a[5]) == ramBitCast<RamSigned>(b[5])) && ((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1]))))))))))));
|
720 | }
|
721 | bool equal(const t_tuple& a, const t_tuple& b) const {
|
722 | return (ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0]))&&(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]))&&(ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1]));
|
723 | }
|
724 | };
|
725 | using t_ind_0 = btree_set<t_tuple,t_comparator_0>;
|
726 | t_ind_0 ind_0;
|
727 | using iterator = t_ind_0::iterator;
|
728 | struct context {
|
729 | t_ind_0::operation_hints hints_0_lower;
|
730 | t_ind_0::operation_hints hints_0_upper;
|
731 | };
|
732 | context createContext() { return context(); }
|
733 | bool insert(const t_tuple& t);
|
734 | bool insert(const t_tuple& t, context& h);
|
735 | bool insert(const RamDomain* ramDomain);
|
736 | bool insert(RamDomain a0,RamDomain a1,RamDomain a2,RamDomain a3,RamDomain a4,RamDomain a5);
|
737 | bool contains(const t_tuple& t, context& h) const;
|
738 | bool contains(const t_tuple& t) const;
|
739 | std::size_t size() const;
|
740 | iterator find(const t_tuple& t, context& h) const;
|
741 | iterator find(const t_tuple& t) const;
|
742 | range<iterator> lowerUpperRange_000000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const;
|
743 | range<iterator> lowerUpperRange_000000(const t_tuple& /* lower */, const t_tuple& /* upper */) const;
|
744 | range<t_ind_0::iterator> lowerUpperRange_111111(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
745 | range<t_ind_0::iterator> lowerUpperRange_111111(const t_tuple& lower, const t_tuple& upper) const;
|
746 | range<t_ind_0::iterator> lowerUpperRange_101000(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
747 | range<t_ind_0::iterator> lowerUpperRange_101000(const t_tuple& lower, const t_tuple& upper) const;
|
748 | range<t_ind_0::iterator> lowerUpperRange_101111(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
749 | range<t_ind_0::iterator> lowerUpperRange_101111(const t_tuple& lower, const t_tuple& upper) const;
|
750 | bool empty() const;
|
751 | std::vector<range<iterator>> partition() const;
|
752 | void purge();
|
753 | iterator begin() const;
|
754 | iterator end() const;
|
755 | void printStatistics(std::ostream& o) const;
|
756 | };
|
757 | } // namespace souffle::t_btree_iiiiii__0_2_3_4_5_1__111111__101000__101111
|
758 | namespace souffle::t_btree_iiiiii__0_2_3_4_5_1__111111__101000__101111 {
|
759 | using namespace souffle;
|
760 | using t_ind_0 = Type::t_ind_0;
|
761 | using iterator = Type::iterator;
|
762 | using context = Type::context;
|
763 | bool Type::insert(const t_tuple& t) {
|
764 | context h;
|
765 | return insert(t, h);
|
766 | }
|
767 | bool Type::insert(const t_tuple& t, context& h) {
|
768 | if (ind_0.insert(t, h.hints_0_lower)) {
|
769 | return true;
|
770 | } else return false;
|
771 | }
|
772 | bool Type::insert(const RamDomain* ramDomain) {
|
773 | RamDomain data[6];
|
774 | std::copy(ramDomain, ramDomain + 6, data);
|
775 | const t_tuple& tuple = reinterpret_cast<const t_tuple&>(data);
|
776 | context h;
|
777 | return insert(tuple, h);
|
778 | }
|
779 | bool Type::insert(RamDomain a0,RamDomain a1,RamDomain a2,RamDomain a3,RamDomain a4,RamDomain a5) {
|
780 | RamDomain data[6] = {a0,a1,a2,a3,a4,a5};
|
781 | return insert(data);
|
782 | }
|
783 | bool Type::contains(const t_tuple& t, context& h) const {
|
784 | return ind_0.contains(t, h.hints_0_lower);
|
785 | }
|
786 | bool Type::contains(const t_tuple& t) const {
|
787 | context h;
|
788 | return contains(t, h);
|
789 | }
|
790 | std::size_t Type::size() const {
|
791 | return ind_0.size();
|
792 | }
|
793 | iterator Type::find(const t_tuple& t, context& h) const {
|
794 | return ind_0.find(t, h.hints_0_lower);
|
795 | }
|
796 | iterator Type::find(const t_tuple& t) const {
|
797 | context h;
|
798 | return find(t, h);
|
799 | }
|
800 | range<iterator> Type::lowerUpperRange_000000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const {
|
801 | return range<iterator>(ind_0.begin(),ind_0.end());
|
802 | }
|
803 | range<iterator> Type::lowerUpperRange_000000(const t_tuple& /* lower */, const t_tuple& /* upper */) const {
|
804 | return range<iterator>(ind_0.begin(),ind_0.end());
|
805 | }
|
806 | range<t_ind_0::iterator> Type::lowerUpperRange_111111(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
807 | t_comparator_0 comparator;
|
808 | int cmp = comparator(lower, upper);
|
809 | if (cmp == 0) {
|
810 | auto pos = ind_0.find(lower, h.hints_0_lower);
|
811 | auto fin = ind_0.end();
|
812 | if (pos != fin) {fin = pos; ++fin;}
|
813 | return make_range(pos, fin);
|
814 | }
|
815 | if (cmp > 0) {
|
816 | return make_range(ind_0.end(), ind_0.end());
|
817 | }
|
818 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
819 | }
|
820 | range<t_ind_0::iterator> Type::lowerUpperRange_111111(const t_tuple& lower, const t_tuple& upper) const {
|
821 | context h;
|
822 | return lowerUpperRange_111111(lower,upper,h);
|
823 | }
|
824 | range<t_ind_0::iterator> Type::lowerUpperRange_101000(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
825 | t_comparator_0 comparator;
|
826 | int cmp = comparator(lower, upper);
|
827 | if (cmp > 0) {
|
828 | return make_range(ind_0.end(), ind_0.end());
|
829 | }
|
830 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
831 | }
|
832 | range<t_ind_0::iterator> Type::lowerUpperRange_101000(const t_tuple& lower, const t_tuple& upper) const {
|
833 | context h;
|
834 | return lowerUpperRange_101000(lower,upper,h);
|
835 | }
|
836 | range<t_ind_0::iterator> Type::lowerUpperRange_101111(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
837 | t_comparator_0 comparator;
|
838 | int cmp = comparator(lower, upper);
|
839 | if (cmp > 0) {
|
840 | return make_range(ind_0.end(), ind_0.end());
|
841 | }
|
842 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
843 | }
|
844 | range<t_ind_0::iterator> Type::lowerUpperRange_101111(const t_tuple& lower, const t_tuple& upper) const {
|
845 | context h;
|
846 | return lowerUpperRange_101111(lower,upper,h);
|
847 | }
|
848 | bool Type::empty() const {
|
849 | return ind_0.empty();
|
850 | }
|
851 | std::vector<range<iterator>> Type::partition() const {
|
852 | return ind_0.getChunks(400);
|
853 | }
|
854 | void Type::purge() {
|
855 | ind_0.clear();
|
856 | }
|
857 | iterator Type::begin() const {
|
858 | return ind_0.begin();
|
859 | }
|
860 | iterator Type::end() const {
|
861 | return ind_0.end();
|
862 | }
|
863 | void Type::printStatistics(std::ostream& o) const {
|
864 | o << " arity 6 direct b-tree index 0 lex-order [0,2,3,4,5,1]\n";
|
865 | ind_0.printStats(o);
|
866 | }
|
867 | } // namespace souffle::t_btree_iiiiii__0_2_3_4_5_1__111111__101000__101111
|
868 | namespace souffle {
|
869 | using namespace souffle;
|
870 | class Stratum_CFGraph_edge_4d26e319bb257c49 {
|
871 | public:
|
872 | 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);
|
873 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
874 | private:
|
875 | SymbolTable& symTable;
|
876 | RecordTable& recordTable;
|
877 | ConcurrentCache<std::string,std::regex>& regexCache;
|
878 | bool& pruneImdtRels;
|
879 | bool& performIO;
|
880 | SignalHandler*& signalHandler;
|
881 | std::atomic<std::size_t>& iter;
|
882 | std::atomic<RamDomain>& ctr;
|
883 | std::string& inputDirectory;
|
884 | std::string& outputDirectory;
|
885 | t_btree_iiii__0_1_2_3__1110__1111::Type* rel_CFGraph_edge_db08b41d50d8a475;
|
886 | t_btree_iii__0_1_2__111::Type* rel_cf_edge_4931a04c8c74bb72;
|
887 | };
|
888 | } // namespace souffle
|
889 | namespace souffle {
|
890 | using namespace souffle;
|
891 | 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):
|
892 | symTable(symTable),
|
893 | recordTable(recordTable),
|
894 | regexCache(regexCache),
|
895 | pruneImdtRels(pruneImdtRels),
|
896 | performIO(performIO),
|
897 | signalHandler(signalHandler),
|
898 | iter(iter),
|
899 | ctr(ctr),
|
900 | inputDirectory(inputDirectory),
|
901 | outputDirectory(outputDirectory),
|
902 | rel_CFGraph_edge_db08b41d50d8a475(&rel_CFGraph_edge_db08b41d50d8a475),
|
903 | rel_cf_edge_4931a04c8c74bb72(&rel_cf_edge_4931a04c8c74bb72){
|
904 | }
|
905 |
|
906 | void Stratum_CFGraph_edge_4d26e319bb257c49::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
907 | signalHandler->setMsg(R"_(CFGraph.edge(f,s1,f,s2) :-
|
908 | cf_edge(f,s1,s2).
|
909 | in file control-flow.dl [34:1-34:50])_");
|
910 | if(!(rel_cf_edge_4931a04c8c74bb72->empty())) {
|
911 | [&](){
|
912 | CREATE_OP_CONTEXT(rel_CFGraph_edge_db08b41d50d8a475_op_ctxt,rel_CFGraph_edge_db08b41d50d8a475->createContext());
|
913 | CREATE_OP_CONTEXT(rel_cf_edge_4931a04c8c74bb72_op_ctxt,rel_cf_edge_4931a04c8c74bb72->createContext());
|
914 | for(const auto& env0 : *rel_cf_edge_4931a04c8c74bb72) {
|
915 | Tuple<RamDomain,4> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[0]),ramBitCast(env0[2])}};
|
916 | rel_CFGraph_edge_db08b41d50d8a475->insert(tuple,READ_OP_CONTEXT(rel_CFGraph_edge_db08b41d50d8a475_op_ctxt));
|
917 | }
|
918 | }
|
919 | ();}
|
920 | if (pruneImdtRels) rel_cf_edge_4931a04c8c74bb72->purge();
|
921 | }
|
922 |
|
923 | } // namespace souffle
|
924 |
|
925 | namespace souffle {
|
926 | using namespace souffle;
|
927 | class Stratum_CFGraph_reachable_7410d937e4ac8127 {
|
928 | public:
|
929 | 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);
|
930 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
931 | private:
|
932 | SymbolTable& symTable;
|
933 | RecordTable& recordTable;
|
934 | ConcurrentCache<std::string,std::regex>& regexCache;
|
935 | bool& pruneImdtRels;
|
936 | bool& performIO;
|
937 | SignalHandler*& signalHandler;
|
938 | std::atomic<std::size_t>& iter;
|
939 | std::atomic<RamDomain>& ctr;
|
940 | std::string& inputDirectory;
|
941 | std::string& outputDirectory;
|
942 | t_btree_iiii__0_1_2_3__1111::Type* rel_delta_CFGraph_reachable_3f3bf343bbb37861;
|
943 | t_btree_iiii__0_1_2_3__1111::Type* rel_new_CFGraph_reachable_c98538911662603c;
|
944 | t_btree_iiii__0_1_2_3__1110__1111::Type* rel_CFGraph_edge_db08b41d50d8a475;
|
945 | t_btree_iiii__0_1_2_3__1111::Type* rel_CFGraph_reachable_c344462befee4909;
|
946 | };
|
947 | } // namespace souffle
|
948 | namespace souffle {
|
949 | using namespace souffle;
|
950 | 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):
|
951 | symTable(symTable),
|
952 | recordTable(recordTable),
|
953 | regexCache(regexCache),
|
954 | pruneImdtRels(pruneImdtRels),
|
955 | performIO(performIO),
|
956 | signalHandler(signalHandler),
|
957 | iter(iter),
|
958 | ctr(ctr),
|
959 | inputDirectory(inputDirectory),
|
960 | outputDirectory(outputDirectory),
|
961 | rel_delta_CFGraph_reachable_3f3bf343bbb37861(&rel_delta_CFGraph_reachable_3f3bf343bbb37861),
|
962 | rel_new_CFGraph_reachable_c98538911662603c(&rel_new_CFGraph_reachable_c98538911662603c),
|
963 | rel_CFGraph_edge_db08b41d50d8a475(&rel_CFGraph_edge_db08b41d50d8a475),
|
964 | rel_CFGraph_reachable_c344462befee4909(&rel_CFGraph_reachable_c344462befee4909){
|
965 | }
|
966 |
|
967 | void Stratum_CFGraph_reachable_7410d937e4ac8127::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
968 | signalHandler->setMsg(R"_(CFGraph.reachable(f,s1,g,s2) :-
|
969 | CFGraph.edge(f,s1,g,s2).
|
970 | in file control-flow.dl [15:2-15:48])_");
|
971 | if(!(rel_CFGraph_edge_db08b41d50d8a475->empty())) {
|
972 | [&](){
|
973 | CREATE_OP_CONTEXT(rel_CFGraph_edge_db08b41d50d8a475_op_ctxt,rel_CFGraph_edge_db08b41d50d8a475->createContext());
|
974 | CREATE_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt,rel_CFGraph_reachable_c344462befee4909->createContext());
|
975 | for(const auto& env0 : *rel_CFGraph_edge_db08b41d50d8a475) {
|
976 | Tuple<RamDomain,4> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2]),ramBitCast(env0[3])}};
|
977 | rel_CFGraph_reachable_c344462befee4909->insert(tuple,READ_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt));
|
978 | }
|
979 | }
|
980 | ();}
|
981 | [&](){
|
982 | CREATE_OP_CONTEXT(rel_delta_CFGraph_reachable_3f3bf343bbb37861_op_ctxt,rel_delta_CFGraph_reachable_3f3bf343bbb37861->createContext());
|
983 | CREATE_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt,rel_CFGraph_reachable_c344462befee4909->createContext());
|
984 | for(const auto& env0 : *rel_CFGraph_reachable_c344462befee4909) {
|
985 | Tuple<RamDomain,4> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2]),ramBitCast(env0[3])}};
|
986 | rel_delta_CFGraph_reachable_3f3bf343bbb37861->insert(tuple,READ_OP_CONTEXT(rel_delta_CFGraph_reachable_3f3bf343bbb37861_op_ctxt));
|
987 | }
|
988 | }
|
989 | ();auto loop_counter = RamUnsigned(1);
|
990 | iter = 0;
|
991 | for(;;) {
|
992 | signalHandler->setMsg(R"_(CFGraph.reachable(f,s1,f,s3) :-
|
993 | CFGraph.reachable(f,s1,f,s2),
|
994 | CFGraph.edge(f,s2,f,s3).
|
995 | in file control-flow.dl [16:2-16:73])_");
|
996 | if(!(rel_delta_CFGraph_reachable_3f3bf343bbb37861->empty()) && !(rel_CFGraph_edge_db08b41d50d8a475->empty())) {
|
997 | [&](){
|
998 | CREATE_OP_CONTEXT(rel_delta_CFGraph_reachable_3f3bf343bbb37861_op_ctxt,rel_delta_CFGraph_reachable_3f3bf343bbb37861->createContext());
|
999 | CREATE_OP_CONTEXT(rel_new_CFGraph_reachable_c98538911662603c_op_ctxt,rel_new_CFGraph_reachable_c98538911662603c->createContext());
|
1000 | CREATE_OP_CONTEXT(rel_CFGraph_edge_db08b41d50d8a475_op_ctxt,rel_CFGraph_edge_db08b41d50d8a475->createContext());
|
1001 | CREATE_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt,rel_CFGraph_reachable_c344462befee4909->createContext());
|
1002 | for(const auto& env0 : *rel_delta_CFGraph_reachable_3f3bf343bbb37861) {
|
1003 | if( (ramBitCast<RamDomain>(env0[0]) == ramBitCast<RamDomain>(env0[2]))) {
|
1004 | 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));
|
1005 | for(const auto& env1 : range) {
|
1006 | 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)))) {
|
1007 | Tuple<RamDomain,4> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[0]),ramBitCast(env1[3])}};
|
1008 | rel_new_CFGraph_reachable_c98538911662603c->insert(tuple,READ_OP_CONTEXT(rel_new_CFGraph_reachable_c98538911662603c_op_ctxt));
|
1009 | }
|
1010 | }
|
1011 | }
|
1012 | }
|
1013 | }
|
1014 | ();}
|
1015 | if(rel_new_CFGraph_reachable_c98538911662603c->empty()) break;
|
1016 | [&](){
|
1017 | CREATE_OP_CONTEXT(rel_new_CFGraph_reachable_c98538911662603c_op_ctxt,rel_new_CFGraph_reachable_c98538911662603c->createContext());
|
1018 | CREATE_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt,rel_CFGraph_reachable_c344462befee4909->createContext());
|
1019 | for(const auto& env0 : *rel_new_CFGraph_reachable_c98538911662603c) {
|
1020 | Tuple<RamDomain,4> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2]),ramBitCast(env0[3])}};
|
1021 | rel_CFGraph_reachable_c344462befee4909->insert(tuple,READ_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt));
|
1022 | }
|
1023 | }
|
1024 | ();std::swap(rel_delta_CFGraph_reachable_3f3bf343bbb37861, rel_new_CFGraph_reachable_c98538911662603c);
|
1025 | rel_new_CFGraph_reachable_c98538911662603c->purge();
|
1026 | loop_counter = (ramBitCast<RamUnsigned>(loop_counter) + ramBitCast<RamUnsigned>(RamUnsigned(1)));
|
1027 | iter++;
|
1028 | }
|
1029 | iter = 0;
|
1030 | rel_delta_CFGraph_reachable_3f3bf343bbb37861->purge();
|
1031 | rel_new_CFGraph_reachable_c98538911662603c->purge();
|
1032 | if (pruneImdtRels) rel_CFGraph_edge_db08b41d50d8a475->purge();
|
1033 | }
|
1034 |
|
1035 | } // namespace souffle
|
1036 |
|
1037 | namespace souffle {
|
1038 | using namespace souffle;
|
1039 | class Stratum_alias_ba5aaebc28a379e5 {
|
1040 | public:
|
1041 | 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_iiiiii__0_2_3_4_5_1__111111__101000__101111::Type& rel_delta_alias_1a64c49de7b5c1e9,t_btree_iiiiii__0_2_3_4_5_1__111111__101000__101111::Type& rel_new_alias_025151f1f7ae88b8,t_btree_iiii__0_1_2_3__1111::Type& rel_CFGraph_reachable_c344462befee4909,t_btree_iiiiii__0_2_1_3_4_5__111111__101000::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);
|
1042 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
1043 | private:
|
1044 | SymbolTable& symTable;
|
1045 | RecordTable& recordTable;
|
1046 | ConcurrentCache<std::string,std::regex>& regexCache;
|
1047 | bool& pruneImdtRels;
|
1048 | bool& performIO;
|
1049 | SignalHandler*& signalHandler;
|
1050 | std::atomic<std::size_t>& iter;
|
1051 | std::atomic<RamDomain>& ctr;
|
1052 | std::string& inputDirectory;
|
1053 | std::string& outputDirectory;
|
1054 | t_btree_iiiiii__0_2_3_4_5_1__111111__101000__101111::Type* rel_delta_alias_1a64c49de7b5c1e9;
|
1055 | t_btree_iiiiii__0_2_3_4_5_1__111111__101000__101111::Type* rel_new_alias_025151f1f7ae88b8;
|
1056 | t_btree_iiii__0_1_2_3__1111::Type* rel_CFGraph_reachable_c344462befee4909;
|
1057 | t_btree_iiiiii__0_2_1_3_4_5__111111__101000::Type* rel_alias_36893f0f24e80d93;
|
1058 | t_btree_iiii__0_1_2_3__1000__1111::Type* rel_assign_e4bb6e0824a16a37;
|
1059 | t_btree_iii__0_1_2__111::Type* rel_define_04bf38853652ecf1;
|
1060 | };
|
1061 | } // namespace souffle
|
1062 | namespace souffle {
|
1063 | using namespace souffle;
|
1064 | 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_iiiiii__0_2_3_4_5_1__111111__101000__101111::Type& rel_delta_alias_1a64c49de7b5c1e9,t_btree_iiiiii__0_2_3_4_5_1__111111__101000__101111::Type& rel_new_alias_025151f1f7ae88b8,t_btree_iiii__0_1_2_3__1111::Type& rel_CFGraph_reachable_c344462befee4909,t_btree_iiiiii__0_2_1_3_4_5__111111__101000::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):
|
1065 | symTable(symTable),
|
1066 | recordTable(recordTable),
|
1067 | regexCache(regexCache),
|
1068 | pruneImdtRels(pruneImdtRels),
|
1069 | performIO(performIO),
|
1070 | signalHandler(signalHandler),
|
1071 | iter(iter),
|
1072 | ctr(ctr),
|
1073 | inputDirectory(inputDirectory),
|
1074 | outputDirectory(outputDirectory),
|
1075 | rel_delta_alias_1a64c49de7b5c1e9(&rel_delta_alias_1a64c49de7b5c1e9),
|
1076 | rel_new_alias_025151f1f7ae88b8(&rel_new_alias_025151f1f7ae88b8),
|
1077 | rel_CFGraph_reachable_c344462befee4909(&rel_CFGraph_reachable_c344462befee4909),
|
1078 | rel_alias_36893f0f24e80d93(&rel_alias_36893f0f24e80d93),
|
1079 | rel_assign_e4bb6e0824a16a37(&rel_assign_e4bb6e0824a16a37),
|
1080 | rel_define_04bf38853652ecf1(&rel_define_04bf38853652ecf1){
|
1081 | }
|
1082 |
|
1083 | void Stratum_alias_ba5aaebc28a379e5::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
1084 | signalHandler->setMsg(R"_(alias(f,s1,$Variable(v),f,s2,$Variable(v2)) :-
|
1085 | define(f,s1,$Variable(v)),
|
1086 | assign(f,s2,$Variable(v2),$Variable(v)),
|
1087 | CFGraph.reachable(f,s1,f,s2).
|
1088 | in file dataflow.dl [36:1-39:34])_");
|
1089 | if(!(rel_assign_e4bb6e0824a16a37->empty()) && !(rel_CFGraph_reachable_c344462befee4909->empty()) && !(rel_define_04bf38853652ecf1->empty())) {
|
1090 | [&](){
|
1091 | CREATE_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt,rel_CFGraph_reachable_c344462befee4909->createContext());
|
1092 | CREATE_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt,rel_alias_36893f0f24e80d93->createContext());
|
1093 | CREATE_OP_CONTEXT(rel_assign_e4bb6e0824a16a37_op_ctxt,rel_assign_e4bb6e0824a16a37->createContext());
|
1094 | CREATE_OP_CONTEXT(rel_define_04bf38853652ecf1_op_ctxt,rel_define_04bf38853652ecf1->createContext());
|
1095 | for(const auto& env0 : *rel_define_04bf38853652ecf1) {
|
1096 | RamDomain const ref = env0[2];
|
1097 | if (ref == 0) continue;
|
1098 | const RamDomain *env1 = recordTable.unpack(ref,2);
|
1099 | {
|
1100 | if( (ramBitCast<RamDomain>(env1[0]) == ramBitCast<RamDomain>(RamSigned(1)))) {
|
1101 | 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));
|
1102 | for(const auto& env2 : range) {
|
1103 | 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))) {
|
1104 | RamDomain const ref = env2[2];
|
1105 | if (ref == 0) continue;
|
1106 | const RamDomain *env3 = recordTable.unpack(ref,2);
|
1107 | {
|
1108 | if( (ramBitCast<RamDomain>(env3[0]) == ramBitCast<RamDomain>(RamSigned(1)))) {
|
1109 | RamDomain const ref = env2[3];
|
1110 | if (ref == 0) continue;
|
1111 | const RamDomain *env4 = recordTable.unpack(ref,2);
|
1112 | {
|
1113 | if( (ramBitCast<RamDomain>(env4[0]) == ramBitCast<RamDomain>(RamSigned(1))) && (ramBitCast<RamDomain>(env1[1]) == ramBitCast<RamDomain>(env4[1]))) {
|
1114 | Tuple<RamDomain,6> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(pack(recordTable,Tuple<RamDomain,2>{{ramBitCast(ramBitCast(RamSigned(1))),ramBitCast(ramBitCast(env1[1]))}}
|
1115 | )),ramBitCast(env0[0]),ramBitCast(env2[1]),ramBitCast(pack(recordTable,Tuple<RamDomain,2>{{ramBitCast(ramBitCast(RamSigned(1))),ramBitCast(ramBitCast(env3[1]))}}
|
1116 | ))}};
|
1117 | rel_alias_36893f0f24e80d93->insert(tuple,READ_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt));
|
1118 | }
|
1119 | }
|
1120 | }
|
1121 | }
|
1122 | }
|
1123 | }
|
1124 | }
|
1125 | }
|
1126 | }
|
1127 | }
|
1128 | ();}
|
1129 | signalHandler->setMsg(R"_(alias("<heap>",-1,$Member(c, m),f,s2,r) :-
|
1130 | assign(_,_,$Member(c, m),_),
|
1131 | assign(f,s2,r,$Member(c, m)).
|
1132 | in file dataflow.dl [45:1-47:34])_");
|
1133 | if(!(rel_assign_e4bb6e0824a16a37->empty())) {
|
1134 | [&](){
|
1135 | CREATE_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt,rel_alias_36893f0f24e80d93->createContext());
|
1136 | CREATE_OP_CONTEXT(rel_assign_e4bb6e0824a16a37_op_ctxt,rel_assign_e4bb6e0824a16a37->createContext());
|
1137 | for(const auto& env0 : *rel_assign_e4bb6e0824a16a37) {
|
1138 | RamDomain const ref = env0[2];
|
1139 | if (ref == 0) continue;
|
1140 | const RamDomain *env1 = recordTable.unpack(ref,2);
|
1141 | {
|
1142 | if( (ramBitCast<RamDomain>(env1[0]) == ramBitCast<RamDomain>(RamSigned(0)))) {
|
1143 | RamDomain const ref = env1[1];
|
1144 | if (ref == 0) continue;
|
1145 | const RamDomain *env2 = recordTable.unpack(ref,2);
|
1146 | {
|
1147 | for(const auto& env3 : *rel_assign_e4bb6e0824a16a37) {
|
1148 | RamDomain const ref = env3[3];
|
1149 | if (ref == 0) continue;
|
1150 | const RamDomain *env4 = recordTable.unpack(ref,2);
|
1151 | {
|
1152 | if( (ramBitCast<RamDomain>(env4[0]) == ramBitCast<RamDomain>(RamSigned(0)))) {
|
1153 | RamDomain const ref = env4[1];
|
1154 | if (ref == 0) continue;
|
1155 | const RamDomain *env5 = recordTable.unpack(ref,2);
|
1156 | {
|
1157 | if( (ramBitCast<RamDomain>(env2[1]) == ramBitCast<RamDomain>(env5[1])) && (ramBitCast<RamDomain>(env2[0]) == ramBitCast<RamDomain>(env5[0]))) {
|
1158 | 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]))}}
|
1159 | )))}}
|
1160 | )),ramBitCast(env3[0]),ramBitCast(env3[1]),ramBitCast(env3[2])}};
|
1161 | rel_alias_36893f0f24e80d93->insert(tuple,READ_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt));
|
1162 | }
|
1163 | }
|
1164 | }
|
1165 | }
|
1166 | }
|
1167 | }
|
1168 | }
|
1169 | }
|
1170 | }
|
1171 | }
|
1172 | ();}
|
1173 | signalHandler->setMsg(R"_(alias(f,s1,$Variable(v),"<heap>",-1,$Member(c, m)) :-
|
1174 | define(f,s1,$Variable(v)),
|
1175 | assign(f,s2,$Member(c, m),$Variable(v)),
|
1176 | CFGraph.reachable(f,s1,f,s2).
|
1177 | in file dataflow.dl [52:1-55:34])_");
|
1178 | if(!(rel_assign_e4bb6e0824a16a37->empty()) && !(rel_CFGraph_reachable_c344462befee4909->empty()) && !(rel_define_04bf38853652ecf1->empty())) {
|
1179 | [&](){
|
1180 | CREATE_OP_CONTEXT(rel_CFGraph_reachable_c344462befee4909_op_ctxt,rel_CFGraph_reachable_c344462befee4909->createContext());
|
1181 | CREATE_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt,rel_alias_36893f0f24e80d93->createContext());
|
1182 | CREATE_OP_CONTEXT(rel_assign_e4bb6e0824a16a37_op_ctxt,rel_assign_e4bb6e0824a16a37->createContext());
|
1183 | CREATE_OP_CONTEXT(rel_define_04bf38853652ecf1_op_ctxt,rel_define_04bf38853652ecf1->createContext());
|
1184 | for(const auto& env0 : *rel_define_04bf38853652ecf1) {
|
1185 | RamDomain const ref = env0[2];
|
1186 | if (ref == 0) continue;
|
1187 | const RamDomain *env1 = recordTable.unpack(ref,2);
|
1188 | {
|
1189 | if( (ramBitCast<RamDomain>(env1[0]) == ramBitCast<RamDomain>(RamSigned(1)))) {
|
1190 | 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));
|
1191 | for(const auto& env2 : range) {
|
1192 | 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))) {
|
1193 | RamDomain const ref = env2[2];
|
1194 | if (ref == 0) continue;
|
1195 | const RamDomain *env3 = recordTable.unpack(ref,2);
|
1196 | {
|
1197 | if( (ramBitCast<RamDomain>(env3[0]) == ramBitCast<RamDomain>(RamSigned(0)))) {
|
1198 | RamDomain const ref = env3[1];
|
1199 | if (ref == 0) continue;
|
1200 | const RamDomain *env4 = recordTable.unpack(ref,2);
|
1201 | {
|
1202 | RamDomain const ref = env2[3];
|
1203 | if (ref == 0) continue;
|
1204 | const RamDomain *env5 = recordTable.unpack(ref,2);
|
1205 | {
|
1206 | if( (ramBitCast<RamDomain>(env5[0]) == ramBitCast<RamDomain>(RamSigned(1))) && (ramBitCast<RamDomain>(env1[1]) == ramBitCast<RamDomain>(env5[1]))) {
|
1207 | Tuple<RamDomain,6> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(pack(recordTable,Tuple<RamDomain,2>{{ramBitCast(ramBitCast(RamSigned(1))),ramBitCast(ramBitCast(env1[1]))}}
|
1208 | )),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]))}}
|
1209 | )))}}
|
1210 | ))}};
|
1211 | rel_alias_36893f0f24e80d93->insert(tuple,READ_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt));
|
1212 | }
|
1213 | }
|
1214 | }
|
1215 | }
|
1216 | }
|
1217 | }
|
1218 | }
|
1219 | }
|
1220 | }
|
1221 | }
|
1222 | }
|
1223 | ();}
|
1224 | [&](){
|
1225 | CREATE_OP_CONTEXT(rel_delta_alias_1a64c49de7b5c1e9_op_ctxt,rel_delta_alias_1a64c49de7b5c1e9->createContext());
|
1226 | CREATE_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt,rel_alias_36893f0f24e80d93->createContext());
|
1227 | for(const auto& env0 : *rel_alias_36893f0f24e80d93) {
|
1228 | Tuple<RamDomain,6> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2]),ramBitCast(env0[3]),ramBitCast(env0[4]),ramBitCast(env0[5])}};
|
1229 | rel_delta_alias_1a64c49de7b5c1e9->insert(tuple,READ_OP_CONTEXT(rel_delta_alias_1a64c49de7b5c1e9_op_ctxt));
|
1230 | }
|
1231 | }
|
1232 | ();auto loop_counter = RamUnsigned(1);
|
1233 | iter = 0;
|
1234 | for(;;) {
|
1235 | signalHandler->setMsg(R"_(alias(f,s1,r,h,s2,r3) :-
|
1236 | alias(f,s1,r,g,_,r2),
|
1237 | alias(g,_,r2,h,s2,r3).
|
1238 | in file dataflow.dl [58:1-60:29])_");
|
1239 | if(!(rel_delta_alias_1a64c49de7b5c1e9->empty()) && !(rel_alias_36893f0f24e80d93->empty())) {
|
1240 | [&](){
|
1241 | CREATE_OP_CONTEXT(rel_delta_alias_1a64c49de7b5c1e9_op_ctxt,rel_delta_alias_1a64c49de7b5c1e9->createContext());
|
1242 | CREATE_OP_CONTEXT(rel_new_alias_025151f1f7ae88b8_op_ctxt,rel_new_alias_025151f1f7ae88b8->createContext());
|
1243 | CREATE_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt,rel_alias_36893f0f24e80d93->createContext());
|
1244 | for(const auto& env0 : *rel_delta_alias_1a64c49de7b5c1e9) {
|
1245 | auto range = rel_alias_36893f0f24e80d93->lowerUpperRange_101000(Tuple<RamDomain,6>{{ramBitCast(env0[3]), ramBitCast<RamDomain>(MIN_RAM_SIGNED), ramBitCast(env0[5]), ramBitCast<RamDomain>(MIN_RAM_SIGNED), ramBitCast<RamDomain>(MIN_RAM_SIGNED), ramBitCast<RamDomain>(MIN_RAM_SIGNED)}},Tuple<RamDomain,6>{{ramBitCast(env0[3]), ramBitCast<RamDomain>(MAX_RAM_SIGNED), ramBitCast(env0[5]), ramBitCast<RamDomain>(MAX_RAM_SIGNED), ramBitCast<RamDomain>(MAX_RAM_SIGNED), ramBitCast<RamDomain>(MAX_RAM_SIGNED)}},READ_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt));
|
1246 | for(const auto& env1 : range) {
|
1247 | if( !(rel_alias_36893f0f24e80d93->contains(Tuple<RamDomain,6>{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2]),ramBitCast(env1[3]),ramBitCast(env1[4]),ramBitCast(env1[5])}},READ_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt))) && !(!rel_delta_alias_1a64c49de7b5c1e9->lowerUpperRange_101111(Tuple<RamDomain,6>{{ramBitCast(env0[3]), ramBitCast<RamDomain>(MIN_RAM_SIGNED), ramBitCast(env0[5]), ramBitCast(env1[3]), ramBitCast(env1[4]), ramBitCast(env1[5])}},Tuple<RamDomain,6>{{ramBitCast(env0[3]), ramBitCast<RamDomain>(MAX_RAM_SIGNED), ramBitCast(env0[5]), ramBitCast(env1[3]), ramBitCast(env1[4]), ramBitCast(env1[5])}},READ_OP_CONTEXT(rel_delta_alias_1a64c49de7b5c1e9_op_ctxt)).empty())) {
|
1248 | Tuple<RamDomain,6> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2]),ramBitCast(env1[3]),ramBitCast(env1[4]),ramBitCast(env1[5])}};
|
1249 | rel_new_alias_025151f1f7ae88b8->insert(tuple,READ_OP_CONTEXT(rel_new_alias_025151f1f7ae88b8_op_ctxt));
|
1250 | }
|
1251 | }
|
1252 | }
|
1253 | }
|
1254 | ();}
|
1255 | signalHandler->setMsg(R"_(alias(f,s1,r,h,s2,r3) :-
|
1256 | alias(f,s1,r,g,_,r2),
|
1257 | alias(g,_,r2,h,s2,r3).
|
1258 | in file dataflow.dl [58:1-60:29])_");
|
1259 | if(!(rel_alias_36893f0f24e80d93->empty()) && !(rel_delta_alias_1a64c49de7b5c1e9->empty())) {
|
1260 | [&](){
|
1261 | CREATE_OP_CONTEXT(rel_delta_alias_1a64c49de7b5c1e9_op_ctxt,rel_delta_alias_1a64c49de7b5c1e9->createContext());
|
1262 | CREATE_OP_CONTEXT(rel_new_alias_025151f1f7ae88b8_op_ctxt,rel_new_alias_025151f1f7ae88b8->createContext());
|
1263 | CREATE_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt,rel_alias_36893f0f24e80d93->createContext());
|
1264 | for(const auto& env0 : *rel_alias_36893f0f24e80d93) {
|
1265 | auto range = rel_delta_alias_1a64c49de7b5c1e9->lowerUpperRange_101000(Tuple<RamDomain,6>{{ramBitCast(env0[3]), ramBitCast<RamDomain>(MIN_RAM_SIGNED), ramBitCast(env0[5]), ramBitCast<RamDomain>(MIN_RAM_SIGNED), ramBitCast<RamDomain>(MIN_RAM_SIGNED), ramBitCast<RamDomain>(MIN_RAM_SIGNED)}},Tuple<RamDomain,6>{{ramBitCast(env0[3]), ramBitCast<RamDomain>(MAX_RAM_SIGNED), ramBitCast(env0[5]), ramBitCast<RamDomain>(MAX_RAM_SIGNED), ramBitCast<RamDomain>(MAX_RAM_SIGNED), ramBitCast<RamDomain>(MAX_RAM_SIGNED)}},READ_OP_CONTEXT(rel_delta_alias_1a64c49de7b5c1e9_op_ctxt));
|
1266 | for(const auto& env1 : range) {
|
1267 | if( !(rel_alias_36893f0f24e80d93->contains(Tuple<RamDomain,6>{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2]),ramBitCast(env1[3]),ramBitCast(env1[4]),ramBitCast(env1[5])}},READ_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt)))) {
|
1268 | Tuple<RamDomain,6> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2]),ramBitCast(env1[3]),ramBitCast(env1[4]),ramBitCast(env1[5])}};
|
1269 | rel_new_alias_025151f1f7ae88b8->insert(tuple,READ_OP_CONTEXT(rel_new_alias_025151f1f7ae88b8_op_ctxt));
|
1270 | }
|
1271 | }
|
1272 | }
|
1273 | }
|
1274 | ();}
|
1275 | if(rel_new_alias_025151f1f7ae88b8->empty()) break;
|
1276 | [&](){
|
1277 | CREATE_OP_CONTEXT(rel_new_alias_025151f1f7ae88b8_op_ctxt,rel_new_alias_025151f1f7ae88b8->createContext());
|
1278 | CREATE_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt,rel_alias_36893f0f24e80d93->createContext());
|
1279 | for(const auto& env0 : *rel_new_alias_025151f1f7ae88b8) {
|
1280 | Tuple<RamDomain,6> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2]),ramBitCast(env0[3]),ramBitCast(env0[4]),ramBitCast(env0[5])}};
|
1281 | rel_alias_36893f0f24e80d93->insert(tuple,READ_OP_CONTEXT(rel_alias_36893f0f24e80d93_op_ctxt));
|
1282 | }
|
1283 | }
|
1284 | ();std::swap(rel_delta_alias_1a64c49de7b5c1e9, rel_new_alias_025151f1f7ae88b8);
|
1285 | rel_new_alias_025151f1f7ae88b8->purge();
|
1286 | loop_counter = (ramBitCast<RamUnsigned>(loop_counter) + ramBitCast<RamUnsigned>(RamUnsigned(1)));
|
1287 | iter++;
|
1288 | }
|
1289 | iter = 0;
|
1290 | rel_delta_alias_1a64c49de7b5c1e9->purge();
|
1291 | rel_new_alias_025151f1f7ae88b8->purge();
|
1292 | if (performIO) {
|
1293 | 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\"]}}"}});
|
1294 | if (outputDirectory == "-"){directiveMap["IO"] = "stdout"; directiveMap["headers"] = "true";}
|
1295 | else if (!outputDirectory.empty()) {directiveMap["output-dir"] = outputDirectory;}
|
1296 | IOSystem::getInstance().getWriter(directiveMap, symTable, recordTable)->writeAll(*rel_alias_36893f0f24e80d93);
|
1297 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
1298 | }
|
1299 | if (pruneImdtRels) rel_CFGraph_reachable_c344462befee4909->purge();
|
1300 | if (pruneImdtRels) rel_assign_e4bb6e0824a16a37->purge();
|
1301 | if (pruneImdtRels) rel_define_04bf38853652ecf1->purge();
|
1302 | }
|
1303 |
|
1304 | } // namespace souffle
|
1305 |
|
1306 | namespace souffle {
|
1307 | using namespace souffle;
|
1308 | class Stratum_assign_e0d78e44f4df6411 {
|
1309 | public:
|
1310 | 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);
|
1311 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
1312 | private:
|
1313 | SymbolTable& symTable;
|
1314 | RecordTable& recordTable;
|
1315 | ConcurrentCache<std::string,std::regex>& regexCache;
|
1316 | bool& pruneImdtRels;
|
1317 | bool& performIO;
|
1318 | SignalHandler*& signalHandler;
|
1319 | std::atomic<std::size_t>& iter;
|
1320 | std::atomic<RamDomain>& ctr;
|
1321 | std::string& inputDirectory;
|
1322 | std::string& outputDirectory;
|
1323 | t_btree_iiii__0_1_2_3__1000__1111::Type* rel_assign_e4bb6e0824a16a37;
|
1324 | };
|
1325 | } // namespace souffle
|
1326 | namespace souffle {
|
1327 | using namespace souffle;
|
1328 | 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):
|
1329 | symTable(symTable),
|
1330 | recordTable(recordTable),
|
1331 | regexCache(regexCache),
|
1332 | pruneImdtRels(pruneImdtRels),
|
1333 | performIO(performIO),
|
1334 | signalHandler(signalHandler),
|
1335 | iter(iter),
|
1336 | ctr(ctr),
|
1337 | inputDirectory(inputDirectory),
|
1338 | outputDirectory(outputDirectory),
|
1339 | rel_assign_e4bb6e0824a16a37(&rel_assign_e4bb6e0824a16a37){
|
1340 | }
|
1341 |
|
1342 | void Stratum_assign_e0d78e44f4df6411::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
1343 | if (performIO) {
|
1344 | 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\"]}}"}});
|
1345 | if (!inputDirectory.empty()) {directiveMap["fact-dir"] = inputDirectory;}
|
1346 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_assign_e4bb6e0824a16a37);
|
1347 | } catch (std::exception& e) {std::cerr << "Error loading assign data: " << e.what() << '\n';
|
1348 | exit(1);
|
1349 | }
|
1350 | }
|
1351 | }
|
1352 |
|
1353 | } // namespace souffle
|
1354 |
|
1355 | namespace souffle {
|
1356 | using namespace souffle;
|
1357 | class Stratum_cf_edge_c2ae152829fd6f1f {
|
1358 | public:
|
1359 | 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);
|
1360 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
1361 | private:
|
1362 | SymbolTable& symTable;
|
1363 | RecordTable& recordTable;
|
1364 | ConcurrentCache<std::string,std::regex>& regexCache;
|
1365 | bool& pruneImdtRels;
|
1366 | bool& performIO;
|
1367 | SignalHandler*& signalHandler;
|
1368 | std::atomic<std::size_t>& iter;
|
1369 | std::atomic<RamDomain>& ctr;
|
1370 | std::string& inputDirectory;
|
1371 | std::string& outputDirectory;
|
1372 | t_btree_iii__0_1_2__111::Type* rel_cf_edge_4931a04c8c74bb72;
|
1373 | };
|
1374 | } // namespace souffle
|
1375 | namespace souffle {
|
1376 | using namespace souffle;
|
1377 | 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):
|
1378 | symTable(symTable),
|
1379 | recordTable(recordTable),
|
1380 | regexCache(regexCache),
|
1381 | pruneImdtRels(pruneImdtRels),
|
1382 | performIO(performIO),
|
1383 | signalHandler(signalHandler),
|
1384 | iter(iter),
|
1385 | ctr(ctr),
|
1386 | inputDirectory(inputDirectory),
|
1387 | outputDirectory(outputDirectory),
|
1388 | rel_cf_edge_4931a04c8c74bb72(&rel_cf_edge_4931a04c8c74bb72){
|
1389 | }
|
1390 |
|
1391 | void Stratum_cf_edge_c2ae152829fd6f1f::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
1392 | if (performIO) {
|
1393 | 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\"]}}"}});
|
1394 | if (!inputDirectory.empty()) {directiveMap["fact-dir"] = inputDirectory;}
|
1395 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_cf_edge_4931a04c8c74bb72);
|
1396 | } catch (std::exception& e) {std::cerr << "Error loading cf_edge data: " << e.what() << '\n';
|
1397 | exit(1);
|
1398 | }
|
1399 | }
|
1400 | }
|
1401 |
|
1402 | } // namespace souffle
|
1403 |
|
1404 | namespace souffle {
|
1405 | using namespace souffle;
|
1406 | class Stratum_define_391884c8e77907db {
|
1407 | public:
|
1408 | 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);
|
1409 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
1410 | private:
|
1411 | SymbolTable& symTable;
|
1412 | RecordTable& recordTable;
|
1413 | ConcurrentCache<std::string,std::regex>& regexCache;
|
1414 | bool& pruneImdtRels;
|
1415 | bool& performIO;
|
1416 | SignalHandler*& signalHandler;
|
1417 | std::atomic<std::size_t>& iter;
|
1418 | std::atomic<RamDomain>& ctr;
|
1419 | std::string& inputDirectory;
|
1420 | std::string& outputDirectory;
|
1421 | t_btree_iiii__0_1_2_3__1000__1111::Type* rel_assign_e4bb6e0824a16a37;
|
1422 | t_btree_iii__0_1_2__111::Type* rel_define_04bf38853652ecf1;
|
1423 | };
|
1424 | } // namespace souffle
|
1425 | namespace souffle {
|
1426 | using namespace souffle;
|
1427 | 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):
|
1428 | symTable(symTable),
|
1429 | recordTable(recordTable),
|
1430 | regexCache(regexCache),
|
1431 | pruneImdtRels(pruneImdtRels),
|
1432 | performIO(performIO),
|
1433 | signalHandler(signalHandler),
|
1434 | iter(iter),
|
1435 | ctr(ctr),
|
1436 | inputDirectory(inputDirectory),
|
1437 | outputDirectory(outputDirectory),
|
1438 | rel_assign_e4bb6e0824a16a37(&rel_assign_e4bb6e0824a16a37),
|
1439 | rel_define_04bf38853652ecf1(&rel_define_04bf38853652ecf1){
|
1440 | }
|
1441 |
|
1442 | void Stratum_define_391884c8e77907db::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
1443 | if (performIO) {
|
1444 | 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\"]}}"}});
|
1445 | if (!inputDirectory.empty()) {directiveMap["fact-dir"] = inputDirectory;}
|
1446 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_define_04bf38853652ecf1);
|
1447 | } catch (std::exception& e) {std::cerr << "Error loading define data: " << e.what() << '\n';
|
1448 | exit(1);
|
1449 | }
|
1450 | }
|
1451 | signalHandler->setMsg(R"_(define(f,s,r) :-
|
1452 | assign(f,s,r,_).
|
1453 | in file dataflow.dl [31:1-31:39])_");
|
1454 | if(!(rel_assign_e4bb6e0824a16a37->empty())) {
|
1455 | [&](){
|
1456 | CREATE_OP_CONTEXT(rel_assign_e4bb6e0824a16a37_op_ctxt,rel_assign_e4bb6e0824a16a37->createContext());
|
1457 | CREATE_OP_CONTEXT(rel_define_04bf38853652ecf1_op_ctxt,rel_define_04bf38853652ecf1->createContext());
|
1458 | for(const auto& env0 : *rel_assign_e4bb6e0824a16a37) {
|
1459 | Tuple<RamDomain,3> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1]),ramBitCast(env0[2])}};
|
1460 | rel_define_04bf38853652ecf1->insert(tuple,READ_OP_CONTEXT(rel_define_04bf38853652ecf1_op_ctxt));
|
1461 | }
|
1462 | }
|
1463 | ();}
|
1464 | }
|
1465 |
|
1466 | } // namespace souffle
|
1467 |
|
1468 | namespace souffle {
|
1469 | using namespace souffle;
|
1470 | class Sf__: public SouffleProgram {
|
1471 | public:
|
1472 | Sf__();
|
1473 | ~Sf__();
|
1474 | void run();
|
1475 | void runAll(std::string inputDirectoryArg = "",std::string outputDirectoryArg = "",bool performIOArg = true,bool pruneImdtRelsArg = true);
|
1476 | void printAll([[maybe_unused]] std::string outputDirectoryArg = "");
|
1477 | void loadAll([[maybe_unused]] std::string inputDirectoryArg = "");
|
1478 | void dumpInputs();
|
1479 | void dumpOutputs();
|
1480 | SymbolTable& getSymbolTable();
|
1481 | RecordTable& getRecordTable();
|
1482 | void setNumThreads(std::size_t numThreadsValue);
|
1483 | void executeSubroutine(std::string name,const std::vector<RamDomain>& args,std::vector<RamDomain>& ret);
|
1484 | private:
|
1485 | void runFunction(std::string inputDirectoryArg,std::string outputDirectoryArg,bool performIOArg,bool pruneImdtRelsArg);
|
1486 | SymbolTableImpl symTable;
|
1487 | SpecializedRecordTable<0,2> recordTable;
|
1488 | ConcurrentCache<std::string,std::regex> regexCache;
|
1489 | Own<t_btree_iii__0_1_2__111::Type> rel_cf_edge_4931a04c8c74bb72;
|
1490 | souffle::RelationWrapper<t_btree_iii__0_1_2__111::Type> wrapper_rel_cf_edge_4931a04c8c74bb72;
|
1491 | Own<t_btree_iiii__0_1_2_3__1110__1111::Type> rel_CFGraph_edge_db08b41d50d8a475;
|
1492 | souffle::RelationWrapper<t_btree_iiii__0_1_2_3__1110__1111::Type> wrapper_rel_CFGraph_edge_db08b41d50d8a475;
|
1493 | Own<t_btree_iiii__0_1_2_3__1111::Type> rel_CFGraph_reachable_c344462befee4909;
|
1494 | souffle::RelationWrapper<t_btree_iiii__0_1_2_3__1111::Type> wrapper_rel_CFGraph_reachable_c344462befee4909;
|
1495 | Own<t_btree_iiii__0_1_2_3__1111::Type> rel_delta_CFGraph_reachable_3f3bf343bbb37861;
|
1496 | Own<t_btree_iiii__0_1_2_3__1111::Type> rel_new_CFGraph_reachable_c98538911662603c;
|
1497 | Own<t_btree_iiii__0_1_2_3__1000__1111::Type> rel_assign_e4bb6e0824a16a37;
|
1498 | souffle::RelationWrapper<t_btree_iiii__0_1_2_3__1000__1111::Type> wrapper_rel_assign_e4bb6e0824a16a37;
|
1499 | Own<t_btree_iii__0_1_2__111::Type> rel_define_04bf38853652ecf1;
|
1500 | souffle::RelationWrapper<t_btree_iii__0_1_2__111::Type> wrapper_rel_define_04bf38853652ecf1;
|
1501 | Own<t_btree_iiiiii__0_2_1_3_4_5__111111__101000::Type> rel_alias_36893f0f24e80d93;
|
1502 | souffle::RelationWrapper<t_btree_iiiiii__0_2_1_3_4_5__111111__101000::Type> wrapper_rel_alias_36893f0f24e80d93;
|
1503 | Own<t_btree_iiiiii__0_2_3_4_5_1__111111__101000__101111::Type> rel_delta_alias_1a64c49de7b5c1e9;
|
1504 | Own<t_btree_iiiiii__0_2_3_4_5_1__111111__101000__101111::Type> rel_new_alias_025151f1f7ae88b8;
|
1505 | Stratum_CFGraph_edge_4d26e319bb257c49 stratum_CFGraph_edge_656704795f0096ba;
|
1506 | Stratum_CFGraph_reachable_7410d937e4ac8127 stratum_CFGraph_reachable_a1359c86b6f7bd73;
|
1507 | Stratum_alias_ba5aaebc28a379e5 stratum_alias_0179d0f4f86c77c2;
|
1508 | Stratum_assign_e0d78e44f4df6411 stratum_assign_f550d366a9215d2a;
|
1509 | Stratum_cf_edge_c2ae152829fd6f1f stratum_cf_edge_4017fef287699967;
|
1510 | Stratum_define_391884c8e77907db stratum_define_ab922eb7ee2d8992;
|
1511 | std::string inputDirectory;
|
1512 | std::string outputDirectory;
|
1513 | SignalHandler* signalHandler{SignalHandler::instance()};
|
1514 | std::atomic<RamDomain> ctr{};
|
1515 | std::atomic<std::size_t> iter{};
|
1516 | };
|
1517 | } // namespace souffle
|
1518 | namespace souffle {
|
1519 | using namespace souffle;
|
1520 | Sf__::Sf__():
|
1521 | symTable({
|
1522 | R"_(<heap>)_",
|
1523 | }),
|
1524 | recordTable(),
|
1525 | regexCache(),
|
1526 | rel_cf_edge_4931a04c8c74bb72(mk<t_btree_iii__0_1_2__111::Type>()),
|
1527 | 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),
|
1528 | rel_CFGraph_edge_db08b41d50d8a475(mk<t_btree_iiii__0_1_2_3__1110__1111::Type>()),
|
1529 | 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),
|
1530 | rel_CFGraph_reachable_c344462befee4909(mk<t_btree_iiii__0_1_2_3__1111::Type>()),
|
1531 | 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),
|
1532 | rel_delta_CFGraph_reachable_3f3bf343bbb37861(mk<t_btree_iiii__0_1_2_3__1111::Type>()),
|
1533 | rel_new_CFGraph_reachable_c98538911662603c(mk<t_btree_iiii__0_1_2_3__1111::Type>()),
|
1534 | rel_assign_e4bb6e0824a16a37(mk<t_btree_iiii__0_1_2_3__1000__1111::Type>()),
|
1535 | 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),
|
1536 | rel_define_04bf38853652ecf1(mk<t_btree_iii__0_1_2__111::Type>()),
|
1537 | 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),
|
1538 | rel_alias_36893f0f24e80d93(mk<t_btree_iiiiii__0_2_1_3_4_5__111111__101000::Type>()),
|
1539 | 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),
|
1540 | rel_delta_alias_1a64c49de7b5c1e9(mk<t_btree_iiiiii__0_2_3_4_5_1__111111__101000__101111::Type>()),
|
1541 | rel_new_alias_025151f1f7ae88b8(mk<t_btree_iiiiii__0_2_3_4_5_1__111111__101000__101111::Type>()),
|
1542 | stratum_CFGraph_edge_656704795f0096ba(symTable,recordTable,regexCache,pruneImdtRels,performIO,signalHandler,iter,ctr,inputDirectory,outputDirectory,*rel_CFGraph_edge_db08b41d50d8a475,*rel_cf_edge_4931a04c8c74bb72),
|
1543 | 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),
|
1544 | stratum_alias_0179d0f4f86c77c2(symTable,recordTable,regexCache,pruneImdtRels,performIO,signalHandler,iter,ctr,inputDirectory,outputDirectory,*rel_delta_alias_1a64c49de7b5c1e9,*rel_new_alias_025151f1f7ae88b8,*rel_CFGraph_reachable_c344462befee4909,*rel_alias_36893f0f24e80d93,*rel_assign_e4bb6e0824a16a37,*rel_define_04bf38853652ecf1),
|
1545 | stratum_assign_f550d366a9215d2a(symTable,recordTable,regexCache,pruneImdtRels,performIO,signalHandler,iter,ctr,inputDirectory,outputDirectory,*rel_assign_e4bb6e0824a16a37),
|
1546 | stratum_cf_edge_4017fef287699967(symTable,recordTable,regexCache,pruneImdtRels,performIO,signalHandler,iter,ctr,inputDirectory,outputDirectory,*rel_cf_edge_4931a04c8c74bb72),
|
1547 | stratum_define_ab922eb7ee2d8992(symTable,recordTable,regexCache,pruneImdtRels,performIO,signalHandler,iter,ctr,inputDirectory,outputDirectory,*rel_assign_e4bb6e0824a16a37,*rel_define_04bf38853652ecf1){
|
1548 | addRelation("cf_edge", wrapper_rel_cf_edge_4931a04c8c74bb72, true, false);
|
1549 | addRelation("CFGraph.edge", wrapper_rel_CFGraph_edge_db08b41d50d8a475, false, false);
|
1550 | addRelation("CFGraph.reachable", wrapper_rel_CFGraph_reachable_c344462befee4909, false, false);
|
1551 | addRelation("assign", wrapper_rel_assign_e4bb6e0824a16a37, true, false);
|
1552 | addRelation("define", wrapper_rel_define_04bf38853652ecf1, true, false);
|
1553 | addRelation("alias", wrapper_rel_alias_36893f0f24e80d93, false, true);
|
1554 | }
|
1555 |
|
1556 | Sf__::~Sf__(){
|
1557 | }
|
1558 |
|
1559 | void Sf__::runFunction(std::string inputDirectoryArg,std::string outputDirectoryArg,bool performIOArg,bool pruneImdtRelsArg){
|
1560 |
|
1561 | this->inputDirectory = std::move(inputDirectoryArg);
|
1562 | this->outputDirectory = std::move(outputDirectoryArg);
|
1563 | this->performIO = performIOArg;
|
1564 | this->pruneImdtRels = pruneImdtRelsArg;
|
1565 |
|
1566 | // set default threads (in embedded mode)
|
1567 | // if this is not set, and omp is used, the default omp setting of number of cores is used.
|
1568 | #if defined(_OPENMP)
|
1569 | if (0 < getNumThreads()) { omp_set_num_threads(static_cast<int>(getNumThreads())); }
|
1570 | #endif
|
1571 |
|
1572 | signalHandler->set();
|
1573 | // -- query evaluation --
|
1574 | {
|
1575 | std::vector<RamDomain> args, ret;
|
1576 | stratum_cf_edge_4017fef287699967.run(args, ret);
|
1577 | }
|
1578 | {
|
1579 | std::vector<RamDomain> args, ret;
|
1580 | stratum_CFGraph_edge_656704795f0096ba.run(args, ret);
|
1581 | }
|
1582 | {
|
1583 | std::vector<RamDomain> args, ret;
|
1584 | stratum_CFGraph_reachable_a1359c86b6f7bd73.run(args, ret);
|
1585 | }
|
1586 | {
|
1587 | std::vector<RamDomain> args, ret;
|
1588 | stratum_assign_f550d366a9215d2a.run(args, ret);
|
1589 | }
|
1590 | {
|
1591 | std::vector<RamDomain> args, ret;
|
1592 | stratum_define_ab922eb7ee2d8992.run(args, ret);
|
1593 | }
|
1594 | {
|
1595 | std::vector<RamDomain> args, ret;
|
1596 | stratum_alias_0179d0f4f86c77c2.run(args, ret);
|
1597 | }
|
1598 |
|
1599 | // -- relation hint statistics --
|
1600 | signalHandler->reset();
|
1601 | }
|
1602 |
|
1603 | void Sf__::run(){
|
1604 | runFunction("", "", false, false);
|
1605 | }
|
1606 |
|
1607 | void Sf__::runAll(std::string inputDirectoryArg,std::string outputDirectoryArg,bool performIOArg,bool pruneImdtRelsArg){
|
1608 | runFunction(inputDirectoryArg, outputDirectoryArg, performIOArg, pruneImdtRelsArg);
|
1609 | }
|
1610 |
|
1611 | void Sf__::printAll([[maybe_unused]] std::string outputDirectoryArg){
|
1612 | 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\"]}}"}});
|
1613 | if (!outputDirectoryArg.empty()) {directiveMap["output-dir"] = outputDirectoryArg;}
|
1614 | IOSystem::getInstance().getWriter(directiveMap, symTable, recordTable)->writeAll(*rel_alias_36893f0f24e80d93);
|
1615 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
1616 | }
|
1617 |
|
1618 | void Sf__::loadAll([[maybe_unused]] std::string inputDirectoryArg){
|
1619 | 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\"]}}"}});
|
1620 | if (!inputDirectoryArg.empty()) {directiveMap["fact-dir"] = inputDirectoryArg;}
|
1621 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_assign_e4bb6e0824a16a37);
|
1622 | } catch (std::exception& e) {std::cerr << "Error loading assign data: " << e.what() << '\n';
|
1623 | exit(1);
|
1624 | }
|
1625 | 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\"]}}"}});
|
1626 | if (!inputDirectoryArg.empty()) {directiveMap["fact-dir"] = inputDirectoryArg;}
|
1627 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_cf_edge_4931a04c8c74bb72);
|
1628 | } catch (std::exception& e) {std::cerr << "Error loading cf_edge data: " << e.what() << '\n';
|
1629 | exit(1);
|
1630 | }
|
1631 | 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\"]}}"}});
|
1632 | if (!inputDirectoryArg.empty()) {directiveMap["fact-dir"] = inputDirectoryArg;}
|
1633 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_define_04bf38853652ecf1);
|
1634 | } catch (std::exception& e) {std::cerr << "Error loading define data: " << e.what() << '\n';
|
1635 | exit(1);
|
1636 | }
|
1637 | }
|
1638 |
|
1639 | void Sf__::dumpInputs(){
|
1640 | try {std::map<std::string, std::string> rwOperation;
|
1641 | rwOperation["IO"] = "stdout";
|
1642 | rwOperation["name"] = "assign";
|
1643 | rwOperation["types"] = "{\"relation\": {\"arity\": 4, \"auxArity\": 0, \"types\": [\"s:Function\", \"i:Statement\", \"+:Reference\", \"+:Reference\"]}}";
|
1644 | IOSystem::getInstance().getWriter(rwOperation, symTable, recordTable)->writeAll(*rel_assign_e4bb6e0824a16a37);
|
1645 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
1646 | try {std::map<std::string, std::string> rwOperation;
|
1647 | rwOperation["IO"] = "stdout";
|
1648 | rwOperation["name"] = "cf_edge";
|
1649 | rwOperation["types"] = "{\"relation\": {\"arity\": 3, \"auxArity\": 0, \"types\": [\"s:Function\", \"i:Statement\", \"i:Statement\"]}}";
|
1650 | IOSystem::getInstance().getWriter(rwOperation, symTable, recordTable)->writeAll(*rel_cf_edge_4931a04c8c74bb72);
|
1651 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
1652 | try {std::map<std::string, std::string> rwOperation;
|
1653 | rwOperation["IO"] = "stdout";
|
1654 | rwOperation["name"] = "define";
|
1655 | rwOperation["types"] = "{\"relation\": {\"arity\": 3, \"auxArity\": 0, \"types\": [\"s:Function\", \"i:Statement\", \"+:Reference\"]}}";
|
1656 | IOSystem::getInstance().getWriter(rwOperation, symTable, recordTable)->writeAll(*rel_define_04bf38853652ecf1);
|
1657 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
1658 | }
|
1659 |
|
1660 | void Sf__::dumpOutputs(){
|
1661 | try {std::map<std::string, std::string> rwOperation;
|
1662 | rwOperation["IO"] = "stdout";
|
1663 | rwOperation["name"] = "alias";
|
1664 | rwOperation["types"] = "{\"relation\": {\"arity\": 6, \"auxArity\": 0, \"types\": [\"s:Function\", \"i:Statement\", \"+:Reference\", \"s:Function\", \"i:Statement\", \"+:Reference\"]}}";
|
1665 | IOSystem::getInstance().getWriter(rwOperation, symTable, recordTable)->writeAll(*rel_alias_36893f0f24e80d93);
|
1666 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
1667 | }
|
1668 |
|
1669 | SymbolTable& Sf__::getSymbolTable(){
|
1670 | return symTable;
|
1671 | }
|
1672 |
|
1673 | RecordTable& Sf__::getRecordTable(){
|
1674 | return recordTable;
|
1675 | }
|
1676 |
|
1677 | void Sf__::setNumThreads(std::size_t numThreadsValue){
|
1678 | SouffleProgram::setNumThreads(numThreadsValue);
|
1679 | symTable.setNumLanes(getNumThreads());
|
1680 | recordTable.setNumLanes(getNumThreads());
|
1681 | regexCache.setNumLanes(getNumThreads());
|
1682 | }
|
1683 |
|
1684 | void Sf__::executeSubroutine(std::string name,const std::vector<RamDomain>& args,std::vector<RamDomain>& ret){
|
1685 | if (name == "CFGraph.edge") {
|
1686 | stratum_CFGraph_edge_656704795f0096ba.run(args, ret);
|
1687 | return;}
|
1688 | if (name == "CFGraph.reachable") {
|
1689 | stratum_CFGraph_reachable_a1359c86b6f7bd73.run(args, ret);
|
1690 | return;}
|
1691 | if (name == "alias") {
|
1692 | stratum_alias_0179d0f4f86c77c2.run(args, ret);
|
1693 | return;}
|
1694 | if (name == "assign") {
|
1695 | stratum_assign_f550d366a9215d2a.run(args, ret);
|
1696 | return;}
|
1697 | if (name == "cf_edge") {
|
1698 | stratum_cf_edge_4017fef287699967.run(args, ret);
|
1699 | return;}
|
1700 | if (name == "define") {
|
1701 | stratum_define_ab922eb7ee2d8992.run(args, ret);
|
1702 | return;}
|
1703 | fatal(("unknown subroutine " + name).c_str());
|
1704 | }
|
1705 |
|
1706 | } // namespace souffle
|
1707 | namespace souffle {
|
1708 | SouffleProgram *newInstance__(){return new souffle::Sf__;}
|
1709 | SymbolTable *getST__(SouffleProgram *p){return &reinterpret_cast<souffle::Sf__*>(p)->getSymbolTable();}
|
1710 | } // namespace souffle
|
1711 |
|
1712 | #ifndef __EMBEDDED_SOUFFLE__
|
1713 | #include "souffle/CompiledOptions.h"
|
1714 | int main(int argc, char** argv)
|
1715 | {
|
1716 | try{
|
1717 | souffle::CmdOptions opt(R"(mycpp/datalog/dataflow.dl)",
|
1718 | R"()",
|
1719 | R"()",
|
1720 | false,
|
1721 | R"()",
|
1722 | 1);
|
1723 | if (!opt.parse(argc,argv)) return 1;
|
1724 | souffle::Sf__ obj;
|
1725 | #if defined(_OPENMP)
|
1726 | obj.setNumThreads(opt.getNumJobs());
|
1727 |
|
1728 | #endif
|
1729 | obj.runAll(opt.getInputFileDir(), opt.getOutputFileDir());
|
1730 | return 0;
|
1731 | } catch(std::exception &e) { souffle::SignalHandler::instance()->error(e.what());}
|
1732 | }
|
1733 | #endif
|
1734 |
|
1735 | namespace souffle {
|
1736 | using namespace souffle;
|
1737 | class factory_Sf__: souffle::ProgramFactory {
|
1738 | public:
|
1739 | souffle::SouffleProgram* newInstance();
|
1740 | factory_Sf__();
|
1741 | private:
|
1742 | };
|
1743 | } // namespace souffle
|
1744 | namespace souffle {
|
1745 | using namespace souffle;
|
1746 | souffle::SouffleProgram* factory_Sf__::newInstance(){
|
1747 | return new souffle::Sf__();
|
1748 | }
|
1749 |
|
1750 | factory_Sf__::factory_Sf__():
|
1751 | souffle::ProgramFactory("_"){
|
1752 | }
|
1753 |
|
1754 | } // namespace souffle
|
1755 | namespace souffle {
|
1756 |
|
1757 | #ifdef __EMBEDDED_SOUFFLE__
|
1758 | extern "C" {
|
1759 | souffle::factory_Sf__ __factory_Sf___instance;
|
1760 | }
|
1761 | #endif
|
1762 | } // namespace souffle
|
1763 |
|