| souffle
    2.0.2-371-g6315b36
    | 
 
 
 
Go to the documentation of this file.
   48 class Constraint : 
public Condition {
 
   52         assert(
lhs != 
nullptr && 
"left-hand side of constraint is a null-pointer");
 
   53         assert(
rhs != 
nullptr && 
"right-hand side of constraint is a null-pointer");
 
   72         return {
lhs.get(), 
rhs.get()};
 
   85     void print(std::ostream& os)
 const override {
 
   86         os << 
"(" << *
lhs << 
" ";
 
   88         os << 
" " << *
rhs << 
")";
 
   91     bool equal(
const Node& node)
 const override {
 
   92         const auto& other = 
static_cast<const Constraint&
>(node);
 
  
void print(std::ostream &os) const override
Print RAM node.
bool equal(const Node &node) const override
Equality check for two RAM nodes.
const Expression & getRHS() const
Get right-hand side.
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
char const  * toBinaryConstraintSymbol(const BinaryConstraintOp op)
Converts operator to its symbolic representation.
const Expression & getLHS() const
Get left-hand side.
Node is a superclass for all RAM IR classes.
auto clone(const std::vector< A * > &xs)
An abstract class for manipulating RAM Nodes by substitution.
bool equal_ptr(const T *a, const T *b)
Compares two values referenced by a pointer where the case where both pointers are null is also consi...
const BinaryConstraintOp op
Operator.
BinaryConstraintOp
Binary Constraint Operators.
BinaryConstraintOp getOperator() const
Get operator symbol.
Own< Expression > rhs
Right-hand side of constraint.
void apply(const NodeMapper &map) override
Apply the mapper to all child nodes.
Evaluates a binary constraint with respect to two Expressions.
Own< Expression > lhs
Left-hand side of constraint.
Constraint * clone() const override
Create a clone (i.e.
std::vector< const Node * > getChildNodes() const override
Obtain list of all embedded child nodes.
Constraint(BinaryConstraintOp op, Own< Expression > l, Own< Expression > r)
Abstract class for describing scalar values in RAM.