souffle  2.0.2-371-g6315b36
Data Structures | Public Member Functions | Private Types | Private Member Functions | Private Attributes
souffle::interpreter::NodeGenerator Class Reference

#include <Generator.h>

Inheritance diagram for souffle::interpreter::NodeGenerator:
Inheritance graph
Collaboration diagram for souffle::interpreter::NodeGenerator:
Collaboration graph

Data Structures

class  OrderingContext
 This class help generator reordering tuple access based on the index oder. More...
 

Public Member Functions

NodePtr generateTree (const ram::Node &root)
 Generate the tree based on given entry. More...
 
 NodeGenerator (Engine &engine)
 
NodePtr visitAggregate (const ram::Aggregate &aggregate) override
 
NodePtr visitAutoIncrement (const ram::AutoIncrement &inc) override
 
NodePtr visitBreak (const ram::Break &breakOp) override
 
NodePtr visitCall (const ram::Call &call) override
 
NodePtr visitChoice (const ram::Choice &choice) override
 
NodePtr visitClear (const ram::Clear &clear) override
 
NodePtr visitConjunction (const ram::Conjunction &conj) override
 
NodePtr visitConstant (const ram::Constant &num) override
 
NodePtr visitConstraint (const ram::Constraint &relOp) override
 
NodePtr visitDebugInfo (const ram::DebugInfo &dbg) override
 
NodePtr visitEmptinessCheck (const ram::EmptinessCheck &emptiness) override
 
NodePtr visitExistenceCheck (const ram::ExistenceCheck &exists) override
 
NodePtr visitExit (const ram::Exit &exit) override
 
NodePtr visitExtend (const ram::Extend &extend) override
 
NodePtr visitFalse (const ram::False &lfalse) override
 
NodePtr visitFilter (const ram::Filter &filter) override
 
NodePtr visitIndexAggregate (const ram::IndexAggregate &iAggregate) override
 
NodePtr visitIndexChoice (const ram::IndexChoice &iChoice) override
 
NodePtr visitIndexScan (const ram::IndexScan &iScan) override
 
NodePtr visitIntrinsicOperator (const ram::IntrinsicOperator &op) override
 
NodePtr visitIO (const ram::IO &io) override
 
NodePtr visitLogRelationTimer (const ram::LogRelationTimer &timer) override
 
NodePtr visitLogSize (const ram::LogSize &size) override
 
NodePtr visitLogTimer (const ram::LogTimer &timer) override
 
NodePtr visitLoop (const ram::Loop &loop) override
 
NodePtr visitNegation (const ram::Negation &neg) override
 
NodePtr visitNestedIntrinsicOperator (const ram::NestedIntrinsicOperator &op) override
 
NodePtr visitNestedOperation (const ram::NestedOperation &nested) override
 
NodePtr visitNode (const ram::Node &node) override
 
NodePtr visitPackRecord (const ram::PackRecord &pr) override
 
NodePtr visitParallel (const ram::Parallel &parallel) override
 
NodePtr visitParallelAggregate (const ram::ParallelAggregate &pAggregate) override
 
NodePtr visitParallelChoice (const ram::ParallelChoice &pChoice) override
 
NodePtr visitParallelIndexAggregate (const ram::ParallelIndexAggregate &piAggregate) override
 
NodePtr visitParallelIndexChoice (const ram::ParallelIndexChoice &piChoice) override
 
NodePtr visitParallelIndexScan (const ram::ParallelIndexScan &piscan) override
 
NodePtr visitParallelScan (const ram::ParallelScan &pScan) override
 
NodePtr visitProject (const ram::Project &project) override
 
NodePtr visitProvenanceExistenceCheck (const ram::ProvenanceExistenceCheck &provExists) override
 
NodePtr visitQuery (const ram::Query &query) override
 
NodePtr visitRelationSize (const ram::RelationSize &size) override
 
NodePtr visitScan (const ram::Scan &scan) override
 
NodePtr visitSequence (const ram::Sequence &seq) override
 
NodePtr visitSubroutineArgument (const ram::SubroutineArgument &arg) override
 
NodePtr visitSubroutineReturn (const ram::SubroutineReturn &ret) override
 
NodePtr visitSwap (const ram::Swap &swap) override
 
NodePtr visitTrue (const ram::True &ltrue) override
 
NodePtr visitTupleElement (const ram::TupleElement &access) override
 
NodePtr visitTupleOperation (const ram::TupleOperation &search) override
 
NodePtr visitUndefValue (const ram::UndefValue &) override
 
NodePtr visitUnpackRecord (const ram::UnpackRecord &unpack) override
 
NodePtr visitUserDefinedOperator (const ram::UserDefinedOperator &op) override
 
- Public Member Functions inherited from souffle::ram::Visitor< Own< Node > >
Own< Nodeoperator() (const Node &node, Params... args)
 The main entry for the user allowing visitors to be utilized as functions. More...
 
Own< Nodeoperator() (const Node *node, Params... args)
 The main entry for the user allowing visitors to be utilized as functions. More...
 
virtual Own< Nodevisit (const Node &node, Params... args)
 The main entry for a visit process conducting the dispatching of a visit to the various sub-types of Nodes. More...
 
virtual Own< Nodevisit (const Node *node, Params... args)
 
virtual ~Visitor ()=default
 A virtual destructor. More...
 

Private Types

using NodePtr = Own< Node >
 
using NodePtrVec = std::vector< NodePtr >
 
using RelationHandle = Own< RelationWrapper >
 

Private Member Functions

template<class RamNode >
size_t encodeIndexPos (RamNode &node)
 Return operation index id from the result of indexAnalysis. More...
 
size_t encodeRelation (const std::string &relName)
 Encode and create the relation, return the relation id. More...
 
size_t encodeView (const ram::Node *node)
 Encode and return the View id of an operation. More...
 
size_t getArity (const std::string &relName)
 get arity of relation More...
 
SuperInstruction getExistenceSuperInstInfo (const ram::AbstractExistenceCheck &abstractExist)
 Encode and return the super-instruction information about an existence check operation. More...
 
SuperInstruction getIndexSuperInstInfo (const ram::IndexOperation &ramIndex)
 Encode and return the super-instruction information about a index operation. More...
 
size_t getNewRelId ()
 Get a valid relation id for encoding. More...
 
size_t getNextViewId ()
 Get a valid view id for encoding. More...
 
SuperInstruction getProjectSuperInstInfo (const ram::Project &exist)
 Encode and return the super-instruction information about a project operation. More...
 
RelationHandlegetRelationHandle (const size_t idx)
 
const std::string & getViewRelation (const ram::Node *node)
 Return the associated relation of a operation which requires a view. More...
 
