souffle  2.0.2-371-g6315b36
ram_relation_test.cpp
Go to the documentation of this file.
1 /*
2  * Souffle - A Datalog Compiler
3  * Copyright (c) 2020, The Souffle Developers. All rights reserved
4  * Licensed under the Universal Permissive License v 1.0 as shown at:
5  * - https://opensource.org/licenses/UPL
6  * - <souffle root>/licenses/SOUFFLE-UPL.txt
7  */
8 
9 /************************************************************************
10  *
11  * @file ram_relation_test.cpp
12  *
13  * Tests arithmetic evaluation by the Interpreter.
14  *
15  ***********************************************************************/
16 
17 #include "tests/test.h"
18 
19 #include "Global.h"
20 #include "RelationTag.h"
21 #include "interpreter/Engine.h"
22 #include "ram/Expression.h"
23 #include "ram/IO.h"
24 #include "ram/Program.h"
25 #include "ram/Project.h"
26 #include "ram/Query.h"
27 #include "ram/Relation.h"
28 #include "ram/Sequence.h"
29 #include "ram/SignedConstant.h"
30 #include "ram/Statement.h"
31 #include "ram/TranslationUnit.h"
32 #include "reports/DebugReport.h"
33 #include "reports/ErrorReport.h"
34 #include "souffle/RamTypes.h"
35 #include "souffle/SymbolTable.h"
37 #include "souffle/utility/json11.h"
38 #include <algorithm>
39 #include <cstddef>
40 #include <iomanip>
41 #include <iostream>
42 #include <limits>
43 #include <map>
44 #include <memory>
45 #include <sstream>
46 #include <string>
47 #include <utility>
48 #include <vector>
49 
51 
52 using namespace ram;
53 
54 using json11::Json;
55 
56 #define RANDOM_TESTS 12
57 
58 const std::string testInterpreterStore(
59  std::vector<std::string> attribs, std::vector<std::string> attribsTypes, VecOwn<Expression> exprs) {
60  Global::config().set("jobs", "1");
61 
62  const size_t arity = attribs.size();
63 
65  Own<ram::Relation> myrel =
66  mk<ram::Relation>("test", arity, 0, attribs, attribsTypes, RelationRepresentation::BTREE);
67 
68  Json types = Json::object{{"relation",
69  Json::object{{"arity", static_cast<long long>(arity)}, {"auxArity", static_cast<long long>(0)},
70  {"types", Json::array(attribsTypes.begin(), attribsTypes.end())}}}};
71 
72  std::map<std::string, std::string> dirs = {{"operation", "output"}, {"IO", "stdout"},
73  {"attributeNames", "x\ty"}, {"name", "test"}, {"types", types.dump()}};
74 
75  std::map<std::string, std::string> ioDirs = std::map<std::string, std::string>(dirs);
76 
77  Own<ram::Statement> main = mk<ram::Sequence>(
78  mk<ram::Query>(mk<ram::Project>("test", std::move(exprs))), mk<ram::IO>("test", ioDirs));
79 
80  rels.push_back(std::move(myrel));
81  std::map<std::string, Own<Statement>> subs;
82  Own<ram::Program> prog = mk<Program>(std::move(rels), std::move(main), std::move(subs));
83 
84  SymbolTable symTab;
85  ErrorReport errReport;
86  DebugReport debugReport;
87 
88  TranslationUnit translationUnit(std::move(prog), symTab, errReport, debugReport);
89 
90  // configure and execute interpreter
91  Own<Engine> interpreter = mk<Engine>(translationUnit);
92 
93  std::streambuf* oldCoutStreambuf = std::cout.rdbuf();
94  std::ostringstream sout;
95  std::cout.rdbuf(sout.rdbuf());
96 
97  interpreter->executeMain();
98 
99  std::cout.rdbuf(oldCoutStreambuf);
100 
101  return sout.str();
102 }
103 
104 TEST(IO_store, FloatSimple) {
105  std::vector<std::string> attribs = {"a", "b"};
106  std::vector<std::string> attribsTypes = {"f", "f"};
107 
108  VecOwn<Expression> exprs;
109  exprs.push_back(mk<SignedConstant>(ramBitCast(static_cast<RamFloat>(0.5))));
110  exprs.push_back(mk<SignedConstant>(ramBitCast(static_cast<RamFloat>(0.5))));
111 
112  std::string expected = R"(---------------
113 test
114 ===============
115 0.5 0.5
116 ===============
117 )";
118 
119  auto result = testInterpreterStore(attribs, attribsTypes, std::move(exprs));
120  EXPECT_EQ(expected, result);
121 }
122 
123 TEST(IO_store, Signed) {
124  std::vector<RamDomain> randomNumbers = testutil::generateRandomVector<RamDomain>(RANDOM_TESTS);
125 
126  // a0 a1 a2...
127  std::vector<std::string> attribs(RANDOM_TESTS, "a");
128  for (size_t i = 0; i < RANDOM_TESTS; ++i) {
129  attribs[i].append(std::to_string(i));
130  }
131 
132  std::vector<std::string> attribsTypes(RANDOM_TESTS, "i");
133 
134  VecOwn<Expression> exprs;
135  for (RamDomain i : randomNumbers) {
136  exprs.push_back(mk<SignedConstant>(i));
137  }
138 
139  std::stringstream expected;
140  expected << "---------------"
141  << "\n"
142  << "test"
143  << "\n"
144  << "==============="
145  << "\n"
146  << randomNumbers[0];
147 
148  for (size_t i = 1; i < randomNumbers.size(); ++i) {
149  expected << "\t" << randomNumbers[i];
150  }
151  expected << "\n"
152  << "==============="
153  << "\n";
154 
155  auto result = testInterpreterStore(attribs, attribsTypes, std::move(exprs));
156  EXPECT_EQ(expected.str(), result);
157 }
158 
159 TEST(IO_store, Float) {
160  std::vector<RamFloat> randomNumbers = testutil::generateRandomVector<RamFloat>(RANDOM_TESTS);
161 
162  // a0 a1 a2...
163  std::vector<std::string> attribs(RANDOM_TESTS, "a");
164  for (size_t i = 0; i < RANDOM_TESTS; ++i) {
165  attribs[i].append(std::to_string(i));
166  }
167 
168  std::vector<std::string> attribsTypes(RANDOM_TESTS, "f");
169 
170  VecOwn<Expression> exprs;
171  for (RamFloat f : randomNumbers) {
172  exprs.push_back(mk<SignedConstant>(ramBitCast(f)));
173  }
174 
175  std::stringstream expected;
176  expected << std::setprecision(std::numeric_limits<RamFloat>::max_digits10);
177 
178  expected << "---------------"
179  << "\n"
180  << "test"
181  << "\n"
182  << "==============="
183  << "\n"
184  << randomNumbers[0];
185 
186  for (size_t i = 1; i < randomNumbers.size(); ++i) {
187  expected << "\t" << randomNumbers[i];
188  }
189  expected << "\n"
190  << "==============="
191  << "\n";
192 
193  auto result = testInterpreterStore(attribs, attribsTypes, std::move(exprs));
194  EXPECT_EQ(expected.str(), result);
195 }
196 
197 TEST(IO_store, Unsigned) {
198  std::vector<RamUnsigned> randomNumbers = testutil::generateRandomVector<RamUnsigned>(RANDOM_TESTS);
199 
200  // a0 a1 a2...
201  std::vector<std::string> attribs(RANDOM_TESTS, "a");
202  for (size_t i = 0; i < RANDOM_TESTS; ++i) {
203  attribs[i].append(std::to_string(i));
204  }
205 
206  std::vector<std::string> attribsTypes(RANDOM_TESTS, "u");
207 
208  VecOwn<Expression> exprs;
209  for (RamUnsigned u : randomNumbers) {
210  exprs.push_back(mk<SignedConstant>(ramBitCast(u)));
211  }
212 
213  std::stringstream expected;
214  expected << "---------------"
215  << "\n"
216  << "test"
217  << "\n"
218  << "==============="
219  << "\n"
220  << randomNumbers[0];
221 
222  for (size_t i = 1; i < randomNumbers.size(); ++i) {
223  expected << "\t" << randomNumbers[i];
224  }
225  expected << "\n"
226  << "==============="
227  << "\n";
228 
229  auto result = testInterpreterStore(attribs, attribsTypes, std::move(exprs));
230  EXPECT_EQ(expected.str(), result);
231 }
232 
233 // Test (store) with different delimiter
234 TEST(IO_store, SignedChangedDelimiter) {
235  std::vector<RamDomain> randomNumbers = testutil::generateRandomVector<RamDomain>(RANDOM_TESTS);
236  const std::string delimiter{", "};
237 
238  Global::config().set("jobs", "1");
239 
241 
242  // a0 a1 a2...
243  std::vector<std::string> attribs(RANDOM_TESTS, "a");
244  for (size_t i = 0; i < RANDOM_TESTS; ++i) {
245  attribs[i].append(std::to_string(i));
246  }
247 
248  std::vector<std::string> attribsTypes(RANDOM_TESTS, "i");
249 
250  Own<ram::Relation> myrel =
251  mk<ram::Relation>("test", RANDOM_TESTS, 0, attribs, attribsTypes, RelationRepresentation::BTREE);
252 
254  {"relation", Json::object{{"arity", static_cast<long long>(attribsTypes.size())},
255  {"auxArity", static_cast<long long>(0)},
256  {"types", Json::array(attribsTypes.begin(), attribsTypes.end())}}}};
257 
258  std::map<std::string, std::string> dirs = {{"operation", "output"}, {"IO", "stdout"},
259  {"attributeNames", "x\ty"}, {"name", "test"}, {"delimiter", delimiter}, {"types", types.dump()}};
260 
261  std::map<std::string, std::string> ioDirs = std::map<std::string, std::string>(dirs);
262 
263  VecOwn<Expression> exprs;
264  for (RamDomain i : randomNumbers) {
265  exprs.push_back(mk<SignedConstant>(i));
266  }
267 
268  Own<ram::Statement> main = mk<ram::Sequence>(
269  mk<ram::Query>(mk<ram::Project>("test", std::move(exprs))), mk<ram::IO>("test", ioDirs));
270 
271  rels.push_back(std::move(myrel));
272  std::map<std::string, Own<Statement>> subs;
273  Own<Program> prog = mk<Program>(std::move(rels), std::move(main), std::move(subs));
274 
275  SymbolTable symTab;
276  ErrorReport errReport;
277  DebugReport debugReport;
278 
279  TranslationUnit translationUnit(std::move(prog), symTab, errReport, debugReport);
280 
281  // configure and execute interpreter
282  Own<Engine> interpreter = mk<Engine>(translationUnit);
283 
284  std::streambuf* oldCoutStreambuf = std::cout.rdbuf();
285  std::ostringstream sout;
286  std::cout.rdbuf(sout.rdbuf());
287 
288  interpreter->executeMain();
289 
290  std::cout.rdbuf(oldCoutStreambuf);
291 
292  std::stringstream expected;
293  expected << "---------------"
294  << "\n"
295  << "test"
296  << "\n"
297  << "==============="
298  << "\n"
299  << randomNumbers[0];
300 
301  for (size_t i = 1; i < randomNumbers.size(); ++i) {
302  expected << delimiter << randomNumbers[i];
303  }
304  expected << "\n"
305  << "==============="
306  << "\n";
307 
308  EXPECT_EQ(expected.str(), sout.str());
309 }
310 
311 TEST(IO_store, MixedTypes) {
312  Global::config().set("jobs", "1");
313 
314  VecOwn<ram::Relation> rels;
315 
316  std::vector<std::string> attribs{"t", "o", "s", "i", "a"};
317 
318  std::vector<std::string> attribsTypes{"i", "u", "f", "f", "s"};
319 
320  Own<ram::Relation> myrel =
321  mk<ram::Relation>("test", 5, 0, attribs, attribsTypes, RelationRepresentation::BTREE);
322 
324  {"relation", Json::object{{"arity", static_cast<long long>(attribsTypes.size())},
325  {"auxArity", static_cast<long long>(0)},
326  {"types", Json::array(attribsTypes.begin(), attribsTypes.end())}}}};
327 
328  std::map<std::string, std::string> dirs = {{"operation", "output"}, {"IO", "stdout"},
329  {"attributeNames", "x\ty"}, {"name", "test"}, {"types", types.dump()}};
330  std::map<std::string, std::string> ioDirs = std::map<std::string, std::string>(dirs);
331 
332  SymbolTable symbolTable;
333  ErrorReport errReport;
334  DebugReport debugReport;
335 
336  VecOwn<Expression> exprs;
337  RamFloat floatValue = 27.75;
338  exprs.push_back(mk<SignedConstant>(3));
339  exprs.push_back(mk<SignedConstant>(ramBitCast(static_cast<RamUnsigned>(27))));
340  exprs.push_back(mk<SignedConstant>(ramBitCast(static_cast<RamFloat>(floatValue))));
341  exprs.push_back(mk<SignedConstant>(ramBitCast(static_cast<RamFloat>(floatValue))));
342  exprs.push_back(mk<SignedConstant>(symbolTable.lookup("meow")));
343 
344  Own<ram::Statement> main = mk<ram::Sequence>(
345  mk<ram::Query>(mk<ram::Project>("test", std::move(exprs))), mk<ram::IO>("test", ioDirs));
346 
347  rels.push_back(std::move(myrel));
348  std::map<std::string, Own<Statement>> subs;
349  Own<Program> prog = mk<Program>(std::move(rels), std::move(main), std::move(subs));
350 
351  TranslationUnit translationUnit(std::move(prog), symbolTable, errReport, debugReport);
352 
353  // configure and execute interpreter
354  Own<Engine> interpreter = mk<Engine>(translationUnit);
355 
356  std::streambuf* oldCoutStreambuf = std::cout.rdbuf();
357  std::ostringstream sout;
358  std::cout.rdbuf(sout.rdbuf());
359 
360  interpreter->executeMain();
361 
362  std::cout.rdbuf(oldCoutStreambuf);
363 
364  std::stringstream expected;
365  expected << std::setprecision(std::numeric_limits<RamFloat>::max_digits10);
366  expected << "---------------"
367  << "\n"
368  << "test"
369  << "\n"
370  << "==============="
371  << "\n"
372  << 3 << "\t" << 27 << "\t" << floatValue << "\t" << floatValue << "\t"
373  << "meow"
374  << "\n"
375  << "==============="
376  << "\n";
377 
378  EXPECT_EQ(expected.str(), sout.str());
379 }
380 
381 TEST(IO_load, Signed) {
382  std::streambuf* backupCin = std::cin.rdbuf();
383  std::istringstream testInput("5 3");
384  std::cin.rdbuf(testInput.rdbuf());
385 
386  Global::config().set("jobs", "1");
387 
389 
390  std::vector<std::string> attribs = {"a", "b"};
391  std::vector<std::string> attribsTypes = {"i", "i"};
392  Own<ram::Relation> myrel =
393  mk<ram::Relation>("test", 2, 0, attribs, attribsTypes, RelationRepresentation::BTREE);
394 
396  {"relation", Json::object{{"arity", static_cast<long long>(attribsTypes.size())},
397  {"auxArity", static_cast<long long>(0)},
398  {"types", Json::array(attribsTypes.begin(), attribsTypes.end())}}}};
399 
400  std::map<std::string, std::string> readDirs = {{"operation", "input"}, {"IO", "stdin"},
401  {"attributeNames", "x\ty"}, {"name", "test"}, {"types", types.dump()}};
402  std::map<std::string, std::string> readIoDirs = std::map<std::string, std::string>(readDirs);
403 
404  std::map<std::string, std::string> writeDirs = {{"operation", "output"}, {"IO", "stdout"},
405  {"attributeNames", "x\ty"}, {"name", "test"}, {"types", types.dump()}};
406  std::map<std::string, std::string> writeIoDirs = std::map<std::string, std::string>(writeDirs);
407 
408  Own<ram::Statement> main =
409  mk<ram::Sequence>(mk<ram::IO>("test", readIoDirs), mk<ram::IO>("test", writeIoDirs));
410 
411  rels.push_back(std::move(myrel));
412  std::map<std::string, Own<Statement>> subs;
413  Own<Program> prog = mk<Program>(std::move(rels), std::move(main), std::move(subs));
414 
415  SymbolTable symTab;
416  ErrorReport errReport;
417  DebugReport debugReport;
418 
419  TranslationUnit translationUnit(std::move(prog), symTab, errReport, debugReport);
420 
421  // configure and execute interpreter
422  Own<Engine> interpreter = mk<Engine>(translationUnit);
423 
424  std::streambuf* oldCoutStreambuf = std::cout.rdbuf();
425  std::ostringstream sout;
426  std::cout.rdbuf(sout.rdbuf());
427 
428  interpreter->executeMain();
429 
430  std::cout.rdbuf(oldCoutStreambuf);
431 
432  std::string expected = R"(---------------
433 test
434 ===============
435 5 3
436 ===============
437 )";
438  EXPECT_EQ(expected, sout.str());
439 
440  std::cin.rdbuf(backupCin);
441 }
442 
443 TEST(IO_load, Float) {
444  std::streambuf* backupCin = std::cin.rdbuf();
445  std::istringstream testInput("0.5 0.5");
446  std::cin.rdbuf(testInput.rdbuf());
447 
448  Global::config().set("jobs", "1");
449 
451 
452  std::vector<std::string> attribs = {"a", "b"};
453  std::vector<std::string> attribsTypes = {"f", "f"};
454  Own<ram::Relation> myrel =
455  mk<ram::Relation>("test", 2, 0, attribs, attribsTypes, RelationRepresentation::BTREE);
456 
458  {"relation", Json::object{{"arity", static_cast<long long>(attribsTypes.size())},
459  {"auxArity", static_cast<long long>(0)},
460  {"types", Json::array(attribsTypes.begin(), attribsTypes.end())}}}};
461 
462  std::map<std::string, std::string> readDirs = {{"operation", "input"}, {"IO", "stdin"},
463  {"attributeNames", "x\ty"}, {"name", "test"}, {"types", types.dump()}};
464  std::map<std::string, std::string> readIoDirs = std::map<std::string, std::string>(readDirs);
465 
466  std::map<std::string, std::string> writeDirs = {{"operation", "output"}, {"IO", "stdout"},
467  {"attributeNames", "x\ty"}, {"name", "test"}, {"types", types.dump()}};
468  std::map<std::string, std::string> writeIoDirs = std::map<std::string, std::string>(writeDirs);
469 
470  Own<ram::Statement> main =
471  mk<ram::Sequence>(mk<ram::IO>("test", readIoDirs), mk<ram::IO>("test", writeIoDirs));
472 
473  rels.push_back(std::move(myrel));
474  std::map<std::string, Own<Statement>> subs;
475  Own<Program> prog = mk<Program>(std::move(rels), std::move(main), std::move(subs));
476 
477  SymbolTable symTab;
478  ErrorReport errReport;
479  DebugReport debugReport;
480 
481  TranslationUnit translationUnit(std::move(prog), symTab, errReport, debugReport);
482 
483  // configure and execute interpreter
484  Own<Engine> interpreter = mk<Engine>(translationUnit);
485 
486  std::streambuf* oldCoutStreambuf = std::cout.rdbuf();
487  std::ostringstream sout;
488  std::cout.rdbuf(sout.rdbuf());
489 
490  interpreter->executeMain();
491 
492  std::cout.rdbuf(oldCoutStreambuf);
493 
494  std::string expected = R"(---------------
495 test
496 ===============
497 0.5 0.5
498 ===============
499 )";
500  EXPECT_EQ(expected, sout.str());
501 
502  std::cin.rdbuf(backupCin);
503 }
504 
505 TEST(IO_load, Unsigned) {
506  std::streambuf* backupCin = std::cin.rdbuf();
507  std::istringstream testInput("6 6");
508  std::cin.rdbuf(testInput.rdbuf());
509 
510  Global::config().set("jobs", "1");
511 
513 
514  std::vector<std::string> attribs = {"a", "b"};
515  std::vector<std::string> attribsTypes = {"u", "u"};
516  Own<ram::Relation> myrel =
517  mk<ram::Relation>("test", 2, 0, attribs, attribsTypes, RelationRepresentation::BTREE);
518 
520  {"relation", Json::object{{"arity", static_cast<long long>(attribsTypes.size())},
521  {"auxArity", static_cast<long long>(0)},
522  {"types", Json::array(attribsTypes.begin(), attribsTypes.end())}}}};
523 
524  std::map<std::string, std::string> readDirs = {{"operation", "input"}, {"IO", "stdin"},
525  {"attributeNames", "x\ty"}, {"name", "test"}, {"types", types.dump()}};
526  std::map<std::string, std::string> readIoDirs = std::map<std::string, std::string>(readDirs);
527 
528  std::map<std::string, std::string> writeDirs = {{"operation", "output"}, {"IO", "stdout"},
529  {"attributeNames", "x\ty"}, {"name", "test"}, {"types", types.dump()}};
530  std::map<std::string, std::string> writeIoDirs = std::map<std::string, std::string>(writeDirs);
531 
532  Own<ram::Statement> main =
533  mk<ram::Sequence>(mk<ram::IO>("test", readIoDirs), mk<ram::IO>("test", writeIoDirs));
534 
535  rels.push_back(std::move(myrel));
536  std::map<std::string, Own<Statement>> subs;
537  Own<Program> prog = mk<Program>(std::move(rels), std::move(main), std::move(subs));
538 
539  SymbolTable symTab;
540  ErrorReport errReport;
541  DebugReport debugReport;
542 
543  TranslationUnit translationUnit(std::move(prog), symTab, errReport, debugReport);
544 
545  // configure and execute interpreter
546  Own<Engine> interpreter = mk<Engine>(translationUnit);
547 
548  std::streambuf* oldCoutStreambuf = std::cout.rdbuf();
549  std::ostringstream sout;
550  std::cout.rdbuf(sout.rdbuf());
551 
552  interpreter->executeMain();
553 
554  std::cout.rdbuf(oldCoutStreambuf);
555 
556  std::string expected = R"(---------------
557 test
558 ===============
559 6 6
560 ===============
561 )";
562  EXPECT_EQ(expected, sout.str());
563 
564  std::cin.rdbuf(backupCin);
565 }
566 
567 TEST(IO_load, MixedTypesLoad) {
568  std::streambuf* backupCin = std::cin.rdbuf();
569  std::istringstream testInput("meow -3 3 0.5");
570  std::cin.rdbuf(testInput.rdbuf());
571 
572  Global::config().set("jobs", "1");
573 
575 
576  std::vector<std::string> attribs = {"l", "u", "b", "a"};
577  std::vector<std::string> attribsTypes = {"s", "i", "u", "f"};
578  Own<ram::Relation> myrel =
579  mk<ram::Relation>("test", 4, 0, attribs, attribsTypes, RelationRepresentation::BTREE);
580 
582  {"relation", Json::object{{"arity", static_cast<long long>(attribsTypes.size())},
583  {"auxArity", static_cast<long long>(0)},
584  {"types", Json::array(attribsTypes.begin(), attribsTypes.end())}}}};
585 
586  std::map<std::string, std::string> readDirs = {{"operation", "input"}, {"IO", "stdin"},
587  {"attributeNames", "x\ty"}, {"name", "test"}, {"types", types.dump()}};
588  std::map<std::string, std::string> readIoDirs = std::map<std::string, std::string>(readDirs);
589 
590  std::map<std::string, std::string> writeDirs = {{"operation", "output"}, {"IO", "stdout"},
591  {"attributeNames", "x\ty"}, {"name", "test"}, {"types", types.dump()}};
592  std::map<std::string, std::string> writeIoDirs = std::map<std::string, std::string>(writeDirs);
593 
594  Own<ram::Statement> main =
595  mk<ram::Sequence>(mk<ram::IO>("test", readIoDirs), mk<ram::IO>("test", writeIoDirs));
596 
597  rels.push_back(std::move(myrel));
598  std::map<std::string, Own<Statement>> subs;
599  Own<Program> prog = mk<Program>(std::move(rels), std::move(main), std::move(subs));
600 
601  SymbolTable symTab;
602  ErrorReport errReport;
603  DebugReport debugReport;
604 
605  TranslationUnit translationUnit(std::move(prog), symTab, errReport, debugReport);
606 
607  // configure and execute interpreter
608  Own<Engine> interpreter = mk<Engine>(translationUnit);
609 
610  std::streambuf* oldCoutStreambuf = std::cout.rdbuf();
611  std::ostringstream sout;
612  std::cout.rdbuf(sout.rdbuf());
613 
614  interpreter->executeMain();
615 
616  std::cout.rdbuf(oldCoutStreambuf);
617 
618  std::string expected = R"(---------------
619 test
620 ===============
621 meow -3 3 0.5
622 ===============
623 )";
624 
625  EXPECT_EQ(expected, sout.str());
626 
627  std::cin.rdbuf(backupCin);
628 }
629 
630 } // namespace souffle::interpreter::test
souffle::RamUnsigned
uint32_t RamUnsigned
Definition: RamTypes.h:58
souffle::interpreter::test::testInterpreterStore
const std::string testInterpreterStore(std::vector< std::string > attribs, std::vector< std::string > attribsTypes, VecOwn< Expression > exprs)
Definition: ram_relation_test.cpp:64
DebugReport.h
souffle::RamDomain
int32_t RamDomain
Definition: RamTypes.h:56
Project.h
SymbolTable.h
EXPECT_EQ
#define EXPECT_EQ(a, b)
Definition: test.h:191
souffle::Own
std::unique_ptr< A > Own
Definition: ContainerUtil.h:42
souffle::RamFloat
float RamFloat
Definition: RamTypes.h:60
types
std::vector< Own< ast::Type > > types
Definition: ComponentInstantiation.cpp:64
json11.h
json11::Json::object
std::map< std::string, Json > object
Definition: json11.h:94
RANDOM_TESTS
#define RANDOM_TESTS
Definition: ram_relation_test.cpp:62
Engine.h
Program.h
Global.h
i
size_t i
Definition: json11.h:663
ContainerUtil.h
RelationTag.h
souffle::interpreter::test
Definition: interpreter_relation_test.cpp:28
Relation.h
souffle::main
int main(int argc, char **argv)
Definition: main.cpp:191
json11::Json::array
std::vector< Json > array
Definition: json11.h:93
IO.h
test.h
json11::Json
Definition: json11.h:87
TranslationUnit.h
souffle::Global::config
static MainConfig & config()
Definition: Global.h:141
Query.h
RamTypes.h
Sequence.h
Statement.h
SignedConstant.h
souffle::ramBitCast
To ramBitCast(From source)
In C++20 there will be a new way to cast between types by reinterpreting bits (std::bit_cast),...
Definition: RamTypes.h:87
Expression.h
souffle::RelationRepresentation::BTREE
@ BTREE
souffle::VecOwn
std::vector< Own< A > > VecOwn
Definition: ContainerUtil.h:45
ErrorReport.h
souffle::interpreter::test::TEST
TEST(Relation0, Construction)
Definition: interpreter_relation_test.cpp:38