souffle  2.0.2-371-g6315b36
Public Member Functions | Protected Member Functions
souffle::ram::Extend Class Reference

Extend equivalence relation. More...

#include <Extend.h>

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

Public Member Functions

Extendclone () const override
 Create a clone (i.e. More...
 
 Extend (std::string tRef, const std::string &sRef)
 
const std::string & getSourceRelation () const
 Get source relation. More...
 
const std::string & getTargetRelation () const
 Get target relation. More...
 
- Public Member Functions inherited from souffle::ram::BinRelationStatement
 BinRelationStatement (std::string f, std::string s)
 
const std::string & getFirstRelation () const
 Get first relation. More...
 
const std::string & getSecondRelation () const
 Get second relation. More...
 
- Public Member Functions inherited from souffle::ram::Node
virtual void apply (const NodeMapper &)
 Apply the mapper to all child nodes. 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

void print (std::ostream &os, int tabpos) const override
 Pretty print with indentation. More...
 
- Protected Member Functions inherited from souffle::ram::BinRelationStatement
bool equal (const Node &node) const override
 Equality check for two RAM nodes. More...
 
- Protected Member Functions inherited from souffle::ram::Statement
void print (std::ostream &os) const override
 Print RAM node. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from souffle::ram::Statement
static void print (const Statement *statement, std::ostream &os, int tabpos)
 Pretty print jump-bed. More...
 
- Protected Attributes inherited from souffle::ram::BinRelationStatement
const std::string first
 First relation. More...
 
const std::string second
 Second relation. More...
 

Detailed Description

Extend equivalence relation.

The following example merges A into B:

EXTEND B WITH A

Definition at line 41 of file Extend.h.

Constructor & Destructor Documentation

◆ Extend()

souffle::ram::Extend::Extend ( std::string  tRef,
const std::string &  sRef 
)
inline

Definition at line 43 of file Extend.h.

Referenced by getTargetRelation().

Member Function Documentation

◆ clone()

Extend* souffle::ram::Extend::clone ( ) const
inlineoverridevirtual

Create a clone (i.e.

deep copy) of this node

Implements souffle::ram::Statement.

Definition at line 55 of file Extend.h.

56  :
57  void print(std::ostream& os, int tabpos) const override {
58  os << times(" ", tabpos);

References getSourceRelation(), getTargetRelation(), and souffle::times().

Here is the call graph for this function:

◆ getSourceRelation()

const std::string& souffle::ram::Extend::getSourceRelation ( ) const
inline

Get source relation.

Definition at line 46 of file Extend.h.

47  {
48  return getSecondRelation();

References souffle::ram::BinRelationStatement::getSecondRelation().

Referenced by clone().

Here is the call graph for this function:

◆ getTargetRelation()

const std::string& souffle::ram::Extend::getTargetRelation ( ) const
inline

Get target relation.

Definition at line 51 of file Extend.h.

51  {
52  auto* res = new Extend(second, first);
53  return res;

References Extend(), souffle::ram::BinRelationStatement::first, and souffle::ram::BinRelationStatement::second.

Referenced by clone().

Here is the call graph for this function:

◆ print()

void souffle::ram::Extend::print ( std::ostream &  os,
int  tabpos 
) const
inlineoverrideprotectedvirtual

Pretty print with indentation.

Implements souffle::ram::Statement.

Definition at line 61 of file Extend.h.


The documentation for this class was generated from the following file:
souffle::times
detail::multiplying_printer< T > times(const T &value, unsigned num)
A utility printing a given value multiple times.
Definition: StreamUtil.h:322
souffle::ram::BinRelationStatement::first
const std::string first
First relation.
Definition: BinRelationStatement.h:63
souffle::ram::BinRelationStatement::getSecondRelation
const std::string & getSecondRelation() const
Get second relation.
Definition: BinRelationStatement.h:51
souffle::ram::Extend::Extend
Extend(std::string tRef, const std::string &sRef)
Definition: Extend.h:43
souffle::ram::Extend::print
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
Definition: Extend.h:61
souffle::ram::BinRelationStatement::second
const std::string second
Second relation.
Definition: BinRelationStatement.h:66