const ram::Relationlookup (const std::string &relName)
 get arity of relation More...
 
void newQueryBlock ()
 Reset view allocation system, since view's life time is within each query. More...
 
bool requireView (const ram::Node *node)
 Return true if the given operation requires a view. More...
 

Private Attributes

Engineengine
 Reference to the engine instance. More...
 
std::unordered_map< const ram::Node *, size_t > indexTable
 Environment encoding, store a mapping from ram::Node to its operation index id. More...
 
OrderingContext orderingContext = OrderingContext(*this)
 ordering context More...
 
std::shared_ptr< ViewContextparentQueryViewContext = nullptr
 Points to the current viewContext during the generation. More...
 
std::unordered_map< std::string, const ram::Relation * > relationMap
 name / relation mapping More...
 
size_t relId = 0
 Next available location to encode a relation. More...
 
std::unordered_map< std::string, size_t > relTable
 Environment encoding, store a mapping from ram::Relation to its id. More...
 
size_t viewId = 0
 Next available location to encode View. More...
 
std::unordered_map< const ram::Node *, size_t > viewTable
 Environment encoding, store a mapping from ram::Node to its View id. More...
 

Additional Inherited Members

- Protected Member Functions inherited from souffle::ram::Visitor< Own< Node > >
 LINK (AbstractConditional, NestedOperation)
 
 LINK (AbstractExistenceCheck, Condition)
 
 LINK (AbstractOperator, Expression)
 
 LINK (Aggregate, RelationOperation)
 
 LINK (AutoIncrement, Expression)
 
 LINK (BinRelationStatement, Statement)
 
 LINK (Break, AbstractConditional)
 
 LINK (Call, Statement)
 
 LINK (Choice, RelationOperation)
 
 LINK (Clear, RelationStatement)
 
 LINK (Condition, Node)
 
 LINK (Conjunction, Condition)
 
 LINK (Constant, Expression)
 
 LINK (Constraint, Condition)
 
 LINK (DebugInfo, Statement)
 
 LINK (EmptinessCheck, Condition)
 
 LINK (ExistenceCheck, AbstractExistenceCheck)
 
 LINK (Exit, Statement)
 
 LINK (Expression, Node)
 
 LINK (Extend, BinRelationStatement)
 
 LINK (False, Condition)
 
 LINK (Filter, AbstractConditional)
 
 LINK (FloatConstant, Constant)
 
 LINK (IndexAggregate, IndexOperation)
 
 LINK (IndexChoice, IndexOperation)
 
 LINK (IndexOperation, RelationOperation)
 
 LINK (IndexScan, IndexOperation)
 
 LINK (IntrinsicOperator, AbstractOperator)
 
 LINK (IO, RelationStatement)
 
 LINK (ListStatement, Statement)
 
 LINK (LogRelationTimer, Statement)
 
 LINK (LogSize, RelationStatement)
 
 LINK (LogTimer, Statement)
 
 LINK (Loop, Statement)
 
 LINK (Negation, Condition)
 
 LINK (NestedOperation, Operation)
 
 LINK (Operation, Node)
 
 LINK (PackRecord, Expression)
 
 LINK (Parallel, ListStatement)
 
 LINK (ParallelAggregate, Aggregate)
 
 LINK (ParallelChoice, Choice)
 
 LINK (ParallelIndexAggregate, IndexAggregate)
 
 LINK (ParallelIndexChoice, IndexChoice)
 
 LINK (ParallelIndexScan, IndexScan)
 
 LINK (ParallelScan, Scan)
 
 LINK (Program, Node)
 
 LINK (Project, Operation)
 
 LINK (ProvenanceExistenceCheck, AbstractExistenceCheck)
 
 LINK (Query, Statement)
 
 LINK (Relation, Node)
 
 LINK (RelationOperation, TupleOperation)
 
 LINK (RelationSize, Expression)
 
 LINK (RelationStatement, Statement)
 
 LINK (Scan, RelationOperation)
 
 LINK (Sequence, ListStatement)
 
 LINK (SignedConstant, Constant)
 
 LINK (Statement, Node)
 
 LINK (SubroutineArgument, Expression)
 
 LINK (SubroutineReturn, Operation)
 
 LINK (Swap, BinRelationStatement)
 
 LINK (True, Condition)
 
 LINK (TupleElement, Expression)
 
 LINK (TupleOperation, NestedOperation)
 
 LINK (UndefValue, Expression)
 
 LINK (UnpackRecord, TupleOperation)
 
 LINK (UnsignedConstant, Constant)
 
 LINK (UserDefinedOperator, AbstractOperator)
 
virtual Own< NodevisitNode (const Node &, Params...)
 The base case for all visitors – if no more specific overload was defined. More...
 

Detailed Description

Definition at line 119 of file Generator.h.

Member Typedef Documentation

◆ NodePtr

Definition at line 120 of file Generator.h.

◆ NodePtrVec

Definition at line 121 of file Generator.h.

◆ RelationHandle

Definition at line 122 of file Generator.h.

Constructor & Destructor Documentation

◆ NodeGenerator()

souffle::interpreter::NodeGenerator::NodeGenerator ( Engine engine)

Definition at line 30 of file Generator.cpp.

