1 | #define SOUFFLE_GENERATOR_VERSION "39d42a366"
|
2 | #include "souffle/CompiledSouffle.h"
|
3 | #include "souffle/SignalHandler.h"
|
4 | #include "souffle/SouffleInterface.h"
|
5 | #include "souffle/datastructure/BTree.h"
|
6 | #include "souffle/io/IOSystem.h"
|
7 | #include <any>
|
8 | namespace functors {
|
9 | extern "C" {
|
10 | }
|
11 | } //namespace functors
|
12 | namespace souffle::t_btree_iii__2_0_1__001__111 {
|
13 | using namespace souffle;
|
14 | struct Type {
|
15 | static constexpr Relation::arity_type Arity = 3;
|
16 | using t_tuple = Tuple<RamDomain, 3>;
|
17 | struct t_comparator_0{
|
18 | int operator()(const t_tuple& a, const t_tuple& b) const {
|
19 | return (ramBitCast<RamSigned>(a[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)));
|
20 | }
|
21 | bool less(const t_tuple& a, const t_tuple& b) const {
|
22 | 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]))))));
|
23 | }
|
24 | bool equal(const t_tuple& a, const t_tuple& b) const {
|
25 | return (ramBitCast<RamSigned>(a[2]) == ramBitCast<RamSigned>(b[2]))&&(ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0]))&&(ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1]));
|
26 | }
|
27 | };
|
28 | using t_ind_0 = btree_set<t_tuple,t_comparator_0>;
|
29 | t_ind_0 ind_0;
|
30 | using iterator = t_ind_0::iterator;
|
31 | struct context {
|
32 | t_ind_0::operation_hints hints_0_lower;
|
33 | t_ind_0::operation_hints hints_0_upper;
|
34 | };
|
35 | context createContext() { return context(); }
|
36 | bool insert(const t_tuple& t);
|
37 | bool insert(const t_tuple& t, context& h);
|
38 | bool insert(const RamDomain* ramDomain);
|
39 | bool insert(RamDomain a0,RamDomain a1,RamDomain a2);
|
40 | bool contains(const t_tuple& t, context& h) const;
|
41 | bool contains(const t_tuple& t) const;
|
42 | std::size_t size() const;
|
43 | iterator find(const t_tuple& t, context& h) const;
|
44 | iterator find(const t_tuple& t) const;
|
45 | range<iterator> lowerUpperRange_000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const;
|
46 | range<iterator> lowerUpperRange_000(const t_tuple& /* lower */, const t_tuple& /* upper */) const;
|
47 | range<t_ind_0::iterator> lowerUpperRange_001(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
48 | range<t_ind_0::iterator> lowerUpperRange_001(const t_tuple& lower, const t_tuple& upper) const;
|
49 | range<t_ind_0::iterator> lowerUpperRange_111(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
50 | range<t_ind_0::iterator> lowerUpperRange_111(const t_tuple& lower, const t_tuple& upper) const;
|
51 | bool empty() const;
|
52 | std::vector<range<iterator>> partition() const;
|
53 | void purge();
|
54 | iterator begin() const;
|
55 | iterator end() const;
|
56 | void printStatistics(std::ostream& o) const;
|
57 | };
|
58 | } // namespace souffle::t_btree_iii__2_0_1__001__111
|
59 | namespace souffle::t_btree_iii__2_0_1__001__111 {
|
60 | using namespace souffle;
|
61 | using t_ind_0 = Type::t_ind_0;
|
62 | using iterator = Type::iterator;
|
63 | using context = Type::context;
|
64 | bool Type::insert(const t_tuple& t) {
|
65 | context h;
|
66 | return insert(t, h);
|
67 | }
|
68 | bool Type::insert(const t_tuple& t, context& h) {
|
69 | if (ind_0.insert(t, h.hints_0_lower)) {
|
70 | return true;
|
71 | } else return false;
|
72 | }
|
73 | bool Type::insert(const RamDomain* ramDomain) {
|
74 | RamDomain data[3];
|
75 | std::copy(ramDomain, ramDomain + 3, data);
|
76 | const t_tuple& tuple = reinterpret_cast<const t_tuple&>(data);
|
77 | context h;
|
78 | return insert(tuple, h);
|
79 | }
|
80 | bool Type::insert(RamDomain a0,RamDomain a1,RamDomain a2) {
|
81 | RamDomain data[3] = {a0,a1,a2};
|
82 | return insert(data);
|
83 | }
|
84 | bool Type::contains(const t_tuple& t, context& h) const {
|
85 | return ind_0.contains(t, h.hints_0_lower);
|
86 | }
|
87 | bool Type::contains(const t_tuple& t) const {
|
88 | context h;
|
89 | return contains(t, h);
|
90 | }
|
91 | std::size_t Type::size() const {
|
92 | return ind_0.size();
|
93 | }
|
94 | iterator Type::find(const t_tuple& t, context& h) const {
|
95 | return ind_0.find(t, h.hints_0_lower);
|
96 | }
|
97 | iterator Type::find(const t_tuple& t) const {
|
98 | context h;
|
99 | return find(t, h);
|
100 | }
|
101 | range<iterator> Type::lowerUpperRange_000(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const {
|
102 | return range<iterator>(ind_0.begin(),ind_0.end());
|
103 | }
|
104 | range<iterator> Type::lowerUpperRange_000(const t_tuple& /* lower */, const t_tuple& /* upper */) const {
|
105 | return range<iterator>(ind_0.begin(),ind_0.end());
|
106 | }
|
107 | range<t_ind_0::iterator> Type::lowerUpperRange_001(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
108 | t_comparator_0 comparator;
|
109 | int cmp = comparator(lower, upper);
|
110 | if (cmp > 0) {
|
111 | return make_range(ind_0.end(), ind_0.end());
|
112 | }
|
113 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
114 | }
|
115 | range<t_ind_0::iterator> Type::lowerUpperRange_001(const t_tuple& lower, const t_tuple& upper) const {
|
116 | context h;
|
117 | return lowerUpperRange_001(lower,upper,h);
|
118 | }
|
119 | range<t_ind_0::iterator> Type::lowerUpperRange_111(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
120 | t_comparator_0 comparator;
|
121 | int cmp = comparator(lower, upper);
|
122 | if (cmp == 0) {
|
123 | auto pos = ind_0.find(lower, h.hints_0_lower);
|
124 | auto fin = ind_0.end();
|
125 | if (pos != fin) {fin = pos; ++fin;}
|
126 | return make_range(pos, fin);
|
127 | }
|
128 | if (cmp > 0) {
|
129 | return make_range(ind_0.end(), ind_0.end());
|
130 | }
|
131 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
132 | }
|
133 | range<t_ind_0::iterator> Type::lowerUpperRange_111(const t_tuple& lower, const t_tuple& upper) const {
|
134 | context h;
|
135 | return lowerUpperRange_111(lower,upper,h);
|
136 | }
|
137 | bool Type::empty() const {
|
138 | return ind_0.empty();
|
139 | }
|
140 | std::vector<range<iterator>> Type::partition() const {
|
141 | return ind_0.getChunks(400);
|
142 | }
|
143 | void Type::purge() {
|
144 | ind_0.clear();
|
145 | }
|
146 | iterator Type::begin() const {
|
147 | return ind_0.begin();
|
148 | }
|
149 | iterator Type::end() const {
|
150 | return ind_0.end();
|
151 | }
|
152 | void Type::printStatistics(std::ostream& o) const {
|
153 | o << " arity 3 direct b-tree index 0 lex-order [2,0,1]\n";
|
154 | ind_0.printStats(o);
|
155 | }
|
156 | } // namespace souffle::t_btree_iii__2_0_1__001__111
|
157 | namespace souffle::t_btree_ii__0_1__11 {
|
158 | using namespace souffle;
|
159 | struct Type {
|
160 | static constexpr Relation::arity_type Arity = 2;
|
161 | using t_tuple = Tuple<RamDomain, 2>;
|
162 | struct t_comparator_0{
|
163 | int operator()(const t_tuple& a, const t_tuple& b) const {
|
164 | 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));
|
165 | }
|
166 | bool less(const t_tuple& a, const t_tuple& b) const {
|
167 | 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]))));
|
168 | }
|
169 | bool equal(const t_tuple& a, const t_tuple& b) const {
|
170 | return (ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0]))&&(ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1]));
|
171 | }
|
172 | };
|
173 | using t_ind_0 = btree_set<t_tuple,t_comparator_0>;
|
174 | t_ind_0 ind_0;
|
175 | using iterator = t_ind_0::iterator;
|
176 | struct context {
|
177 | t_ind_0::operation_hints hints_0_lower;
|
178 | t_ind_0::operation_hints hints_0_upper;
|
179 | };
|
180 | context createContext() { return context(); }
|
181 | bool insert(const t_tuple& t);
|
182 | bool insert(const t_tuple& t, context& h);
|
183 | bool insert(const RamDomain* ramDomain);
|
184 | bool insert(RamDomain a0,RamDomain a1);
|
185 | bool contains(const t_tuple& t, context& h) const;
|
186 | bool contains(const t_tuple& t) const;
|
187 | std::size_t size() const;
|
188 | iterator find(const t_tuple& t, context& h) const;
|
189 | iterator find(const t_tuple& t) const;
|
190 | range<iterator> lowerUpperRange_00(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const;
|
191 | range<iterator> lowerUpperRange_00(const t_tuple& /* lower */, const t_tuple& /* upper */) const;
|
192 | range<t_ind_0::iterator> lowerUpperRange_11(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
193 | range<t_ind_0::iterator> lowerUpperRange_11(const t_tuple& lower, const t_tuple& upper) const;
|
194 | bool empty() const;
|
195 | std::vector<range<iterator>> partition() const;
|
196 | void purge();
|
197 | iterator begin() const;
|
198 | iterator end() const;
|
199 | void printStatistics(std::ostream& o) const;
|
200 | };
|
201 | } // namespace souffle::t_btree_ii__0_1__11
|
202 | namespace souffle::t_btree_ii__0_1__11 {
|
203 | using namespace souffle;
|
204 | using t_ind_0 = Type::t_ind_0;
|
205 | using iterator = Type::iterator;
|
206 | using context = Type::context;
|
207 | bool Type::insert(const t_tuple& t) {
|
208 | context h;
|
209 | return insert(t, h);
|
210 | }
|
211 | bool Type::insert(const t_tuple& t, context& h) {
|
212 | if (ind_0.insert(t, h.hints_0_lower)) {
|
213 | return true;
|
214 | } else return false;
|
215 | }
|
216 | bool Type::insert(const RamDomain* ramDomain) {
|
217 | RamDomain data[2];
|
218 | std::copy(ramDomain, ramDomain + 2, data);
|
219 | const t_tuple& tuple = reinterpret_cast<const t_tuple&>(data);
|
220 | context h;
|
221 | return insert(tuple, h);
|
222 | }
|
223 | bool Type::insert(RamDomain a0,RamDomain a1) {
|
224 | RamDomain data[2] = {a0,a1};
|
225 | return insert(data);
|
226 | }
|
227 | bool Type::contains(const t_tuple& t, context& h) const {
|
228 | return ind_0.contains(t, h.hints_0_lower);
|
229 | }
|
230 | bool Type::contains(const t_tuple& t) const {
|
231 | context h;
|
232 | return contains(t, h);
|
233 | }
|
234 | std::size_t Type::size() const {
|
235 | return ind_0.size();
|
236 | }
|
237 | iterator Type::find(const t_tuple& t, context& h) const {
|
238 | return ind_0.find(t, h.hints_0_lower);
|
239 | }
|
240 | iterator Type::find(const t_tuple& t) const {
|
241 | context h;
|
242 | return find(t, h);
|
243 | }
|
244 | range<iterator> Type::lowerUpperRange_00(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const {
|
245 | return range<iterator>(ind_0.begin(),ind_0.end());
|
246 | }
|
247 | range<iterator> Type::lowerUpperRange_00(const t_tuple& /* lower */, const t_tuple& /* upper */) const {
|
248 | return range<iterator>(ind_0.begin(),ind_0.end());
|
249 | }
|
250 | range<t_ind_0::iterator> Type::lowerUpperRange_11(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
251 | t_comparator_0 comparator;
|
252 | int cmp = comparator(lower, upper);
|
253 | if (cmp == 0) {
|
254 | auto pos = ind_0.find(lower, h.hints_0_lower);
|
255 | auto fin = ind_0.end();
|
256 | if (pos != fin) {fin = pos; ++fin;}
|
257 | return make_range(pos, fin);
|
258 | }
|
259 | if (cmp > 0) {
|
260 | return make_range(ind_0.end(), ind_0.end());
|
261 | }
|
262 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
263 | }
|
264 | range<t_ind_0::iterator> Type::lowerUpperRange_11(const t_tuple& lower, const t_tuple& upper) const {
|
265 | context h;
|
266 | return lowerUpperRange_11(lower,upper,h);
|
267 | }
|
268 | bool Type::empty() const {
|
269 | return ind_0.empty();
|
270 | }
|
271 | std::vector<range<iterator>> Type::partition() const {
|
272 | return ind_0.getChunks(400);
|
273 | }
|
274 | void Type::purge() {
|
275 | ind_0.clear();
|
276 | }
|
277 | iterator Type::begin() const {
|
278 | return ind_0.begin();
|
279 | }
|
280 | iterator Type::end() const {
|
281 | return ind_0.end();
|
282 | }
|
283 | void Type::printStatistics(std::ostream& o) const {
|
284 | o << " arity 2 direct b-tree index 0 lex-order [0,1]\n";
|
285 | ind_0.printStats(o);
|
286 | }
|
287 | } // namespace souffle::t_btree_ii__0_1__11
|
288 | namespace souffle::t_btree_ii__0_1__11__10 {
|
289 | using namespace souffle;
|
290 | struct Type {
|
291 | static constexpr Relation::arity_type Arity = 2;
|
292 | using t_tuple = Tuple<RamDomain, 2>;
|
293 | struct t_comparator_0{
|
294 | int operator()(const t_tuple& a, const t_tuple& b) const {
|
295 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0])) ? -1 : (ramBitCast<RamSigned>(a[0]) > ramBitCast<RamSigned>(b[0])) ? 1 :((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1])) ? -1 : (ramBitCast<RamSigned>(a[1]) > ramBitCast<RamSigned>(b[1])) ? 1 :(0));
|
296 | }
|
297 | bool less(const t_tuple& a, const t_tuple& b) const {
|
298 | return (ramBitCast<RamSigned>(a[0]) < ramBitCast<RamSigned>(b[0]))|| ((ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0])) && ((ramBitCast<RamSigned>(a[1]) < ramBitCast<RamSigned>(b[1]))));
|
299 | }
|
300 | bool equal(const t_tuple& a, const t_tuple& b) const {
|
301 | return (ramBitCast<RamSigned>(a[0]) == ramBitCast<RamSigned>(b[0]))&&(ramBitCast<RamSigned>(a[1]) == ramBitCast<RamSigned>(b[1]));
|
302 | }
|
303 | };
|
304 | using t_ind_0 = btree_set<t_tuple,t_comparator_0>;
|
305 | t_ind_0 ind_0;
|
306 | using iterator = t_ind_0::iterator;
|
307 | struct context {
|
308 | t_ind_0::operation_hints hints_0_lower;
|
309 | t_ind_0::operation_hints hints_0_upper;
|
310 | };
|
311 | context createContext() { return context(); }
|
312 | bool insert(const t_tuple& t);
|
313 | bool insert(const t_tuple& t, context& h);
|
314 | bool insert(const RamDomain* ramDomain);
|
315 | bool insert(RamDomain a0,RamDomain a1);
|
316 | bool contains(const t_tuple& t, context& h) const;
|
317 | bool contains(const t_tuple& t) const;
|
318 | std::size_t size() const;
|
319 | iterator find(const t_tuple& t, context& h) const;
|
320 | iterator find(const t_tuple& t) const;
|
321 | range<iterator> lowerUpperRange_00(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const;
|
322 | range<iterator> lowerUpperRange_00(const t_tuple& /* lower */, const t_tuple& /* upper */) const;
|
323 | range<t_ind_0::iterator> lowerUpperRange_11(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
324 | range<t_ind_0::iterator> lowerUpperRange_11(const t_tuple& lower, const t_tuple& upper) const;
|
325 | range<t_ind_0::iterator> lowerUpperRange_10(const t_tuple& lower, const t_tuple& upper, context& h) const;
|
326 | range<t_ind_0::iterator> lowerUpperRange_10(const t_tuple& lower, const t_tuple& upper) const;
|
327 | bool empty() const;
|
328 | std::vector<range<iterator>> partition() const;
|
329 | void purge();
|
330 | iterator begin() const;
|
331 | iterator end() const;
|
332 | void printStatistics(std::ostream& o) const;
|
333 | };
|
334 | } // namespace souffle::t_btree_ii__0_1__11__10
|
335 | namespace souffle::t_btree_ii__0_1__11__10 {
|
336 | using namespace souffle;
|
337 | using t_ind_0 = Type::t_ind_0;
|
338 | using iterator = Type::iterator;
|
339 | using context = Type::context;
|
340 | bool Type::insert(const t_tuple& t) {
|
341 | context h;
|
342 | return insert(t, h);
|
343 | }
|
344 | bool Type::insert(const t_tuple& t, context& h) {
|
345 | if (ind_0.insert(t, h.hints_0_lower)) {
|
346 | return true;
|
347 | } else return false;
|
348 | }
|
349 | bool Type::insert(const RamDomain* ramDomain) {
|
350 | RamDomain data[2];
|
351 | std::copy(ramDomain, ramDomain + 2, data);
|
352 | const t_tuple& tuple = reinterpret_cast<const t_tuple&>(data);
|
353 | context h;
|
354 | return insert(tuple, h);
|
355 | }
|
356 | bool Type::insert(RamDomain a0,RamDomain a1) {
|
357 | RamDomain data[2] = {a0,a1};
|
358 | return insert(data);
|
359 | }
|
360 | bool Type::contains(const t_tuple& t, context& h) const {
|
361 | return ind_0.contains(t, h.hints_0_lower);
|
362 | }
|
363 | bool Type::contains(const t_tuple& t) const {
|
364 | context h;
|
365 | return contains(t, h);
|
366 | }
|
367 | std::size_t Type::size() const {
|
368 | return ind_0.size();
|
369 | }
|
370 | iterator Type::find(const t_tuple& t, context& h) const {
|
371 | return ind_0.find(t, h.hints_0_lower);
|
372 | }
|
373 | iterator Type::find(const t_tuple& t) const {
|
374 | context h;
|
375 | return find(t, h);
|
376 | }
|
377 | range<iterator> Type::lowerUpperRange_00(const t_tuple& /* lower */, const t_tuple& /* upper */, context& /* h */) const {
|
378 | return range<iterator>(ind_0.begin(),ind_0.end());
|
379 | }
|
380 | range<iterator> Type::lowerUpperRange_00(const t_tuple& /* lower */, const t_tuple& /* upper */) const {
|
381 | return range<iterator>(ind_0.begin(),ind_0.end());
|
382 | }
|
383 | range<t_ind_0::iterator> Type::lowerUpperRange_11(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
384 | t_comparator_0 comparator;
|
385 | int cmp = comparator(lower, upper);
|
386 | if (cmp == 0) {
|
387 | auto pos = ind_0.find(lower, h.hints_0_lower);
|
388 | auto fin = ind_0.end();
|
389 | if (pos != fin) {fin = pos; ++fin;}
|
390 | return make_range(pos, fin);
|
391 | }
|
392 | if (cmp > 0) {
|
393 | return make_range(ind_0.end(), ind_0.end());
|
394 | }
|
395 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
396 | }
|
397 | range<t_ind_0::iterator> Type::lowerUpperRange_11(const t_tuple& lower, const t_tuple& upper) const {
|
398 | context h;
|
399 | return lowerUpperRange_11(lower,upper,h);
|
400 | }
|
401 | range<t_ind_0::iterator> Type::lowerUpperRange_10(const t_tuple& lower, const t_tuple& upper, context& h) const {
|
402 | t_comparator_0 comparator;
|
403 | int cmp = comparator(lower, upper);
|
404 | if (cmp > 0) {
|
405 | return make_range(ind_0.end(), ind_0.end());
|
406 | }
|
407 | return make_range(ind_0.lower_bound(lower, h.hints_0_lower), ind_0.upper_bound(upper, h.hints_0_upper));
|
408 | }
|
409 | range<t_ind_0::iterator> Type::lowerUpperRange_10(const t_tuple& lower, const t_tuple& upper) const {
|
410 | context h;
|
411 | return lowerUpperRange_10(lower,upper,h);
|
412 | }
|
413 | bool Type::empty() const {
|
414 | return ind_0.empty();
|
415 | }
|
416 | std::vector<range<iterator>> Type::partition() const {
|
417 | return ind_0.getChunks(400);
|
418 | }
|
419 | void Type::purge() {
|
420 | ind_0.clear();
|
421 | }
|
422 | iterator Type::begin() const {
|
423 | return ind_0.begin();
|
424 | }
|
425 | iterator Type::end() const {
|
426 | return ind_0.end();
|
427 | }
|
428 | void Type::printStatistics(std::ostream& o) const {
|
429 | o << " arity 2 direct b-tree index 0 lex-order [0,1]\n";
|
430 | ind_0.printStats(o);
|
431 | }
|
432 | } // namespace souffle::t_btree_ii__0_1__11__10
|
433 | namespace souffle {
|
434 | using namespace souffle;
|
435 | class Stratum_call_104fac07831e2229 {
|
436 | public:
|
437 | 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);
|
438 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
439 | private:
|
440 | SymbolTable& symTable;
|
441 | RecordTable& recordTable;
|
442 | ConcurrentCache<std::string,std::regex>& regexCache;
|
443 | bool& pruneImdtRels;
|
444 | bool& performIO;
|
445 | SignalHandler*& signalHandler;
|
446 | std::atomic<std::size_t>& iter;
|
447 | std::atomic<RamDomain>& ctr;
|
448 | std::string& inputDirectory;
|
449 | std::string& outputDirectory;
|
450 | t_btree_iii__2_0_1__001__111::Type* rel_call_ee1d8972d66cc25f;
|
451 | };
|
452 | } // namespace souffle
|
453 | namespace souffle {
|
454 | using namespace souffle;
|
455 | 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):
|
456 | symTable(symTable),
|
457 | recordTable(recordTable),
|
458 | regexCache(regexCache),
|
459 | pruneImdtRels(pruneImdtRels),
|
460 | performIO(performIO),
|
461 | signalHandler(signalHandler),
|
462 | iter(iter),
|
463 | ctr(ctr),
|
464 | inputDirectory(inputDirectory),
|
465 | outputDirectory(outputDirectory),
|
466 | rel_call_ee1d8972d66cc25f(&rel_call_ee1d8972d66cc25f){
|
467 | }
|
468 |
|
469 | void Stratum_call_104fac07831e2229::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
470 | if (performIO) {
|
471 | try {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\": {}, \"records\": {}, \"relation\": {\"arity\": 3, \"types\": [\"s:Function\", \"i:Statement\", \"s:Function\"]}}"}});
|
472 | if (!inputDirectory.empty()) {directiveMap["fact-dir"] = inputDirectory;}
|
473 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_call_ee1d8972d66cc25f);
|
474 | } catch (std::exception& e) {std::cerr << "Error loading call data: " << e.what() << '\n';
|
475 | exit(1);
|
476 | }
|
477 | }
|
478 | }
|
479 |
|
480 | } // namespace souffle
|
481 |
|
482 | namespace souffle {
|
483 | using namespace souffle;
|
484 | class Stratum_might_collect_beadc513d07ff032 {
|
485 | public:
|
486 | 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);
|
487 | void run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret);
|
488 | private:
|
489 | SymbolTable& symTable;
|
490 | RecordTable& recordTable;
|
491 | ConcurrentCache<std::string,std::regex>& regexCache;
|
492 | bool& pruneImdtRels;
|
493 | bool& performIO;
|
494 | SignalHandler*& signalHandler;
|
495 | std::atomic<std::size_t>& iter;
|
496 | std::atomic<RamDomain>& ctr;
|
497 | std::string& inputDirectory;
|
498 | std::string& outputDirectory;
|
499 | t_btree_ii__0_1__11__10::Type* rel_delta_might_collect_d651f71586aafe59;
|
500 | t_btree_ii__0_1__11__10::Type* rel_new_might_collect_5d48ef45a97e4618;
|
501 | t_btree_iii__2_0_1__001__111::Type* rel_call_ee1d8972d66cc25f;
|
502 | t_btree_ii__0_1__11::Type* rel_might_collect_ef1d0b06d36e4ddc;
|
503 | };
|
504 | } // namespace souffle
|
505 | namespace souffle {
|
506 | using namespace souffle;
|
507 | 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):
|
508 | symTable(symTable),
|
509 | recordTable(recordTable),
|
510 | regexCache(regexCache),
|
511 | pruneImdtRels(pruneImdtRels),
|
512 | performIO(performIO),
|
513 | signalHandler(signalHandler),
|
514 | iter(iter),
|
515 | ctr(ctr),
|
516 | inputDirectory(inputDirectory),
|
517 | outputDirectory(outputDirectory),
|
518 | rel_delta_might_collect_d651f71586aafe59(&rel_delta_might_collect_d651f71586aafe59),
|
519 | rel_new_might_collect_5d48ef45a97e4618(&rel_new_might_collect_5d48ef45a97e4618),
|
520 | rel_call_ee1d8972d66cc25f(&rel_call_ee1d8972d66cc25f),
|
521 | rel_might_collect_ef1d0b06d36e4ddc(&rel_might_collect_ef1d0b06d36e4ddc){
|
522 | }
|
523 |
|
524 | void Stratum_might_collect_beadc513d07ff032::run([[maybe_unused]] const std::vector<RamDomain>& args,[[maybe_unused]] std::vector<RamDomain>& ret){
|
525 | signalHandler->setMsg(R"_(might_collect(f,s) :-
|
526 | call(f,s,"mylib.MaybeCollect").
|
527 | in file call-graph.dl [14:1-14:57])_");
|
528 | if(!(rel_call_ee1d8972d66cc25f->empty())) {
|
529 | [&](){
|
530 | CREATE_OP_CONTEXT(rel_call_ee1d8972d66cc25f_op_ctxt,rel_call_ee1d8972d66cc25f->createContext());
|
531 | CREATE_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt,rel_might_collect_ef1d0b06d36e4ddc->createContext());
|
532 | auto 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));
|
533 | for(const auto& env0 : range) {
|
534 | Tuple<RamDomain,2> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1])}};
|
535 | rel_might_collect_ef1d0b06d36e4ddc->insert(tuple,READ_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt));
|
536 | }
|
537 | }
|
538 | ();}
|
539 | [&](){
|
540 | CREATE_OP_CONTEXT(rel_delta_might_collect_d651f71586aafe59_op_ctxt,rel_delta_might_collect_d651f71586aafe59->createContext());
|
541 | CREATE_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt,rel_might_collect_ef1d0b06d36e4ddc->createContext());
|
542 | for(const auto& env0 : *rel_might_collect_ef1d0b06d36e4ddc) {
|
543 | Tuple<RamDomain,2> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1])}};
|
544 | rel_delta_might_collect_d651f71586aafe59->insert(tuple,READ_OP_CONTEXT(rel_delta_might_collect_d651f71586aafe59_op_ctxt));
|
545 | }
|
546 | }
|
547 | ();auto loop_counter = RamUnsigned(1);
|
548 | iter = 0;
|
549 | for(;;) {
|
550 | signalHandler->setMsg(R"_(might_collect(f,s) :-
|
551 | call(f,s,g),
|
552 | might_collect(g,_).
|
553 | in file call-graph.dl [15:1-15:59])_");
|
554 | if(!(rel_call_ee1d8972d66cc25f->empty()) && !(rel_delta_might_collect_d651f71586aafe59->empty())) {
|
555 | [&](){
|
556 | CREATE_OP_CONTEXT(rel_delta_might_collect_d651f71586aafe59_op_ctxt,rel_delta_might_collect_d651f71586aafe59->createContext());
|
557 | CREATE_OP_CONTEXT(rel_new_might_collect_5d48ef45a97e4618_op_ctxt,rel_new_might_collect_5d48ef45a97e4618->createContext());
|
558 | CREATE_OP_CONTEXT(rel_call_ee1d8972d66cc25f_op_ctxt,rel_call_ee1d8972d66cc25f->createContext());
|
559 | CREATE_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt,rel_might_collect_ef1d0b06d36e4ddc->createContext());
|
560 | for(const auto& env0 : *rel_call_ee1d8972d66cc25f) {
|
561 | if( !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)))) {
|
562 | Tuple<RamDomain,2> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1])}};
|
563 | rel_new_might_collect_5d48ef45a97e4618->insert(tuple,READ_OP_CONTEXT(rel_new_might_collect_5d48ef45a97e4618_op_ctxt));
|
564 | }
|
565 | }
|
566 | }
|
567 | ();}
|
568 | if(rel_new_might_collect_5d48ef45a97e4618->empty()) break;
|
569 | [&](){
|
570 | CREATE_OP_CONTEXT(rel_new_might_collect_5d48ef45a97e4618_op_ctxt,rel_new_might_collect_5d48ef45a97e4618->createContext());
|
571 | CREATE_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt,rel_might_collect_ef1d0b06d36e4ddc->createContext());
|
572 | for(const auto& env0 : *rel_new_might_collect_5d48ef45a97e4618) {
|
573 | Tuple<RamDomain,2> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1])}};
|
574 | rel_might_collect_ef1d0b06d36e4ddc->insert(tuple,READ_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt));
|
575 | }
|
576 | }
|
577 | ();std::swap(rel_delta_might_collect_d651f71586aafe59, rel_new_might_collect_5d48ef45a97e4618);
|
578 | rel_new_might_collect_5d48ef45a97e4618->purge();
|
579 | loop_counter = (ramBitCast<RamUnsigned>(loop_counter) + ramBitCast<RamUnsigned>(RamUnsigned(1)));
|
580 | iter++;
|
581 | }
|
582 | iter = 0;
|
583 | rel_delta_might_collect_d651f71586aafe59->purge();
|
584 | rel_new_might_collect_5d48ef45a97e4618->purge();
|
585 | if (performIO) {
|
586 | try {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\": {}, \"records\": {}, \"relation\": {\"arity\": 2, \"types\": [\"s:Function\", \"i:Statement\"]}}"}});
|
587 | if (outputDirectory == "-"){directiveMap["IO"] = "stdout"; directiveMap["headers"] = "true";}
|
588 | else if (!outputDirectory.empty()) {directiveMap["output-dir"] = outputDirectory;}
|
589 | IOSystem::getInstance().getWriter(directiveMap, symTable, recordTable)->writeAll(*rel_might_collect_ef1d0b06d36e4ddc);
|
590 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
591 | }
|
592 | if (pruneImdtRels) rel_call_ee1d8972d66cc25f->purge();
|
593 | }
|
594 |
|
595 | } // namespace souffle
|
596 |
|
597 | namespace souffle {
|
598 | using namespace souffle;
|
599 | class Sf__: public SouffleProgram {
|
600 | public:
|
601 | Sf__();
|
602 | ~Sf__();
|
603 | void run();
|
604 | void runAll(std::string inputDirectoryArg = "",std::string outputDirectoryArg = "",bool performIOArg = true,bool pruneImdtRelsArg = true);
|
605 | void printAll([[maybe_unused]] std::string outputDirectoryArg = "");
|
606 | void loadAll([[maybe_unused]] std::string inputDirectoryArg = "");
|
607 | void dumpInputs();
|
608 | void dumpOutputs();
|
609 | SymbolTable& getSymbolTable();
|
610 | RecordTable& getRecordTable();
|
611 | void setNumThreads(std::size_t numThreadsValue);
|
612 | void executeSubroutine(std::string name,const std::vector<RamDomain>& args,std::vector<RamDomain>& ret);
|
613 | private:
|
614 | void runFunction(std::string inputDirectoryArg,std::string outputDirectoryArg,bool performIOArg,bool pruneImdtRelsArg);
|
615 | SymbolTableImpl symTable;
|
616 | SpecializedRecordTable<0> recordTable;
|
617 | ConcurrentCache<std::string,std::regex> regexCache;
|
618 | Own<t_btree_iii__2_0_1__001__111::Type> rel_call_ee1d8972d66cc25f;
|
619 | souffle::RelationWrapper<t_btree_iii__2_0_1__001__111::Type> wrapper_rel_call_ee1d8972d66cc25f;
|
620 | Own<t_btree_ii__0_1__11::Type> rel_might_collect_ef1d0b06d36e4ddc;
|
621 | souffle::RelationWrapper<t_btree_ii__0_1__11::Type> wrapper_rel_might_collect_ef1d0b06d36e4ddc;
|
622 | Own<t_btree_ii__0_1__11__10::Type> rel_delta_might_collect_d651f71586aafe59;
|
623 | Own<t_btree_ii__0_1__11__10::Type> rel_new_might_collect_5d48ef45a97e4618;
|
624 | Stratum_call_104fac07831e2229 stratum_call_587d2d7effb5d130;
|
625 | Stratum_might_collect_beadc513d07ff032 stratum_might_collect_cc50af26f53a71ac;
|
626 | std::string inputDirectory;
|
627 | std::string outputDirectory;
|
628 | SignalHandler* signalHandler{SignalHandler::instance()};
|
629 | std::atomic<RamDomain> ctr{};
|
630 | std::atomic<std::size_t> iter{};
|
631 | };
|
632 | } // namespace souffle
|
633 | namespace souffle {
|
634 | using namespace souffle;
|
635 | Sf__::Sf__():
|
636 | symTable({
|
637 | R"_(mylib.MaybeCollect)_",
|
638 | }),
|
639 | recordTable(),
|
640 | regexCache(),
|
641 | rel_call_ee1d8972d66cc25f(mk<t_btree_iii__2_0_1__001__111::Type>()),
|
642 | wrapper_rel_call_ee1d8972d66cc25f(0, *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),
|
643 | rel_might_collect_ef1d0b06d36e4ddc(mk<t_btree_ii__0_1__11::Type>()),
|
644 | wrapper_rel_might_collect_ef1d0b06d36e4ddc(1, *rel_might_collect_ef1d0b06d36e4ddc, *this, "might_collect", std::array<const char *,2>{{"s:Function","i:Statement"}}, std::array<const char *,2>{{"f","s"}}, 0),
|
645 | rel_delta_might_collect_d651f71586aafe59(mk<t_btree_ii__0_1__11__10::Type>()),
|
646 | rel_new_might_collect_5d48ef45a97e4618(mk<t_btree_ii__0_1__11__10::Type>()),
|
647 | stratum_call_587d2d7effb5d130(symTable,recordTable,regexCache,pruneImdtRels,performIO,signalHandler,iter,ctr,inputDirectory,outputDirectory,*rel_call_ee1d8972d66cc25f),
|
648 | stratum_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){
|
649 | addRelation("call", wrapper_rel_call_ee1d8972d66cc25f, true, false);
|
650 | addRelation("might_collect", wrapper_rel_might_collect_ef1d0b06d36e4ddc, false, true);
|
651 | }
|
652 |
|
653 | Sf__::~Sf__(){
|
654 | }
|
655 |
|
656 | void Sf__::runFunction(std::string inputDirectoryArg,std::string outputDirectoryArg,bool performIOArg,bool pruneImdtRelsArg){
|
657 |
|
658 | this->inputDirectory = std::move(inputDirectoryArg);
|
659 | this->outputDirectory = std::move(outputDirectoryArg);
|
660 | this->performIO = performIOArg;
|
661 | this->pruneImdtRels = pruneImdtRelsArg;
|
662 |
|
663 | // set default threads (in embedded mode)
|
664 | // if this is not set, and omp is used, the default omp setting of number of cores is used.
|
665 | #if defined(_OPENMP)
|
666 | if (0 < getNumThreads()) { omp_set_num_threads(static_cast<int>(getNumThreads())); }
|
667 | #endif
|
668 |
|
669 | signalHandler->set();
|
670 | // -- query evaluation --
|
671 | {
|
672 | std::vector<RamDomain> args, ret;
|
673 | stratum_call_587d2d7effb5d130.run(args, ret);
|
674 | }
|
675 | {
|
676 | std::vector<RamDomain> args, ret;
|
677 | stratum_might_collect_cc50af26f53a71ac.run(args, ret);
|
678 | }
|
679 |
|
680 | // -- relation hint statistics --
|
681 | signalHandler->reset();
|
682 | }
|
683 |
|
684 | void Sf__::run(){
|
685 | runFunction("", "", false, false);
|
686 | }
|
687 |
|
688 | void Sf__::runAll(std::string inputDirectoryArg,std::string outputDirectoryArg,bool performIOArg,bool pruneImdtRelsArg){
|
689 | runFunction(inputDirectoryArg, outputDirectoryArg, performIOArg, pruneImdtRelsArg);
|
690 | }
|
691 |
|
692 | void Sf__::printAll([[maybe_unused]] std::string outputDirectoryArg){
|
693 | try {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\": {}, \"records\": {}, \"relation\": {\"arity\": 2, \"types\": [\"s:Function\", \"i:Statement\"]}}"}});
|
694 | if (!outputDirectoryArg.empty()) {directiveMap["output-dir"] = outputDirectoryArg;}
|
695 | IOSystem::getInstance().getWriter(directiveMap, symTable, recordTable)->writeAll(*rel_might_collect_ef1d0b06d36e4ddc);
|
696 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
697 | }
|
698 |
|
699 | void Sf__::loadAll([[maybe_unused]] std::string inputDirectoryArg){
|
700 | try {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\": {}, \"records\": {}, \"relation\": {\"arity\": 3, \"types\": [\"s:Function\", \"i:Statement\", \"s:Function\"]}}"}});
|
701 | if (!inputDirectoryArg.empty()) {directiveMap["fact-dir"] = inputDirectoryArg;}
|
702 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_call_ee1d8972d66cc25f);
|
703 | } catch (std::exception& e) {std::cerr << "Error loading call data: " << e.what() << '\n';
|
704 | exit(1);
|
705 | }
|
706 | }
|
707 |
|
708 | void Sf__::dumpInputs(){
|
709 | try {std::map<std::string, std::string> rwOperation;
|
710 | rwOperation["IO"] = "stdout";
|
711 | rwOperation["name"] = "call";
|
712 | rwOperation["types"] = "{\"relation\": {\"arity\": 3, \"auxArity\": 0, \"types\": [\"s:Function\", \"i:Statement\", \"s:Function\"]}}";
|
713 | IOSystem::getInstance().getWriter(rwOperation, symTable, recordTable)->writeAll(*rel_call_ee1d8972d66cc25f);
|
714 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
715 | }
|
716 |
|
717 | void Sf__::dumpOutputs(){
|
718 | try {std::map<std::string, std::string> rwOperation;
|
719 | rwOperation["IO"] = "stdout";
|
720 | rwOperation["name"] = "might_collect";
|
721 | rwOperation["types"] = "{\"relation\": {\"arity\": 2, \"auxArity\": 0, \"types\": [\"s:Function\", \"i:Statement\"]}}";
|
722 | IOSystem::getInstance().getWriter(rwOperation, symTable, recordTable)->writeAll(*rel_might_collect_ef1d0b06d36e4ddc);
|
723 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
724 | }
|
725 |
|
726 | SymbolTable& Sf__::getSymbolTable(){
|
727 | return symTable;
|
728 | }
|
729 |
|
730 | RecordTable& Sf__::getRecordTable(){
|
731 | return recordTable;
|
732 | }
|
733 |
|
734 | void Sf__::setNumThreads(std::size_t numThreadsValue){
|
735 | SouffleProgram::setNumThreads(numThreadsValue);
|
736 | symTable.setNumLanes(getNumThreads());
|
737 | recordTable.setNumLanes(getNumThreads());
|
738 | regexCache.setNumLanes(getNumThreads());
|
739 | }
|
740 |
|
741 | void Sf__::executeSubroutine(std::string name,const std::vector<RamDomain>& args,std::vector<RamDomain>& ret){
|
742 | if (name == "call") {
|
743 | stratum_call_587d2d7effb5d130.run(args, ret);
|
744 | return;}
|
745 | if (name == "might_collect") {
|
746 | stratum_might_collect_cc50af26f53a71ac.run(args, ret);
|
747 | return;}
|
748 | fatal(("unknown subroutine " + name).c_str());
|
749 | }
|
750 |
|
751 | } // namespace souffle
|
752 | namespace souffle {
|
753 | SouffleProgram *newInstance__(){return new souffle::Sf__;}
|
754 | SymbolTable *getST__(SouffleProgram *p){return &reinterpret_cast<souffle::Sf__*>(p)->getSymbolTable();}
|
755 | } // namespace souffle
|
756 |
|
757 | #ifndef __EMBEDDED_SOUFFLE__
|
758 | #include "souffle/CompiledOptions.h"
|
759 | int main(int argc, char** argv)
|
760 | {
|
761 | try{
|
762 | souffle::CmdOptions opt(R"(mycpp/datalog/call-graph.dl)",
|
763 | R"()",
|
764 | R"()",
|
765 | false,
|
766 | R"()",
|
767 | 1);
|
768 | if (!opt.parse(argc,argv)) return 1;
|
769 | souffle::Sf__ obj;
|
770 | #if defined(_OPENMP)
|
771 | obj.setNumThreads(opt.getNumJobs());
|
772 |
|
773 | #endif
|
774 | obj.runAll(opt.getInputFileDir(), opt.getOutputFileDir());
|
775 | return 0;
|
776 | } catch(std::exception &e) { souffle::SignalHandler::instance()->error(e.what());}
|
777 | }
|
778 | #endif
|
779 |
|
780 | namespace souffle {
|
781 | using namespace souffle;
|
782 | class factory_Sf__: souffle::ProgramFactory {
|
783 | public:
|
784 | souffle::SouffleProgram* newInstance();
|
785 | factory_Sf__();
|
786 | private:
|
787 | };
|
788 | } // namespace souffle
|
789 | namespace souffle {
|
790 | using namespace souffle;
|
791 | souffle::SouffleProgram* factory_Sf__::newInstance(){
|
792 | return new souffle::Sf__();
|
793 | }
|
794 |
|
795 | factory_Sf__::factory_Sf__():
|
796 | souffle::ProgramFactory("_"){
|
797 | }
|
798 |
|
799 | } // namespace souffle
|
800 | namespace souffle {
|
801 |
|
802 | #ifdef __EMBEDDED_SOUFFLE__
|
803 | extern "C" {
|
804 | souffle::factory_Sf__ __factory_Sf___instance;
|
805 | }
|
806 | #endif
|
807 | } // namespace souffle
|
808 |
|