OILS / prebuilt / datalog / dataflow.cc View on Github | oilshell.org

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