32  {
33  // Encode all relation, indexPos and viewId.
34  visitDepthFirst(root, [&](const ram::Node& node) {
35  if (isA<ram::Query>(&node)) {

Member Function Documentation

◆ encodeIndexPos()

template<class RamNode >
size_t souffle::interpreter::NodeGenerator::encodeIndexPos ( RamNode &  node)
private

Return operation index id from the result of indexAnalysis.

Definition at line 497 of file Generator.cpp.

497  {
498  signature = ram::analysis::SearchSignature::getFullSearchSignature(signature.arity());
499  }
500  auto i = orderSet.getLexOrderNum(signature);
501  indexTable[&node] = i;
502  return i;
503 };
504 
505 size_t NodeGenerator::encodeView(const ram::Node* node) {
506  auto pos = viewTable.find(node);
507  if (pos != viewTable.end()) {
508  return pos->second;

References souffle::ram::analysis::SearchSignature::arity(), and souffle::ram::analysis::SearchSignature::getFullSearchSignature().

Here is the call graph for this function:

◆ encodeRelation()

size_t souffle::interpreter::NodeGenerator::encodeRelation ( const std::string &  relName)
private

Encode and create the relation, return the relation id.

Definition at line 531 of file Generator.cpp.

537  {
538  return engine.relations[idx].get();
539 }
540 

◆ encodeView()

size_t souffle::interpreter::NodeGenerator::encodeView ( const ram::Node node)
private

Encode and return the View id of an operation.

Definition at line 510 of file Generator.cpp.

515  {
516  auto it = relationMap.find(relName);
517  assert(it != relationMap.end() && "relation not found");
518  return *it->second;

◆ generateTree()

NodePtr souffle::interpreter::NodeGenerator::generateTree ( const ram::Node root)

Generate the tree based on given entry.

Return a NodePtr to the root.

Definition at line 37 of file Generator.cpp.

38  {
39  encodeIndexPos(*indexSearch);
40  encodeView(indexSearch);
41  } else if (const auto* exists = dynamic_cast<const ram::ExistenceCheck*>(&node)) {
42  encodeIndexPos(*exists);
43  encodeView(exists);
44  } else if (const auto* provExists = dynamic_cast<const ram::ProvenanceExistenceCheck*>(&node)) {
45  encodeIndexPos(*provExists);
46  encodeView(provExists);
47  }
48  });
49  // Parse program
50  return visit(root);
51 }
52 
53 NodePtr NodeGenerator::visitConstant(const ram::Constant& num) {
54  return mk<Constant>(I_Constant, &num);
55 }
56 

◆ getArity()

size_t souffle::interpreter::NodeGenerator::getArity ( const std::string &  relName)
private

get arity of relation

Definition at line 526 of file Generator.cpp.

526  {
527  auto pos = relTable.find(relName);
528  if (pos != relTable.end()) {
529  return pos->second;

◆ getExistenceSuperInstInfo()

SuperInstruction souffle::interpreter::NodeGenerator::getExistenceSuperInstInfo ( const ram::AbstractExistenceCheck abstractExist)
private

Encode and return the super-instruction information about an existence check operation.

Definition at line 634 of file Generator.cpp.

634  {
635  indexId = encodeIndexPos(*dynamic_cast<const ram::ProvenanceExistenceCheck*>(&abstractExist));
636  } else {
637  fatal("Unrecognized ram::AbstractExistenceCheck.");
638  }
639  auto order = (*getRelationHandle(interpreterRel))->getIndexOrder(indexId);
640  size_t arity = getArity(abstractExist.getRelation());
641  SuperInstruction superOp(arity);
642  const auto& children = abstractExist.getValues();
643  for (size_t i = 0; i < arity; ++i) {
644  auto& child = children[order[i]];
645 
646  // Unbounded
647  if (isUndefValue(child)) {
648  superOp.first[i] = MIN_RAM_SIGNED;
649  superOp.second[i] = MAX_RAM_SIGNED;
650  continue;
651  }
652 
653  // Constant
654  if (isA<ram::Constant>(child)) {
655  superOp.first[i] = dynamic_cast<ram::Constant*>(child)->getConstant();
656  superOp.second[i] = superOp.first[i];
657  continue;
658  }
659 
660  // TupleElement
661  if (isA<ram::TupleElement>(child)) {
662  auto tuple = dynamic_cast<ram::TupleElement*>(child);
663  size_t tupleId = tuple->getTupleId();
664  size_t elementId = tuple->getElement();
665  size_t newElementId = orderingContext.mapOrder(tupleId, elementId);
666  superOp.tupleFirst.push_back({i, tupleId, newElementId});
667  continue;
668  }
669 
670  // Generic expression
671  superOp.exprFirst.push_back(std::pair<size_t, Own<Node>>(i, visit(child)));
672  }
673  return superOp;
674 }
675 
676 SuperInstruction NodeGenerator::getProjectSuperInstInfo(const ram::Project& exist) {
677  size_t arity = getArity(exist.getRelation());
678  SuperInstruction superOp(arity);
679  const auto& children = exist.getValues();

◆ getIndexSuperInstInfo()

SuperInstruction souffle::interpreter::NodeGenerator::getIndexSuperInstInfo ( const ram::IndexOperation ramIndex)
private

Encode and return the super-instruction information about a index operation.

Definition at line 565 of file Generator.cpp.

567  {
568  // Note: unlike orderingContext::mapOrder, where we try to decode the order,
569  // here we have to encode the order.
570  auto& low = first[order[i]];
571 
572  // Unbounded
573  if (isUndefValue(low)) {
574  indexOperation.first[i] = MIN_RAM_SIGNED;
575  continue;
576  }
577 
578  // Constant
579  if (isA<ram::Constant>(low)) {
580  indexOperation.first[i] = dynamic_cast<ram::Constant*>(low)->getConstant();
581  continue;
582  }
583 
584  // TupleElement
585  if (isA<ram::TupleElement>(low)) {
586  auto lowTuple = dynamic_cast<ram::TupleElement*>(low);
587  size_t tupleId = lowTuple->getTupleId();
588  size_t elementId = lowTuple->getElement();
589  size_t newElementId = orderingContext.mapOrder(tupleId, elementId);
590  indexOperation.tupleFirst.push_back({i, tupleId, newElementId});
591  continue;
592  }
593 
594  // Generic expression
595  indexOperation.exprFirst.push_back(std::pair<size_t, Own<Node>>(i, visit(low)));
596  }
597  const auto& second = ramIndex.getRangePattern().second;
598  for (size_t i = 0; i < arity; ++i) {
599  auto& hig = second[order[i]];
600 
601  // Unbounded
602  if (isUndefValue(hig)) {
603  indexOperation.second[i] = MAX_RAM_SIGNED;
604  continue;
605  }
606 
607  // Constant
608  if (isA<ram::Constant>(hig)) {
609  indexOperation.second[i] = dynamic_cast<ram::Constant*>(hig)->getConstant();
610  continue;
611  }
612 
613  // TupleElement
614  if (isA<ram::TupleElement>(hig)) {
615  auto highTuple = dynamic_cast<ram::TupleElement*>(hig);
616  size_t tupleId = highTuple->getTupleId();
617  size_t elementId = highTuple->getElement();
618  size_t newElementId = orderingContext.mapOrder(tupleId, elementId);
619  indexOperation.tupleSecond.push_back({i, tupleId, newElementId});
620  continue;
621  }
622 
623  // Generic expression
624  indexOperation.exprSecond.push_back(std::pair<size_t, Own<Node>>(i, visit(hig)));
625  }
626  return indexOperation;
627 }
628 
629 SuperInstruction NodeGenerator::getExistenceSuperInstInfo(const ram::AbstractExistenceCheck& abstractExist) {
630  auto interpreterRel = encodeRelation(abstractExist.getRelation());
631  size_t indexId = 0;
632  if (isA<ram::ExistenceCheck>(&abstractExist)) {

◆ getNewRelId()

size_t souffle::interpreter::NodeGenerator::getNewRelId ( )
private

Get a valid relation id for encoding.

Definition at line 488 of file Generator.cpp.

◆ getNextViewId()

size_t souffle::interpreter::NodeGenerator::getNextViewId ( )
private

Get a valid view id for encoding.

Definition at line 492 of file Generator.cpp.

492  {
493  const std::string& name = node.getRelation();
494  auto& orderSet = engine.isa->getIndexes(name);

◆ getProjectSuperInstInfo()

SuperInstruction souffle::interpreter::NodeGenerator::getProjectSuperInstInfo ( const ram::Project exist)
private

Encode and return the super-instruction information about a project operation.

No reordering needed for projection as project can have more then one target indexes and reordering can only be done during runtime.

Definition at line 681 of file Generator.cpp.

683  {
684  superOp.first[i] = dynamic_cast<ram::Constant*>(child)->getConstant();
685  continue;
686  }
687 
688  // TupleElement
689  if (isA<ram::TupleElement>(child)) {
690  auto tuple = dynamic_cast<ram::TupleElement*>(child);
691  size_t tupleId = tuple->getTupleId();
692  size_t elementId = tuple->getElement();
693  size_t newElementId = orderingContext.mapOrder(tupleId, elementId);
694  superOp.tupleFirst.push_back({i, tupleId, newElementId});
695  continue;
696  }
697 
698  // Generic expression
699  superOp.exprFirst.push_back(std::pair<size_t, Own<Node>>(i, visit(child)));
700  }
701  return superOp;
702 }
703 
704 // -- Definition of OrderingContext --
705 
706 NodeGenerator::OrderingContext::OrderingContext(NodeGenerator& generator) : generator(generator) {}
707 

References souffle::interpreter::SuperInstruction::first, and i.

◆ getRelationHandle()

RelationHandle * souffle::interpreter::NodeGenerator::getRelationHandle ( const size_t  idx)
private

Definition at line 542 of file Generator.cpp.

542  {
543  return true;
544  } else if (isA<ram::IndexOperation>(node)) {

◆ getViewRelation()

const std::string & souffle::interpreter::NodeGenerator::getViewRelation ( const ram::Node node)
private

Return the associated relation of a operation which requires a view.

This function assume the operation does requires a view.

Definition at line 555 of file Generator.cpp.

560  {
561  size_t arity = getArity(ramIndex.getRelation());
562  auto interpreterRel = encodeRelation(ramIndex.getRelation());
563  auto indexId = encodeIndexPos(ramIndex);

◆ lookup()

const ram::Relation & souffle::interpreter::NodeGenerator::lookup ( const std::string &  relName)
private

get arity of relation

Definition at line 520 of file Generator.cpp.

521  {
522  auto rel = lookup(relName);
523  return rel.getArity();
524 }

References rel().

Here is the call graph for this function:

◆ newQueryBlock()

void souffle::interpreter::NodeGenerator::newQueryBlock ( )
private

Reset view allocation system, since view's life time is within each query.

Definition at line 483 of file Generator.cpp.

483  {
484  return relId++;
485 }
486 

◆ requireView()

bool souffle::interpreter::NodeGenerator::requireView ( const ram::Node node)
private

Return true if the given operation requires a view.

Definition at line 546 of file Generator.cpp.

550  {
551  if (const auto* exist = dynamic_cast<const ram::AbstractExistenceCheck*>(node)) {
552  return exist->getRelation();
553  } else if (const auto* index = dynamic_cast<const ram::IndexOperation*>(node)) {

◆ visitAggregate()

NodePtr souffle::interpreter::NodeGenerator::visitAggregate ( const ram::Aggregate aggregate)
override

Definition at line 263 of file Generator.cpp.

273  {
274  orderingContext.addTupleWithDefaultOrder(pAggregate.getTupleId(), pAggregate);
275  NodePtr expr = visit(pAggregate.getExpression());
276  NodePtr cond = visit(pAggregate.getCondition());

◆ visitAutoIncrement()

NodePtr souffle::interpreter::NodeGenerator::visitAutoIncrement ( const ram::AutoIncrement inc)
override

Definition at line 69 of file Generator.cpp.

70  : op.getArguments()) {
71  children.push_back(visit(arg));

◆ visitBreak()

NodePtr souffle::interpreter::NodeGenerator::visitBreak ( const ram::Break breakOp)
override

Definition at line 324 of file Generator.cpp.

◆ visitCall()

NodePtr souffle::interpreter::NodeGenerator::visitCall ( const ram::Call call)
override

Definition at line 373 of file Generator.cpp.

379  {
380  size_t relId = encodeRelation(timer.getRelation());
381  auto rel = getRelationHandle(relId);
382  return mk<LogRelationTimer>(I_LogRelationTimer, &timer, visit(timer.getStatement()), rel);

◆ visitChoice()

NodePtr souffle::interpreter::NodeGenerator::visitChoice ( const ram::Choice choice)
override

Definition at line 218 of file Generator.cpp.

221  {
222  orderingContext.addTupleWithDefaultOrder(pChoice.getTupleId(), pChoice);
223  size_t relId = encodeRelation(pChoice.getRelation());
224  auto rel = getRelationHandle(relId);

◆ visitClear()

NodePtr souffle::interpreter::NodeGenerator::visitClear ( const ram::Clear clear)
override

Definition at line 398 of file Generator.cpp.

400  {
401  size_t relId = encodeRelation(size.getRelation());
402  auto rel = getRelationHandle(relId);
403  return mk<LogSize>(I_LogSize, &size, rel);

◆ visitConjunction()

NodePtr souffle::interpreter::NodeGenerator::visitConjunction ( const ram::Conjunction conj)
override

Definition at line 121 of file Generator.cpp.

◆ visitConstant()

NodePtr souffle::interpreter::NodeGenerator::visitConstant ( const ram::Constant num)
override

Definition at line 58 of file Generator.cpp.

◆ visitConstraint()

NodePtr souffle::interpreter::NodeGenerator::visitConstraint ( const ram::Constraint relOp)
override

Definition at line 165 of file Generator.cpp.

◆ visitDebugInfo()

NodePtr souffle::interpreter::NodeGenerator::visitDebugInfo ( const ram::DebugInfo dbg)
override

Definition at line 394 of file Generator.cpp.

◆ visitEmptinessCheck()

NodePtr souffle::interpreter::NodeGenerator::visitEmptinessCheck ( const ram::EmptinessCheck emptiness)
override

Definition at line 129 of file Generator.cpp.

131  {
132  size_t relId = encodeRelation(size.getRelation());
133  auto rel = getRelationHandle(relId);
134  NodeType type = constructNodeType("RelationSize", lookup(size.getRelation()));

◆ visitExistenceCheck()

NodePtr souffle::interpreter::NodeGenerator::visitExistenceCheck ( const ram::ExistenceCheck exists)
override

Definition at line 143 of file Generator.cpp.

143  {
144  isTotal = false;
145  }
146  }
147  auto ramRelation = lookup(exists.getRelation());
148  NodeType type = constructNodeType("ExistenceCheck", ramRelation);
149  return mk<ExistenceCheck>(type, &exists, isTotal, encodeView(&exists), std::move(superOp),
150  ramRelation.isTemp(), ramRelation.getName());
151 }
152 
153 NodePtr NodeGenerator::visitProvenanceExistenceCheck(const ram::ProvenanceExistenceCheck& provExists) {
154  SuperInstruction superOp = getExistenceSuperInstInfo(provExists);
155  NodeType type = constructNodeType("ProvenanceExistenceCheck", lookup(provExists.getRelation()));
156  return mk<ProvenanceExistenceCheck>(type, &provExists, visit(provExists.getChildNodes().back()),

◆ visitExit()

NodePtr souffle::interpreter::NodeGenerator::visitExit ( const ram::Exit exit)
override

Definition at line 369 of file Generator.cpp.

◆ visitExtend()

NodePtr souffle::interpreter::NodeGenerator::visitExtend ( const ram::Extend extend)
override

Definition at line 463 of file Generator.cpp.

464  {
465  size_t src = encodeRelation(swap.getFirstRelation());
466  size_t target = encodeRelation(swap.getSecondRelation());
467  return mk<Swap>(I_Swap, &swap, src, target);

References souffle::ram::BinRelationStatement::getFirstRelation(), and souffle::ram::BinRelationStatement::getSecondRelation().

Here is the call graph for this function:

◆ visitFalse()

NodePtr souffle::interpreter::NodeGenerator::visitFalse ( const ram::False lfalse)
override

Definition at line 117 of file Generator.cpp.

◆ visitFilter()

NodePtr souffle::interpreter::NodeGenerator::visitFilter ( const ram::Filter filter)
override

Definition at line 328 of file Generator.cpp.

◆ visitIndexAggregate()

NodePtr souffle::interpreter::NodeGenerator::visitIndexAggregate ( const ram::IndexAggregate iAggregate)
override

Definition at line 294 of file Generator.cpp.

303  {
304  orderingContext.addTupleWithIndexOrder(piAggregate.getTupleId(), piAggregate);
305  SuperInstruction indexOperation = getIndexSuperInstInfo(piAggregate);
306  NodePtr expr = visit(piAggregate.getExpression());

◆ visitIndexChoice()

NodePtr souffle::interpreter::NodeGenerator::visitIndexChoice ( const ram::IndexChoice iChoice)
override

Definition at line 237 of file Generator.cpp.

240  {
241  orderingContext.addTupleWithIndexOrder(piChoice.getTupleId(), piChoice);
242  SuperInstruction indexOperation = getIndexSuperInstInfo(piChoice);
243  size_t relId = encodeRelation(piChoice.getRelation());

◆ visitIndexScan()

NodePtr souffle::interpreter::NodeGenerator::visitIndexScan ( const ram::IndexScan iScan)
override

Definition at line 198 of file Generator.cpp.

201  {
202  orderingContext.addTupleWithIndexOrder(piscan.getTupleId(), piscan);
203  SuperInstruction indexOperation = getIndexSuperInstInfo(piscan);
204  size_t relId = encodeRelation(piscan.getRelation());

◆ visitIntrinsicOperator()

NodePtr souffle::interpreter::NodeGenerator::visitIntrinsicOperator ( const ram::IntrinsicOperator op)
override

Definition at line 73 of file Generator.cpp.

76  {
77  NodePtrVec children;
78  for (const auto& arg : op.getArguments()) {
79  children.push_back(visit(arg));

◆ visitIO()

NodePtr souffle::interpreter::NodeGenerator::visitIO ( const ram::IO io)
override

Definition at line 411 of file Generator.cpp.

412  {
413  std::shared_ptr<ViewContext> viewContext = std::make_shared<ViewContext>();
414  parentQueryViewContext = viewContext;
415  // split terms of conditions of outer-most filter operation

◆ visitLogRelationTimer()

NodePtr souffle::interpreter::NodeGenerator::visitLogRelationTimer ( const ram::LogRelationTimer timer)
override

Definition at line 384 of file Generator.cpp.

385  {
386  return mk<LogTimer>(I_LogTimer, &timer, visit(timer.getStatement()));
387 }
388 

References souffle::ram::AbstractLog::getStatement().

Here is the call graph for this function:

◆ visitLogSize()

NodePtr souffle::interpreter::NodeGenerator::visitLogSize ( const ram::LogSize size)
override

Definition at line 405 of file Generator.cpp.

406  {
407  size_t relId = encodeRelation(io.getRelation());
408  auto rel = getRelationHandle(relId);
409  return mk<IO>(I_IO, &io, rel);

References souffle::ram::RelationStatement::getRelation(), and rel().

Here is the call graph for this function:

◆ visitLogTimer()

NodePtr souffle::interpreter::NodeGenerator::visitLogTimer ( const ram::LogTimer timer)
override

Definition at line 390 of file Generator.cpp.

◆ visitLoop()

NodePtr souffle::interpreter::NodeGenerator::visitLoop ( const ram::Loop loop)
override

Definition at line 365 of file Generator.cpp.

◆ visitNegation()

NodePtr souffle::interpreter::NodeGenerator::visitNegation ( const ram::Negation neg)
override

Definition at line 125 of file Generator.cpp.

◆ visitNestedIntrinsicOperator()

NodePtr souffle::interpreter::NodeGenerator::visitNestedIntrinsicOperator ( const ram::NestedIntrinsicOperator op)
override

Definition at line 89 of file Generator.cpp.

95  {
96  NodePtrVec children;
97  for (const auto& arg : pr.getArguments()) {
98  children.push_back(visit(arg));

◆ visitNestedOperation()

NodePtr souffle::interpreter::NodeGenerator::visitNestedOperation ( const ram::NestedOperation nested)
override

Definition at line 169 of file Generator.cpp.

169  {
170  return mk<TupleOperation>(I_TupleOperation, &search, visit(search.getOperation()));
171  }

References souffle::ram::NestedOperation::getOperation().

Here is the call graph for this function:

◆ visitNode()

NodePtr souffle::interpreter::NodeGenerator::visitNode ( const ram::Node node)
override

Definition at line 479 of file Generator.cpp.

◆ visitPackRecord()

NodePtr souffle::interpreter::NodeGenerator::visitPackRecord ( const ram::PackRecord pr)
override

Definition at line 100 of file Generator.cpp.

103  {
104  return mk<SubroutineArgument>(I_SubroutineArgument, &arg);
105 }
106 

◆ visitParallel()

NodePtr souffle::interpreter::NodeGenerator::visitParallel ( const ram::Parallel parallel)
override

Definition at line 356 of file Generator.cpp.

360  {
361  return mk<Loop>(I_Loop, &loop, visit(loop.getBody()));
362 }
363 

◆ visitParallelAggregate()

NodePtr souffle::interpreter::NodeGenerator::visitParallelAggregate ( const ram::ParallelAggregate pAggregate)
override

Definition at line 278 of file Generator.cpp.

289  {
290  orderingContext.addTupleWithIndexOrder(iAggregate.getTupleId(), iAggregate);
291  SuperInstruction indexOperation = getIndexSuperInstInfo(iAggregate);
292  NodePtr expr = visit(iAggregate.getExpression());

◆ visitParallelChoice()

NodePtr souffle::interpreter::NodeGenerator::visitParallelChoice ( const ram::ParallelChoice pChoice)
override

Definition at line 226 of file Generator.cpp.

232  {
233  orderingContext.addTupleWithIndexOrder(iChoice.getTupleId(), iChoice);
234  SuperInstruction indexOperation = getIndexSuperInstInfo(iChoice);
235  NodeType type = constructNodeType("IndexChoice", lookup(iChoice.getRelation()));

◆ visitParallelIndexAggregate()

NodePtr souffle::interpreter::NodeGenerator::visitParallelIndexAggregate ( const ram::ParallelIndexAggregate piAggregate)
override

Definition at line 308 of file Generator.cpp.

319  {
320  return mk<Break>(I_Break, &breakOp, visit(breakOp.getCondition()), visit(breakOp.getOperation()));
321 }
322 

◆ visitParallelIndexChoice()

NodePtr souffle::interpreter::NodeGenerator::visitParallelIndexChoice ( const ram::ParallelIndexChoice piChoice)
override

Definition at line 245 of file Generator.cpp.

252  { // get reference
253  orderingContext.addNewTuple(unpack.getTupleId(), unpack.getArity());
254  return mk<UnpackRecord>(
255  I_UnpackRecord, &unpack, visit(unpack.getExpression()), visitTupleOperation(unpack));

◆ visitParallelIndexScan()

NodePtr souffle::interpreter::NodeGenerator::visitParallelIndexScan ( const ram::ParallelIndexScan piscan)
override

Definition at line 206 of file Generator.cpp.

213  {
214  orderingContext.addTupleWithDefaultOrder(choice.getTupleId(), choice);
215  size_t relId = encodeRelation(choice.getRelation());
216  auto rel = getRelationHandle(relId);

◆ visitParallelScan()

NodePtr souffle::interpreter::NodeGenerator::visitParallelScan ( const ram::ParallelScan pScan)
override

Definition at line 188 of file Generator.cpp.

193  {
194  orderingContext.addTupleWithIndexOrder(iScan.getTupleId(), iScan);
195  SuperInstruction indexOperation = getIndexSuperInstInfo(iScan);
196  NodeType type = constructNodeType("IndexScan", lookup(iScan.getRelation()));

◆ visitProject()

NodePtr souffle::interpreter::NodeGenerator::visitProject ( const ram::Project project)
override

Definition at line 332 of file Generator.cpp.

335  {
336  NodePtrVec children;
337  for (const auto& value : ret.getValues()) {
338  children.push_back(visit(value));

◆ visitProvenanceExistenceCheck()

NodePtr souffle::interpreter::NodeGenerator::visitProvenanceExistenceCheck ( const ram::ProvenanceExistenceCheck provExists)
override

Definition at line 158 of file Generator.cpp.

160  {
161  return mk<Constraint>(I_Constraint, &relOp, visit(relOp.getLHS()), visit(relOp.getRHS()));
162 }
163 

◆ visitQuery()

NodePtr souffle::interpreter::NodeGenerator::visitQuery ( const ram::Query query)
override

Definition at line 417 of file Generator.cpp.

420  {
421  next = &filter->getOperation();
422  // Check terms of outer filter operation whether they can be pushed before
423  // the view-generation for speed improvements
424  auto conditions = findConjunctiveTerms(&filter->getCondition());
425  for (auto const& cur : conditions) {
426  bool needView = false;
427  visitDepthFirst(*cur, [&](const ram::Node& node) {
428  if (requireView(&node)) {
429  needView = true;
430  const auto& rel = getViewRelation(&node);
431  viewContext->addViewInfoForFilter(
432  encodeRelation(rel), indexTable[&node], encodeView(&node));
433  }
434  });
435 
436  if (needView) {
437  viewContext->addViewOperationForFilter(visit(*cur));
438  } else {
439  viewContext->addViewFreeOperationForFilter(visit(*cur));
440  }
441  }
442  }
443 
444  visitDepthFirst(*next, [&](const ram::Node& node) {
445  if (requireView(&node)) {
446  const auto& rel = getViewRelation(&node);
447  viewContext->addViewInfoForNested(encodeRelation(rel), indexTable[&node], encodeView(&node));
448  };
449  });
450 
451  visitDepthFirst(*next, [&](const ram::AbstractParallel&) { viewContext->isParallel = true; });
452 
453  auto res = mk<Query>(I_Query, &query, visit(*next));
454  res->setViewContext(parentQueryViewContext);
455  return res;
456 }
457 
458 NodePtr NodeGenerator::visitExtend(const ram::Extend& extend) {
459  size_t src = encodeRelation(extend.getFirstRelation());
460  size_t target = encodeRelation(extend.getSecondRelation());
461  return mk<Extend>(I_Extend, &extend, src, target);

References souffle::filter(), souffle::ram::findConjunctiveTerms(), rel(), and souffle::ast::visitDepthFirst().

Here is the call graph for this function:

◆ visitRelationSize()

NodePtr souffle::interpreter::NodeGenerator::visitRelationSize ( const ram::RelationSize size)
override

Definition at line 136 of file Generator.cpp.

138  {
139  SuperInstruction superOp = getExistenceSuperInstInfo(exists);
140  // Check if the search signature is a total signature
141  bool isTotal = true;

◆ visitScan()

NodePtr souffle::interpreter::NodeGenerator::visitScan ( const ram::Scan scan)
override

Definition at line 180 of file Generator.cpp.

183  {
184  orderingContext.addTupleWithDefaultOrder(pScan.getTupleId(), pScan);
185  size_t relId = encodeRelation(pScan.getRelation());
186  auto rel = getRelationHandle(relId);

◆ visitSequence()

NodePtr souffle::interpreter::NodeGenerator::visitSequence ( const ram::Sequence seq)
override

Definition at line 348 of file Generator.cpp.

351  {
352  // Parallel statements are executed in sequence for now.
353  NodePtrVec children;
354  for (const auto& value : parallel.getStatements()) {

◆ visitSubroutineArgument()

NodePtr souffle::interpreter::NodeGenerator::visitSubroutineArgument ( const ram::SubroutineArgument arg)
override

Definition at line 108 of file Generator.cpp.

108  {
109  return mk<True>(I_True, &ltrue);
110 }

◆ visitSubroutineReturn()

NodePtr souffle::interpreter::NodeGenerator::visitSubroutineReturn ( const ram::SubroutineReturn ret)
override

Definition at line 340 of file Generator.cpp.

343  {
344  NodePtrVec children;
345  for (const auto& value : seq.getStatements()) {
346  children.push_back(visit(value));

◆ visitSwap()

NodePtr souffle::interpreter::NodeGenerator::visitSwap ( const ram::Swap swap)
override

Definition at line 469 of file Generator.cpp.

470  {
471  return nullptr;
472 }
473 

◆ visitTrue()

NodePtr souffle::interpreter::NodeGenerator::visitTrue ( const ram::True ltrue)
override

Definition at line 113 of file Generator.cpp.

◆ visitTupleElement()

NodePtr souffle::interpreter::NodeGenerator::visitTupleElement ( const ram::TupleElement access)
override

Definition at line 62 of file Generator.cpp.

64  {
65  return mk<AutoIncrement>(I_AutoIncrement, &inc);
66 }
67 

◆ visitTupleOperation()

NodePtr souffle::interpreter::NodeGenerator::visitTupleOperation ( const ram::TupleOperation search)
override

Definition at line 173 of file Generator.cpp.

175  {
176  orderingContext.addTupleWithDefaultOrder(scan.getTupleId(), scan);
177  size_t relId = encodeRelation(scan.getRelation());
178  auto rel = getRelationHandle(relId);

◆ visitUndefValue()

NodePtr souffle::interpreter::NodeGenerator::visitUndefValue ( const ram::UndefValue )
override

Definition at line 475 of file Generator.cpp.

475  : %s", typeid(node).name());
476 }
477 

◆ visitUnpackRecord()

NodePtr souffle::interpreter::NodeGenerator::visitUnpackRecord ( const ram::UnpackRecord unpack)
override

Definition at line 257 of file Generator.cpp.

258  {
259  // Notice: Aggregate is sensitive to the visiting order of the subexprs in order to make
260  // orderCtxt consistent. The order of visiting should be the same as the order of execution during
261  // runtime.

References souffle::ram::TupleOperation::getTupleId().

Here is the call graph for this function:

◆ visitUserDefinedOperator()

NodePtr souffle::interpreter::NodeGenerator::visitUserDefinedOperator ( const ram::UserDefinedOperator op)
override

Definition at line 81 of file Generator.cpp.

84  {
85  auto arity = op.getArguments().size();
86  orderingContext.addNewTuple(op.getTupleId(), arity);
87  NodePtrVec children;

Field Documentation

◆ engine

Engine& souffle::interpreter::NodeGenerator::engine
private

Reference to the engine instance.

Definition at line 354 of file Generator.h.

◆ indexTable

std::unordered_map<const ram::Node*, size_t> souffle::interpreter::NodeGenerator::indexTable
private

Environment encoding, store a mapping from ram::Node to its operation index id.

Definition at line 336 of file Generator.h.

◆ orderingContext

OrderingContext souffle::interpreter::NodeGenerator::orderingContext = OrderingContext(*this)
private

ordering context

Definition at line 352 of file Generator.h.

◆ parentQueryViewContext

std::shared_ptr<ViewContext> souffle::interpreter::NodeGenerator::parentQueryViewContext = nullptr
private

Points to the current viewContext during the generation.

It is used to passing viewContext between parent query and its nested parallel operation. As parallel operation requires its own view information.

Definition at line 340 of file Generator.h.

◆ relationMap

std::unordered_map<std::string, const ram::Relation*> souffle::interpreter::NodeGenerator::relationMap
private

name / relation mapping

Definition at line 350 of file Generator.h.

◆ relId

size_t souffle::interpreter::NodeGenerator::relId = 0
private

Next available location to encode a relation.

Definition at line 344 of file Generator.h.

◆ relTable

std::unordered_map<std::string, size_t> souffle::interpreter::NodeGenerator::relTable
private

Environment encoding, store a mapping from ram::Relation to its id.

Definition at line 348 of file Generator.h.

◆ viewId

size_t souffle::interpreter::NodeGenerator::viewId = 0
private

Next available location to encode View.

Definition at line 342 of file Generator.h.

◆ viewTable

std::unordered_map<const ram::Node*, size_t> souffle::interpreter::NodeGenerator::viewTable
private

Environment encoding, store a mapping from ram::Node to its View id.

Definition at line 346 of file Generator.h.


The documentation for this class was generated from the following files:
souffle::interpreter::NodeGenerator::OrderingContext::mapOrder
size_t mapOrder(size_t tupleId, size_t elementId) const
Map the decoded order of elementId based on current context.
Definition: Generator.cpp:735
souffle::interpreter::Engine::relations
VecOwn< RelationHandle > relations
Symbol table for relations.
Definition: Engine.h:184
TCB_SPAN_NAMESPACE_NAME::detail::size
constexpr auto size(const C &c) -> decltype(c.size())
Definition: span.h:198
souffle::interpreter::NodeGenerator::visitExtend
NodePtr visitExtend(const ram::Extend &extend) override
Definition: Generator.cpp:463
souffle::ram::Visitor< Own< Node > >::visit
virtual Own< Node > visit(const Node &node, Params... args)
The main entry for a visit process conducting the dispatching of a visit to the various sub-types of ...
Definition: Visitor.h:144
souffle::interpreter::NodeGenerator::relId
size_t relId
Next available location to encode a relation.
Definition: Generator.h:344
souffle::interpreter::NodeGenerator::getRelationHandle
RelationHandle * getRelationHandle(const size_t idx)
Definition: Generator.cpp:542
souffle::interpreter::NodeGenerator::relationMap
std::unordered_map< std::string, const ram::Relation * > relationMap
name / relation mapping
Definition: Generator.h:350
souffle::interpreter::NodeGenerator::getArity
size_t getArity(const std::string &relName)
get arity of relation
Definition: Generator.cpp:526
souffle::MAX_RAM_SIGNED
constexpr RamSigned MAX_RAM_SIGNED
Definition: RamTypes.h:97
souffle::ram::isUndefValue
bool isUndefValue(const Expression *expr)
Determines if an expression represents an undefined value.
Definition: Utils.h:40
souffle::interpreter::NodeGenerator::visitTupleOperation
NodePtr visitTupleOperation(const ram::TupleOperation &search) override
Definition: Generator.cpp:173
low
d d low
Definition: htmlJsChartistMin.h:15
souffle::interpreter::NodeGenerator::OrderingContext::addNewTuple
void addNewTuple(size_t tupleId, size_t arity)
Bind tuple with a natural full order.
Definition: Generator.cpp:713
souffle::interpreter::NodeGenerator::relTable
std::unordered_map< std::string, size_t > relTable
Environment encoding, store a mapping from ram::Relation to its id.
Definition: Generator.h:348
souffle::interpreter::NodeGenerator::viewTable
std::unordered_map< const ram::Node *, size_t > viewTable
Environment encoding, store a mapping from ram::Node to its View id.
Definition: Generator.h:346
souffle::interpreter::Engine::isa
ram::analysis::IndexAnalysis * isa
IndexAnalysis.
Definition: Engine.h:180
souffle::interpreter::NodeGenerator::indexTable
std::unordered_map< const ram::Node *, size_t > indexTable
Environment encoding, store a mapping from ram::Node to its operation index id.
Definition: Generator.h:336
souffle::interpreter::NodeGenerator::NodePtr
Own< Node > NodePtr
Definition: Generator.h:120
souffle::interpreter::NodeGenerator::OrderingContext::addTupleWithDefaultOrder
void addTupleWithDefaultOrder(size_t tupleId, const RamNode &node)
Bind tuple with the default order.
Definition: Generator.cpp:722
souffle::interpreter::NodeGenerator::getIndexSuperInstInfo
SuperInstruction getIndexSuperInstInfo(const ram::IndexOperation &ramIndex)
Encode and return the super-instruction information about a index operation.
Definition: Generator.cpp:565
souffle::ram::findConjunctiveTerms
std::vector< const ram::Condition * > findConjunctiveTerms(const ram::Condition *condition)
store terms of a conjunction in an array of pointers without cloning
Definition: Utils.h:102
souffle::interpreter::NodeGenerator::parentQueryViewContext
std::shared_ptr< ViewContext > parentQueryViewContext
Points to the current viewContext during the generation.
Definition: Generator.h:340
souffle::interpreter::NodeGenerator::visitConstant
NodePtr visitConstant(const ram::Constant &num) override
Definition: Generator.cpp:58
souffle::interpreter::NodeType
NodeType
Definition: Node.h:129
souffle::interpreter::NodeGenerator::getExistenceSuperInstInfo
SuperInstruction getExistenceSuperInstInfo(const ram::AbstractExistenceCheck &abstractExist)
Encode and return the super-instruction information about an existence check operation.
Definition: Generator.cpp:634
i
size_t i
Definition: json11.h:663
souffle::filter
std::vector< A > filter(std::vector< A > xs, F &&f)
Filter a vector to include certain elements.
Definition: FunctionalUtil.h:155
souffle::interpreter::NodeGenerator::lookup
const ram::Relation & lookup(const std::string &relName)
get arity of relation
Definition: Generator.cpp:520
souffle::interpreter::NodeGenerator::OrderingContext::addTupleWithIndexOrder
void addTupleWithIndexOrder(size_t tupleId, const RamNode &node)
Bind tuple with the corresponding index order.
Definition: Generator.cpp:728
souffle::interpreter::NodeGenerator::requireView
bool requireView(const ram::Node *node)
Return true if the given operation requires a view.
Definition: Generator.cpp:546
souffle::interpreter::NodeGenerator::NodeGenerator
NodeGenerator(Engine &engine)
Definition: Generator.cpp:30
souffle::MIN_RAM_SIGNED
constexpr RamSigned MIN_RAM_SIGNED
lower and upper boundaries for the ram types
Definition: RamTypes.h:96
souffle::interpreter::NodeGenerator::encodeView
size_t encodeView(const ram::Node *node)
Encode and return the View id of an operation.
Definition: Generator.cpp:510
souffle::interpreter::NodeGenerator::NodePtrVec
std::vector< NodePtr > NodePtrVec
Definition: Generator.h:121
souffle::interpreter::constructNodeType
NodeType constructNodeType(std::string tokBase, const ram::Relation &rel)
Construct interpreterNodeType by looking at the representation and the arity of the given rel.
Definition: Node.h:146
souffle::ram::analysis::SearchSignature::getFullSearchSignature
static SearchSignature getFullSearchSignature(size_t arity)
Definition: Index.cpp:140
souffle::interpreter::NodeGenerator::OrderingContext::OrderingContext
OrderingContext(NodeGenerator &generator)
Definition: Generator.cpp:711
souffle::interpreter::NodeGenerator::visitProvenanceExistenceCheck
NodePtr visitProvenanceExistenceCheck(const ram::ProvenanceExistenceCheck &provExists) override
Definition: Generator.cpp:158
souffle::fatal
void fatal(const char *format, const Args &... args)
Definition: MiscUtil.h:198
souffle::interpreter::NodeGenerator::encodeRelation
size_t encodeRelation(const std::string &relName)
Encode and create the relation, return the relation id.
Definition: Generator.cpp:531
souffle::ast::visitDepthFirst
void visitDepthFirst(const Node &root, Visitor< R, Ps... > &visitor, Args &... args)
A utility function visiting all nodes within the ast rooted by the given node recursively in a depth-...
Definition: Visitor.h:273
souffle::interpreter::NodeGenerator::engine
Engine & engine
Reference to the engine instance.
Definition: Generator.h:354
souffle::ram::analysis::IndexAnalysis::getIndexes
MinIndexSelection & getIndexes(const std::string &relName)
@Brief get the minimal index cover for a relation
Definition: Index.cpp:549
souffle::interpreter::NodeGenerator::getViewRelation
const std::string & getViewRelation(const ram::Node *node)
Return the associated relation of a operation which requires a view.
Definition: Generator.cpp:555
rel
void rel(size_t limit, bool showLimit=true)
Definition: Tui.h:1086
souffle::interpreter::NodeGenerator::orderingContext
OrderingContext orderingContext
ordering context
Definition: Generator.h:352
std::type
ElementType type
Definition: span.h:640
souffle::interpreter::NodeGenerator::getProjectSuperInstInfo
SuperInstruction getProjectSuperInstInfo(const ram::Project &exist)
Encode and return the super-instruction information about a project operation.
Definition: Generator.cpp:681
souffle::interpreter::NodeGenerator::encodeIndexPos
size_t encodeIndexPos(RamNode &node)
Return operation index id from the result of indexAnalysis.
Definition: Generator.cpp:497