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

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