souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
47 class BinaryConstraint :
public Constraint {
50 : Constraint(std::move(loc)),
operation(
o),
lhs(std::move(ls)),
rhs(std::move(rs)) {}
98 void print(std::ostream& os)
const override {
106 bool equal(
const Node& node)
const override {
107 assert(isA<BinaryConstraint>(&node));
std::optional< BinaryConstraintOp > getFinalType() const
Argument * getLHS() const
Return left-hand side argument.
Argument * getRHS() const
Return right-hand side argument.
An abstract class for manipulating AST Nodes by substitution.
Own< Argument > lhs
Left-hand side argument of binary constraint.
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
An abstract class for arguments.
auto clone(const std::vector< A * > &xs)
void apply(const NodeMapper &map) override
void setFinalType(BinaryConstraintOp newType)
BinaryConstraintOp getBaseOperator() const
Return binary operator.
bool equal(const Node &node) const override
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...
BinaryConstraintOp
Binary Constraint Operators.
std::vector< const Node * > getChildNodes() const override
void setBaseOperator(BinaryConstraintOp op)
Set binary operator.
Own< Argument > rhs
Right-hand side argument of binary constraint.
void print(std::ostream &os) const override
Adds print support for constraints (debugging)
auto copy(span< A, arity > s)
Abstract class for syntactic elements in an input program.
BinaryConstraint(BinaryConstraintOp o, Own< Argument > ls, Own< Argument > rs, SrcLocation loc={})
std::optional< BinaryConstraintOp > finalTranslatorType
BinaryConstraint * clone() const override
BinaryConstraintOp operation
Constraint (base) operator.
bool isInfixFunctorOp(std::string_view symbol)
Determines whether a functor should be written using infix notation (e.g.