souffle  2.0.2-371-g6315b36
Public Member Functions | Protected Member Functions
souffle::ram::Visitor< R, Params > Struct Template Reference

The generic base type of all RamVisitors realizing the dispatching of visitor calls. More...

#include <Visitor.h>

Inheritance diagram for souffle::ram::Visitor< R, Params >:
Inheritance graph
Collaboration diagram for souffle::ram::Visitor< R, Params >:
Collaboration graph

Public Member Functions

operator() (const Node &node, Params... args)
 The main entry for the user allowing visitors to be utilized as functions. More...
 
operator() (const Node *node, Params... args)
 The main entry for the user allowing visitors to be utilized as functions. More...
 
virtual R 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 Nodes. More...
 
virtual R visit (const Node *node, Params... args)
 
virtual ~Visitor ()=default
 A virtual destructor. More...
 

Protected Member Functions

 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 R visitNode (const Node &, Params...)
 The base case for all visitors – if no more specific overload was defined. More...
 

Detailed Description

template<typename R = void, typename... Params>
struct souffle::ram::Visitor< R, Params >

The generic base type of all RamVisitors realizing the dispatching of visitor calls.

Each visitor may define a return type R and a list of extra parameters to be passed along with the visited Nodes to the corresponding visitor function.

Template Parameters
Rthe result type produced by a visit call
Paramsextra parameters to be passed to the visit call

Definition at line 119 of file Visitor.h.

Constructor & Destructor Documentation

◆ ~Visitor()

template<typename R = void, typename... Params>
virtual souffle::ram::Visitor< R, Params >::~Visitor ( )
virtualdefault

A virtual destructor.

Member Function Documentation

