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

A conjunction of conditions. More...

#include <Conjunction.h>

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

Public Member Functions

void apply (const NodeMapper &map) override
 Apply the mapper to all child nodes. More...
 
Conjunctionclone () const override
 Create a clone (i.e. More...
 
 Conjunction (Own< Condition > l, Own< Condition > r)
 
std::vector< const Node * > getChildNodes () const override
 Obtain list of all embedded child nodes. More...
 
const ConditiongetLHS () const
 Get left-hand side of conjunction. More...
 
const ConditiongetRHS () const
 Get right-hand side of conjunction. More...
 
- Public Member Functions inherited from souffle::ram::Node
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...
 
void print (std::ostream &os) const override
 Print RAM node. More...
 

Protected Attributes

Own< Conditionlhs
 Left-hand side of conjunction. More...
 
Own< Conditionrhs
 Right-hand side of conjunction. More...
 

Detailed Description

A conjunction of conditions.

Condition of the form "LHS and RHS", where LHS and RHS are conditions

For example:

C1 AND C2 AND C3

Is a Conjunction, which may have LHS "C1" and RHS "C2 AND C3"

Definition at line 54 of file Conjunction.h.

Constructor & Destructor Documentation

◆ Conjunction()

souffle::ram::Conjunction::Conjunction ( Own< Condition l,
Own< Condition r 
)
inline

Definition at line 56 of file Conjunction.h.

60  {

Referenced by getRHS().

Member Function Documentation

◆ apply()

void souffle::ram::Conjunction::apply ( const NodeMapper )
inlineoverridevirtual

Apply the mapper to all child nodes.

Reimplemented from souffle::ram::Node.

Definition at line 79 of file Conjunction.h.

82  {

◆ clone()

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

Create a clone (i.e.

deep copy) of this node

Implements souffle::ram::Condition.

Definition at line 75 of file Conjunction.h.

77  :
78  void print(std::ostream& os) const override {

◆ equal()

bool souffle::ram::Conjunction::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 89 of file Conjunction.h.

◆ getChildNodes()

std::vector<const Node*> souffle::ram::Conjunction::getChildNodes ( ) const
inlineoverridevirtual

Obtain list of all embedded child nodes.

Reimplemented from souffle::ram::Node.

Definition at line 71 of file Conjunction.h.

72  {
73  lhs = map(std::move(lhs));

References lhs, souffle::map(), and rhs.

Here is the call graph for this function:

◆ getLHS()

const Condition& souffle::ram::Conjunction::getLHS ( ) const
inline

Get left-hand side of conjunction.

Definition at line 62 of file Conjunction.h.

64  {

Referenced by souffle::ram::analysis::ComplexityAnalysis::getComplexity().

◆ getRHS()

const Condition& souffle::ram::Conjunction::getRHS ( ) const
inline

Get right-hand side of conjunction.

Definition at line 67 of file Conjunction.h.

68  {

References souffle::clone(), Conjunction(), lhs, and rhs.

Referenced by souffle::ram::analysis::ComplexityAnalysis::getComplexity().

Here is the call graph for this function:

◆ print()

void souffle::ram::Conjunction::print ( std::ostream &  out) const
inlineoverrideprotectedvirtual

Print RAM node.

Implements souffle::ram::Node.

Definition at line 85 of file Conjunction.h.

Field Documentation

◆ lhs

Own<Condition> souffle::ram::Conjunction::lhs
protected

Left-hand side of conjunction.

Definition at line 95 of file Conjunction.h.

Referenced by getChildNodes(), and getRHS().

◆ rhs

Own<Condition> souffle::ram::Conjunction::rhs
protected

Right-hand side of conjunction.

Definition at line 98 of file Conjunction.h.

Referenced by getChildNodes(), and getRHS().


The documentation for this class was generated from the following file:
souffle::map
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
Definition: ContainerUtil.h:158
souffle::clone
auto clone(const std::vector< A * > &xs)
Definition: ContainerUtil.h:172
souffle::ram::Conjunction::Conjunction
Conjunction(Own< Condition > l, Own< Condition > r)
Definition: Conjunction.h:56
souffle::ram::Conjunction::print
void print(std::ostream &os) const override
Print RAM node.
Definition: Conjunction.h:85
souffle::ram::Conjunction::lhs
Own< Condition > lhs
Left-hand side of conjunction.
Definition: Conjunction.h:95
souffle::ram::Conjunction::rhs
Own< Condition > rhs
Right-hand side of conjunction.
Definition: Conjunction.h:98