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

Abstract class for a binary relation. More...

#include <BinRelationStatement.h>

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

Public Member Functions

 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::Statement
Statementclone () const override=0
 Create a clone (i.e. 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

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...
 
virtual void print (std::ostream &os, int tabpos) const =0
 Pretty print with indentation. More...
 

Protected Attributes

const std::string first
 First relation. More...
 
const std::string second
 Second relation. 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...
 

Detailed Description

Abstract class for a binary relation.

Comprises two Relations

Definition at line 41 of file BinRelationStatement.h.

Constructor & Destructor Documentation

◆ BinRelationStatement()

souffle::ram::BinRelationStatement::BinRelationStatement ( std::string  f,
std::string  s 
)
inline

Definition at line 43 of file BinRelationStatement.h.

Member Function Documentation

◆ equal()

bool souffle::ram::BinRelationStatement::equal ( const Node ) const
inlineoverrideprotectedvirtual

Equality check for two RAM nodes.

Default action is that nothing needs to be checked.

Reimplemented from souffle::ram::Node.

Definition at line 56 of file BinRelationStatement.h.

57  :
58  /** First relation */
59  const std::string first;

◆ getFirstRelation()

const std::string& souffle::ram::BinRelationStatement::getFirstRelation ( ) const
inline

Get first relation.

Definition at line 46 of file BinRelationStatement.h.

47  {
48  return second;

References second.

Referenced by souffle::ram::Swap::clone(), and souffle::interpreter::NodeGenerator::visitExtend().

◆ getSecondRelation()

const std::string& souffle::ram::BinRelationStatement::getSecondRelation ( ) const
inline

Get second relation.

Definition at line 51 of file BinRelationStatement.h.

51  :
52  bool equal(const Node& node) const override {
53  const auto& other = static_cast<const BinRelationStatement&>(node);

References first, and second.

Referenced by souffle::ram::Swap::clone(), souffle::ram::Extend::getSourceRelation(), and souffle::interpreter::NodeGenerator::visitExtend().

Field Documentation

◆ first

const std::string souffle::ram::BinRelationStatement::first
protected

First relation.

Definition at line 63 of file BinRelationStatement.h.

Referenced by getSecondRelation(), and souffle::ram::Extend::getTargetRelation().

◆ second

const std::string souffle::ram::BinRelationStatement::second
protected

Second relation.

Definition at line 66 of file BinRelationStatement.h.

Referenced by getFirstRelation(), getSecondRelation(), and souffle::ram::Extend::getTargetRelation().


The documentation for this class was generated from the following file:
souffle::ram::BinRelationStatement::first
const std::string first
First relation.
Definition: BinRelationStatement.h:63
souffle::ram::BinRelationStatement::BinRelationStatement
BinRelationStatement(std::string f, std::string s)
Definition: BinRelationStatement.h:43
souffle::ram::BinRelationStatement::equal
bool equal(const Node &node) const override
Equality check for two RAM nodes.
Definition: BinRelationStatement.h:56
souffle::ram::BinRelationStatement::second
const std::string second
Second relation.
Definition: BinRelationStatement.h:66