souffle  2.0.2-371-g6315b36
Public Member Functions | Protected Member Functions | Friends
souffle::ram::Node Class Referenceabstract

Node is a superclass for all RAM IR classes. More...

#include <Node.h>

Inheritance diagram for souffle::ram::Node:
Inheritance graph
Collaboration diagram for souffle::ram::Node:
Collaboration graph

Public Member Functions

virtual void apply (const NodeMapper &)
 Apply the mapper to all child nodes. More...
 
virtual Nodeclone () const =0
 Create a clone (i.e. More...
 
virtual std::vector< const Node * > getChildNodes () const
 Obtain list of all embedded child nodes. More...
 
bool operator!= (const Node &other) const
 Inequality check for two RAM nodes. More...
 
bool operator== (const Node &other) const
 Equivalence check for two RAM nodes. More...
 
virtual void rewrite (const Node *oldNode, Own< Node > newNode)
 Rewrite a child node. More...
 
virtual ~Node ()=default
 

Protected Member Functions

virtual bool equal (const Node &) const
 Equality check for two RAM nodes. More...
 
virtual void print (std::ostream &out=std::cout) const =0
 Print RAM node. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const Node &node)
 Print RAM on a stream. More...
 

Detailed Description

Node is a superclass for all RAM IR classes.

Definition at line 42 of file Node.h.

Constructor & Destructor Documentation

◆ ~Node()

virtual souffle::ram::Node::~Node ( )
virtualdefault

Member Function Documentation

◆ apply()

virtual void souffle::ram::Node::apply ( const NodeMapper )
inlinevirtual

◆ clone()

virtual Node* souffle::ram::Node::clone ( ) const
pure virtual

Create a clone (i.e.

deep copy) of this node

Implemented in souffle::ram::NestedOperation, souffle::ram::AbstractConditional, souffle::ram::RelationOperation, souffle::ram::TupleOperation, souffle::ram::Statement, souffle::ram::Condition, souffle::ram::Operation, souffle::ram::Expression, souffle::ram::Program, souffle::ram::Relation, souffle::ram::IndexOperation, souffle::ram::IndexChoice, souffle::ram::NestedIntrinsicOperator, souffle::ram::Constraint, souffle::ram::Project, souffle::ram::Conjunction, souffle::ram::UnpackRecord, souffle::ram::UserDefinedOperator, souffle::ram::Choice, souffle::ram::Aggregate, souffle::ram::SubroutineReturn, souffle::ram::LogRelationTimer, souffle::ram::ParallelIndexChoice, souffle::ram::IndexAggregate, souffle::ram::Query, souffle::ram::Negation, souffle::ram::ParallelIndexScan, souffle::ram::Exit, souffle::ram::LogTimer, souffle::ram::Loop, souffle::ram::PackRecord, souffle::ram::EmptinessCheck, souffle::ram::IndexScan, souffle::ram::ParallelAggregate, souffle::ram::ParallelIndexAggregate, souffle::ram::RelationSize, souffle::ram::IO, souffle::ram::Parallel, souffle::ram::ParallelChoice, souffle::ram::ParallelScan, souffle::ram::DebugInfo, souffle::ram::Extend, souffle::ram::IntrinsicOperator, souffle::ram::TupleElement, souffle::ram::Break, souffle::ram::Clear, souffle::ram::Filter, souffle::ram::ExistenceCheck, souffle::ram::Scan, souffle::ram::Call, souffle::ram::FloatConstant, souffle::ram::SignedConstant, souffle::ram::UnsignedConstant, souffle::ram::SubroutineArgument, souffle::ram::LogSize, souffle::ram::ProvenanceExistenceCheck, souffle::ram::Swap, souffle::ram::Sequence, souffle::ram::False, souffle::ram::True, souffle::ram::AutoIncrement, and souffle::ram::UndefValue.

◆ equal()

virtual bool souffle::ram::Node::equal ( const Node ) const
inlineprotectedvirtual

◆ getChildNodes()

virtual std::vector<const Node*> souffle::ram::Node::getChildNodes ( ) const
inlinevirtual

◆ operator!=()

bool souffle::ram::Node::operator!= ( const Node other) const
inline

Inequality check for two RAM nodes.

Definition at line 59 of file Node.h.

65  {}

◆ operator==()

bool souffle::ram::Node::operator== ( const Node other) const
inline

Equivalence check for two RAM nodes.

Definition at line 52 of file Node.h.

53  {
54  return !(*this == other);

◆ print()

virtual void souffle::ram::Node::print ( std::ostream &  out = std::cout) const
protectedpure virtual

◆ rewrite()

virtual void souffle::ram::Node::rewrite ( const Node oldNode,
Own< Node newNode 
)
inlinevirtual

Rewrite a child node.

Definition at line 76 of file Node.h.

76  {
77  node->apply(makeLambdaRamMapper(rewriter));
78  return node;
79  }
80  };
81  apply(makeLambdaRamMapper(rewriter));
82  };
83 
84  /**
85  * @brief Obtain list of all embedded child nodes
86  */
87  virtual std::vector<const Node*> getChildNodes() const {
88  return {};

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Node node 
)
friend

Print RAM on a stream.

Definition at line 100 of file Node.h.

109  {

The documentation for this class was generated from the following file:
souffle::ram::Node::apply
virtual void apply(const NodeMapper &)
Apply the mapper to all child nodes.
Definition: Node.h:71
souffle::ram::Node::getChildNodes
virtual std::vector< const Node * > getChildNodes() const
Obtain list of all embedded child nodes.
Definition: Node.h:93
souffle::ram::makeLambdaRamMapper
LambdaNodeMapper< Lambda > makeLambdaRamMapper(const Lambda &lambda)
Creates a node mapper based on a corresponding lambda expression.
Definition: LambdaNodeMapper.h:67