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