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