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("mylib.MaybeCollect",0).
|
526 | in file call-graph.dl [14:1-14:40])_");
|
527 | [&](){
|
528 | CREATE_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt,rel_might_collect_ef1d0b06d36e4ddc->createContext());
|
529 | Tuple<RamDomain,2> tuple{{ramBitCast(RamSigned(0)),ramBitCast(RamSigned(0))}};
|
530 | rel_might_collect_ef1d0b06d36e4ddc->insert(tuple,READ_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt));
|
531 | }
|
532 | ();signalHandler->setMsg(R"_(might_collect(f,s) :-
|
533 | call(f,s,"mylib.MaybeCollect").
|
534 | in file call-graph.dl [15:1-15:57])_");
|
535 | if(!(rel_call_ee1d8972d66cc25f->empty())) {
|
536 | [&](){
|
537 | CREATE_OP_CONTEXT(rel_call_ee1d8972d66cc25f_op_ctxt,rel_call_ee1d8972d66cc25f->createContext());
|
538 | CREATE_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt,rel_might_collect_ef1d0b06d36e4ddc->createContext());
|
539 | 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));
|
540 | for(const auto& env0 : range) {
|
541 | Tuple<RamDomain,2> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1])}};
|
542 | rel_might_collect_ef1d0b06d36e4ddc->insert(tuple,READ_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt));
|
543 | }
|
544 | }
|
545 | ();}
|
546 | [&](){
|
547 | CREATE_OP_CONTEXT(rel_delta_might_collect_d651f71586aafe59_op_ctxt,rel_delta_might_collect_d651f71586aafe59->createContext());
|
548 | CREATE_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt,rel_might_collect_ef1d0b06d36e4ddc->createContext());
|
549 | for(const auto& env0 : *rel_might_collect_ef1d0b06d36e4ddc) {
|
550 | Tuple<RamDomain,2> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1])}};
|
551 | rel_delta_might_collect_d651f71586aafe59->insert(tuple,READ_OP_CONTEXT(rel_delta_might_collect_d651f71586aafe59_op_ctxt));
|
552 | }
|
553 | }
|
554 | ();auto loop_counter = RamUnsigned(1);
|
555 | iter = 0;
|
556 | for(;;) {
|
557 | signalHandler->setMsg(R"_(might_collect(f,s) :-
|
558 | call(f,s,g),
|
559 | might_collect(g,_).
|
560 | in file call-graph.dl [16:1-16:59])_");
|
561 | if(!(rel_call_ee1d8972d66cc25f->empty()) && !(rel_delta_might_collect_d651f71586aafe59->empty())) {
|
562 | [&](){
|
563 | CREATE_OP_CONTEXT(rel_delta_might_collect_d651f71586aafe59_op_ctxt,rel_delta_might_collect_d651f71586aafe59->createContext());
|
564 | CREATE_OP_CONTEXT(rel_new_might_collect_5d48ef45a97e4618_op_ctxt,rel_new_might_collect_5d48ef45a97e4618->createContext());
|
565 | CREATE_OP_CONTEXT(rel_call_ee1d8972d66cc25f_op_ctxt,rel_call_ee1d8972d66cc25f->createContext());
|
566 | CREATE_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt,rel_might_collect_ef1d0b06d36e4ddc->createContext());
|
567 | for(const auto& env0 : *rel_call_ee1d8972d66cc25f) {
|
568 | 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)))) {
|
569 | Tuple<RamDomain,2> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1])}};
|
570 | rel_new_might_collect_5d48ef45a97e4618->insert(tuple,READ_OP_CONTEXT(rel_new_might_collect_5d48ef45a97e4618_op_ctxt));
|
571 | }
|
572 | }
|
573 | }
|
574 | ();}
|
575 | if(rel_new_might_collect_5d48ef45a97e4618->empty()) break;
|
576 | [&](){
|
577 | CREATE_OP_CONTEXT(rel_new_might_collect_5d48ef45a97e4618_op_ctxt,rel_new_might_collect_5d48ef45a97e4618->createContext());
|
578 | CREATE_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt,rel_might_collect_ef1d0b06d36e4ddc->createContext());
|
579 | for(const auto& env0 : *rel_new_might_collect_5d48ef45a97e4618) {
|
580 | Tuple<RamDomain,2> tuple{{ramBitCast(env0[0]),ramBitCast(env0[1])}};
|
581 | rel_might_collect_ef1d0b06d36e4ddc->insert(tuple,READ_OP_CONTEXT(rel_might_collect_ef1d0b06d36e4ddc_op_ctxt));
|
582 | }
|
583 | }
|
584 | ();std::swap(rel_delta_might_collect_d651f71586aafe59, rel_new_might_collect_5d48ef45a97e4618);
|
585 | rel_new_might_collect_5d48ef45a97e4618->purge();
|
586 | loop_counter = (ramBitCast<RamUnsigned>(loop_counter) + ramBitCast<RamUnsigned>(RamUnsigned(1)));
|
587 | iter++;
|
588 | }
|
589 | iter = 0;
|
590 | rel_delta_might_collect_d651f71586aafe59->purge();
|
591 | rel_new_might_collect_5d48ef45a97e4618->purge();
|
592 | if (performIO) {
|
593 | 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\"]}}"}});
|
594 | if (outputDirectory == "-"){directiveMap["IO"] = "stdout"; directiveMap["headers"] = "true";}
|
595 | else if (!outputDirectory.empty()) {directiveMap["output-dir"] = outputDirectory;}
|
596 | IOSystem::getInstance().getWriter(directiveMap, symTable, recordTable)->writeAll(*rel_might_collect_ef1d0b06d36e4ddc);
|
597 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
598 | }
|
599 | if (pruneImdtRels) rel_call_ee1d8972d66cc25f->purge();
|
600 | }
|
601 |
|
602 | } // namespace souffle
|
603 |
|
604 | namespace souffle {
|
605 | using namespace souffle;
|
606 | class Sf__: public SouffleProgram {
|
607 | public:
|
608 | Sf__();
|
609 | ~Sf__();
|
610 | void run();
|
611 | void runAll(std::string inputDirectoryArg = "",std::string outputDirectoryArg = "",bool performIOArg = true,bool pruneImdtRelsArg = true);
|
612 | void printAll([[maybe_unused]] std::string outputDirectoryArg = "");
|
613 | void loadAll([[maybe_unused]] std::string inputDirectoryArg = "");
|
614 | void dumpInputs();
|
615 | void dumpOutputs();
|
616 | SymbolTable& getSymbolTable();
|
617 | RecordTable& getRecordTable();
|
618 | void setNumThreads(std::size_t numThreadsValue);
|
619 | void executeSubroutine(std::string name,const std::vector<RamDomain>& args,std::vector<RamDomain>& ret);
|
620 | private:
|
621 | void runFunction(std::string inputDirectoryArg,std::string outputDirectoryArg,bool performIOArg,bool pruneImdtRelsArg);
|
622 | SymbolTableImpl symTable;
|
623 | SpecializedRecordTable<0> recordTable;
|
624 | ConcurrentCache<std::string,std::regex> regexCache;
|
625 | Own<t_btree_iii__2_0_1__001__111::Type> rel_call_ee1d8972d66cc25f;
|
626 | souffle::RelationWrapper<t_btree_iii__2_0_1__001__111::Type> wrapper_rel_call_ee1d8972d66cc25f;
|
627 | Own<t_btree_ii__0_1__11::Type> rel_might_collect_ef1d0b06d36e4ddc;
|
628 | souffle::RelationWrapper<t_btree_ii__0_1__11::Type> wrapper_rel_might_collect_ef1d0b06d36e4ddc;
|
629 | Own<t_btree_ii__0_1__11__10::Type> rel_delta_might_collect_d651f71586aafe59;
|
630 | Own<t_btree_ii__0_1__11__10::Type> rel_new_might_collect_5d48ef45a97e4618;
|
631 | Stratum_call_104fac07831e2229 stratum_call_587d2d7effb5d130;
|
632 | Stratum_might_collect_beadc513d07ff032 stratum_might_collect_cc50af26f53a71ac;
|
633 | std::string inputDirectory;
|
634 | std::string outputDirectory;
|
635 | SignalHandler* signalHandler{SignalHandler::instance()};
|
636 | std::atomic<RamDomain> ctr{};
|
637 | std::atomic<std::size_t> iter{};
|
638 | };
|
639 | } // namespace souffle
|
640 | namespace souffle {
|
641 | using namespace souffle;
|
642 | Sf__::Sf__():
|
643 | symTable({
|
644 | R"_(mylib.MaybeCollect)_",
|
645 | }),
|
646 | recordTable(),
|
647 | regexCache(),
|
648 | rel_call_ee1d8972d66cc25f(mk<t_btree_iii__2_0_1__001__111::Type>()),
|
649 | 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),
|
650 | rel_might_collect_ef1d0b06d36e4ddc(mk<t_btree_ii__0_1__11::Type>()),
|
651 | 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),
|
652 | rel_delta_might_collect_d651f71586aafe59(mk<t_btree_ii__0_1__11__10::Type>()),
|
653 | rel_new_might_collect_5d48ef45a97e4618(mk<t_btree_ii__0_1__11__10::Type>()),
|
654 | stratum_call_587d2d7effb5d130(symTable,recordTable,regexCache,pruneImdtRels,performIO,signalHandler,iter,ctr,inputDirectory,outputDirectory,*rel_call_ee1d8972d66cc25f),
|
655 | 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){
|
656 | addRelation("call", wrapper_rel_call_ee1d8972d66cc25f, true, false);
|
657 | addRelation("might_collect", wrapper_rel_might_collect_ef1d0b06d36e4ddc, false, true);
|
658 | }
|
659 |
|
660 | Sf__::~Sf__(){
|
661 | }
|
662 |
|
663 | void Sf__::runFunction(std::string inputDirectoryArg,std::string outputDirectoryArg,bool performIOArg,bool pruneImdtRelsArg){
|
664 |
|
665 | this->inputDirectory = std::move(inputDirectoryArg);
|
666 | this->outputDirectory = std::move(outputDirectoryArg);
|
667 | this->performIO = performIOArg;
|
668 | this->pruneImdtRels = pruneImdtRelsArg;
|
669 |
|
670 | // set default threads (in embedded mode)
|
671 | // if this is not set, and omp is used, the default omp setting of number of cores is used.
|
672 | #if defined(_OPENMP)
|
673 | if (0 < getNumThreads()) { omp_set_num_threads(static_cast<int>(getNumThreads())); }
|
674 | #endif
|
675 |
|
676 | signalHandler->set();
|
677 | // -- query evaluation --
|
678 | {
|
679 | std::vector<RamDomain> args, ret;
|
680 | stratum_call_587d2d7effb5d130.run(args, ret);
|
681 | }
|
682 | {
|
683 | std::vector<RamDomain> args, ret;
|
684 | stratum_might_collect_cc50af26f53a71ac.run(args, ret);
|
685 | }
|
686 |
|
687 | // -- relation hint statistics --
|
688 | signalHandler->reset();
|
689 | }
|
690 |
|
691 | void Sf__::run(){
|
692 | runFunction("", "", false, false);
|
693 | }
|
694 |
|
695 | void Sf__::runAll(std::string inputDirectoryArg,std::string outputDirectoryArg,bool performIOArg,bool pruneImdtRelsArg){
|
696 | runFunction(inputDirectoryArg, outputDirectoryArg, performIOArg, pruneImdtRelsArg);
|
697 | }
|
698 |
|
699 | void Sf__::printAll([[maybe_unused]] std::string outputDirectoryArg){
|
700 | 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\"]}}"}});
|
701 | if (!outputDirectoryArg.empty()) {directiveMap["output-dir"] = outputDirectoryArg;}
|
702 | IOSystem::getInstance().getWriter(directiveMap, symTable, recordTable)->writeAll(*rel_might_collect_ef1d0b06d36e4ddc);
|
703 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
704 | }
|
705 |
|
706 | void Sf__::loadAll([[maybe_unused]] std::string inputDirectoryArg){
|
707 | 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\"]}}"}});
|
708 | if (!inputDirectoryArg.empty()) {directiveMap["fact-dir"] = inputDirectoryArg;}
|
709 | IOSystem::getInstance().getReader(directiveMap, symTable, recordTable)->readAll(*rel_call_ee1d8972d66cc25f);
|
710 | } catch (std::exception& e) {std::cerr << "Error loading call data: " << e.what() << '\n';
|
711 | exit(1);
|
712 | }
|
713 | }
|
714 |
|
715 | void Sf__::dumpInputs(){
|
716 | try {std::map<std::string, std::string> rwOperation;
|
717 | rwOperation["IO"] = "stdout";
|
718 | rwOperation["name"] = "call";
|
719 | rwOperation["types"] = "{\"relation\": {\"arity\": 3, \"auxArity\": 0, \"types\": [\"s:Function\", \"i:Statement\", \"s:Function\"]}}";
|
720 | IOSystem::getInstance().getWriter(rwOperation, symTable, recordTable)->writeAll(*rel_call_ee1d8972d66cc25f);
|
721 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
722 | }
|
723 |
|
724 | void Sf__::dumpOutputs(){
|
725 | try {std::map<std::string, std::string> rwOperation;
|
726 | rwOperation["IO"] = "stdout";
|
727 | rwOperation["name"] = "might_collect";
|
728 | rwOperation["types"] = "{\"relation\": {\"arity\": 2, \"auxArity\": 0, \"types\": [\"s:Function\", \"i:Statement\"]}}";
|
729 | IOSystem::getInstance().getWriter(rwOperation, symTable, recordTable)->writeAll(*rel_might_collect_ef1d0b06d36e4ddc);
|
730 | } catch (std::exception& e) {std::cerr << e.what();exit(1);}
|
731 | }
|
732 |
|
733 | SymbolTable& Sf__::getSymbolTable(){
|
734 | return symTable;
|
735 | }
|
736 |
|
737 | RecordTable& Sf__::getRecordTable(){
|
738 | return recordTable;
|
739 | }
|
740 |
|
741 | void Sf__::setNumThreads(std::size_t numThreadsValue){
|
742 | SouffleProgram::setNumThreads(numThreadsValue);
|
743 | symTable.setNumLanes(getNumThreads());
|
744 | recordTable.setNumLanes(getNumThreads());
|
745 | regexCache.setNumLanes(getNumThreads());
|
746 | }
|
747 |
|
748 | void Sf__::executeSubroutine(std::string name,const std::vector<RamDomain>& args,std::vector<RamDomain>& ret){
|
749 | if (name == "call") {
|
750 | stratum_call_587d2d7effb5d130.run(args, ret);
|
751 | return;}
|
752 | if (name == "might_collect") {
|
753 | stratum_might_collect_cc50af26f53a71ac.run(args, ret);
|
754 | return;}
|
755 | fatal(("unknown subroutine " + name).c_str());
|
756 | }
|
757 |
|
758 | } // namespace souffle
|
759 | namespace souffle {
|
760 | SouffleProgram *newInstance__(){return new souffle::Sf__;}
|
761 | SymbolTable *getST__(SouffleProgram *p){return &reinterpret_cast<souffle::Sf__*>(p)->getSymbolTable();}
|
762 | } // namespace souffle
|
763 |
|
764 | #ifndef __EMBEDDED_SOUFFLE__
|
765 | #include "souffle/CompiledOptions.h"
|
766 | int main(int argc, char** argv)
|
767 | {
|
768 | try{
|
769 | souffle::CmdOptions opt(R"(mycpp/datalog/call-graph.dl)",
|
770 | R"()",
|
771 | R"()",
|
772 | false,
|
773 | R"()",
|
774 | 1);
|
775 | if (!opt.parse(argc,argv)) return 1;
|
776 | souffle::Sf__ obj;
|
777 | #if defined(_OPENMP)
|
778 | obj.setNumThreads(opt.getNumJobs());
|
779 |
|
780 | #endif
|
781 | obj.runAll(opt.getInputFileDir(), opt.getOutputFileDir());
|
782 | return 0;
|
783 | } catch(std::exception &e) { souffle::SignalHandler::instance()->error(e.what());}
|
784 | }
|
785 | #endif
|
786 |
|
787 | namespace souffle {
|
788 | using namespace souffle;
|
789 | class factory_Sf__: souffle::ProgramFactory {
|
790 | public:
|
791 | souffle::SouffleProgram* newInstance();
|
792 | factory_Sf__();
|
793 | private:
|
794 | };
|
795 | } // namespace souffle
|
796 | namespace souffle {
|
797 | using namespace souffle;
|
798 | souffle::SouffleProgram* factory_Sf__::newInstance(){
|
799 | return new souffle::Sf__();
|
800 | }
|
801 |
|
802 | factory_Sf__::factory_Sf__():
|
803 | souffle::ProgramFactory("_"){
|
804 | }
|
805 |
|
806 | } // namespace souffle
|
807 | namespace souffle {
|
808 |
|
809 | #ifdef __EMBEDDED_SOUFFLE__
|
810 | extern "C" {
|
811 | souffle::factory_Sf__ __factory_Sf___instance;
|
812 | }
|
813 | #endif
|
814 | } // namespace souffle
|
815 |
|