souffle
2.0.2-371-g6315b36
|
Evaluates a binary constraint with respect to two Expressions. More...
#include <Constraint.h>
Public Member Functions | |
void | apply (const NodeMapper &map) override |
Apply the mapper to all child nodes. More... | |
Constraint * | clone () const override |
Create a clone (i.e. More... | |
Constraint (BinaryConstraintOp op, Own< Expression > l, Own< Expression > r) | |
std::vector< const Node * > | getChildNodes () const override |
Obtain list of all embedded child nodes. More... | |
const Expression & | getLHS () const |
Get left-hand side. More... | |
BinaryConstraintOp | getOperator () const |
Get operator symbol. More... | |
const Expression & | getRHS () const |
Get right-hand side. 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< Expression > | lhs |
Left-hand side of constraint. More... | |
const BinaryConstraintOp | op |
Operator. More... | |
Own< Expression > | rhs |
Right-hand side of constraint. More... | |
Evaluates a binary constraint with respect to two Expressions.
Condition is true if the constraint (a logical operator such as "<") holds between the two operands
The following example checks the equality of the two given tuple elements:
Definition at line 55 of file Constraint.h.
|
inline |
|
inlineoverridevirtual |
Apply the mapper to all child nodes.
Reimplemented from souffle::ram::Node.
Definition at line 86 of file Constraint.h.
|
inlineoverridevirtual |
Create a clone (i.e.
deep copy) of this node
Implements souffle::ram::Condition.
Definition at line 82 of file Constraint.h.
|
inlineoverrideprotectedvirtual |
Equality check for two RAM nodes.
Default action is that nothing needs to be checked.
Reimplemented from souffle::ram::Node.
Definition at line 98 of file Constraint.h.
|
inlineoverridevirtual |
Obtain list of all embedded child nodes.
Reimplemented from souffle::ram::Node.
Definition at line 78 of file Constraint.h.
References lhs, souffle::map(), and rhs.
|
inline |
|
inline |
Get operator symbol.
Definition at line 74 of file Constraint.h.
References souffle::clone(), Constraint(), lhs, op, and rhs.
|
inline |
|
inlineoverrideprotectedvirtual |
|
protected |
Left-hand side of constraint.
Definition at line 107 of file Constraint.h.
Referenced by Constraint(), getChildNodes(), and getOperator().
|
protected |
|
protected |
Right-hand side of constraint.
Definition at line 110 of file Constraint.h.
Referenced by getChildNodes(), and getOperator().