◆ LINK() [1/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( AbstractConditional  ,
NestedOperation   
)
protected

◆ LINK() [2/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( AbstractExistenceCheck  ,
Condition   
)
protected

◆ LINK() [3/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( AbstractOperator  ,
Expression   
)
protected

◆ LINK() [4/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Aggregate  ,
RelationOperation   
)
protected

◆ LINK() [5/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( AutoIncrement  ,
Expression   
)
protected

◆ LINK() [6/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( BinRelationStatement  ,
Statement   
)
protected

◆ LINK() [7/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Break  ,
AbstractConditional   
)
protected

◆ LINK() [8/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Call  ,
Statement   
)
protected

◆ LINK() [9/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Choice  ,
RelationOperation   
)
protected

◆ LINK() [10/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Clear  ,
RelationStatement   
)
protected

◆ LINK() [11/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Condition  ,
Node   
)
protected

◆ LINK() [12/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Conjunction  ,
Condition   
)
protected

◆ LINK() [13/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Constant  ,
Expression   
)
protected

◆ LINK() [14/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Constraint  ,
Condition   
)
protected

◆ LINK() [15/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( DebugInfo  ,
Statement   
)
protected

◆ LINK() [16/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( EmptinessCheck  ,
Condition   
)
protected

◆ LINK() [17/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( ExistenceCheck  ,
AbstractExistenceCheck   
)
protected

◆ LINK() [18/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Exit  ,
Statement   
)
protected

◆ LINK() [19/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Expression  ,
Node   
)
protected

◆ LINK() [20/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Extend  ,
BinRelationStatement   
)
protected

◆ LINK() [21/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( False  ,
Condition   
)
protected

◆ LINK() [22/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Filter  ,
AbstractConditional   
)
protected

◆ LINK() [23/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( FloatConstant  ,
Constant   
)
protected

◆ LINK() [24/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( IndexAggregate  ,
IndexOperation   
)
protected

◆ LINK() [25/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( IndexChoice  ,
IndexOperation   
)
protected

◆ LINK() [26/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( IndexOperation  ,
RelationOperation   
)
protected

◆ LINK() [27/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( IndexScan  ,
IndexOperation   
)
protected

◆ LINK() [28/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( IntrinsicOperator  ,
AbstractOperator   
)
protected

◆ LINK() [29/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( IO  ,
RelationStatement   
)
protected

◆ LINK() [30/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( ListStatement  ,
Statement   
)
protected

◆ LINK() [31/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( LogRelationTimer  ,
Statement   
)
protected

◆ LINK() [32/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( LogSize  ,
RelationStatement   
)
protected

◆ LINK() [33/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( LogTimer  ,
Statement   
)
protected

◆ LINK() [34/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Loop  ,
Statement   
)
protected

◆ LINK() [35/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Negation  ,
Condition   
)
protected

◆ LINK() [36/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( NestedOperation  ,
Operation   
)
protected

◆ LINK() [37/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Operation  ,
Node   
)
protected

◆ LINK() [38/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( PackRecord  ,
Expression   
)
protected

◆ LINK() [39/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Parallel  ,
ListStatement   
)
protected

◆ LINK() [40/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( ParallelAggregate  ,
Aggregate   
)
protected

◆ LINK() [41/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( ParallelChoice  ,
Choice   
)
protected

◆ LINK() [42/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( ParallelIndexAggregate  ,
IndexAggregate   
)
protected

◆ LINK() [43/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( ParallelIndexChoice  ,
IndexChoice   
)
protected

◆ LINK() [44/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( ParallelIndexScan  ,
IndexScan   
)
protected

◆ LINK() [45/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( ParallelScan  ,
Scan   
)
protected

◆ LINK() [46/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Program  ,
Node   
)
protected

◆ LINK() [47/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Project  ,
Operation   
)
protected

◆ LINK() [48/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( ProvenanceExistenceCheck  ,
AbstractExistenceCheck   
)
protected

◆ LINK() [49/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Query  ,
Statement   
)
protected

◆ LINK() [50/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Relation  ,
Node   
)
protected

◆ LINK() [51/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( RelationOperation  ,
TupleOperation   
)
protected

◆ LINK() [52/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( RelationSize  ,
Expression   
)
protected

◆ LINK() [53/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( RelationStatement  ,
Statement   
)
protected

◆ LINK() [54/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Scan  ,
RelationOperation   
)
protected

◆ LINK() [55/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Sequence  ,
ListStatement   
)
protected

◆ LINK() [56/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( SignedConstant  ,
Constant   
)
protected

◆ LINK() [57/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Statement  ,
Node   
)
protected

◆ LINK() [58/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( SubroutineArgument  ,
Expression   
)
protected

◆ LINK() [59/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( SubroutineReturn  ,
Operation   
)
protected

◆ LINK() [60/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( Swap  ,
BinRelationStatement   
)
protected

◆ LINK() [61/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( True  ,
Condition   
)
protected

◆ LINK() [62/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( TupleElement  ,
Expression   
)
protected

◆ LINK() [63/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( TupleOperation  ,
NestedOperation   
)
protected

◆ LINK() [64/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( UndefValue  ,
Expression   
)
protected

◆ LINK() [65/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( UnpackRecord  ,
TupleOperation   
)
protected

◆ LINK() [66/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( UnsignedConstant  ,
Constant   
)
protected

◆ LINK() [67/67]

template<typename R = void, typename... Params>
souffle::ram::Visitor< R, Params >::LINK ( UserDefinedOperator  ,
AbstractOperator   
)
protected

◆ operator()() [1/2]

template<typename R = void, typename... Params>
R souffle::ram::Visitor< R, Params >::operator() ( const Node node,
Params...  args 
)
inline

The main entry for the user allowing visitors to be utilized as functions.

Definition at line 124 of file Visitor.h.

137  {

◆ operator()() [2/2]

template<typename R = void, typename... Params>
R souffle::ram::Visitor< R, Params >::operator() ( const Node node,
Params...  args 
)
inline

The main entry for the user allowing visitors to be utilized as functions.

Definition at line 129 of file Visitor.h.

137  {

◆ visit() [1/2]

template<typename R = void, typename... Params>
virtual R souffle::ram::Visitor< R, Params >::visit ( const Node node,
Params...  args 
)
inlinevirtual

The main entry for a visit process conducting the dispatching of a visit to the various sub-types of Nodes.

Sub-classes may override this implementation to conduct pre-visit operations.

Note that the order of this list is important. Sub-classes must be listed before their super-classes; otherwise sub-classes cannot be visited.

Parameters
nodethe node to be visited
argsa list of extra parameters to be forwarded

Definition at line 144 of file Visitor.h.

213  : %s", typeid(node).name());
214  }
215 
216  virtual R visit(const Node* node, Params... args) {
217  return visit(*node, args...);
218  }
219 
220 protected:
221 #define LINK(Node, Parent) \

◆ visit() [2/2]

template<typename R = void, typename... Params>
virtual R souffle::ram::Visitor< R, Params >::visit ( const Node node,
Params...  args 
)
inlinevirtual

Definition at line 223 of file Visitor.h.

316  {

◆ visitNode()

template<typename R = void, typename... Params>
virtual R souffle::ram::Visitor< R, Params >::visitNode ( const Node ,
Params...   
)
inlineprotectedvirtual

The base case for all visitors – if no more specific overload was defined.

Definition at line 323 of file Visitor.h.

331  {

The documentation for this struct was generated from the following file: