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