souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
44 class Negation :
public Literal {
46 Negation(Own<Atom>
atom, SrcLocation loc = {}) : Literal(std::move(loc)),
atom(std::move(
atom)) {}
66 void print(std::ostream& os)
const override {
70 bool equal(
const Node& node)
const override {
71 assert(isA<Negation>(&node));
72 const auto& other =
static_cast<const Negation&
>(node);
std::vector< const Node * > getChildNodes() const override
Obtain a list of all embedded AST child nodes.
An abstract class for manipulating AST Nodes by substitution.
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
void print(std::ostream &os) const override
Output to a given output stream.
void apply(const NodeMapper &map) override
Apply the mapper to all child nodes.
Own< Atom > atom
Negated atom.
auto clone(const std::vector< A * > &xs)
Negation of an atom negated atom.
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...
Negation * clone() const override
Create a clone (i.e.
Abstract class for syntactic elements in an input program.
Negation(Own< Atom > atom, SrcLocation loc={})
Atom * getAtom() const
Get negated atom.
const SrcLocation & getSrcLoc() const
Return source location of the Node.
bool equal(const Node &node) const override
Abstract equality check for two AST nodes.