souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
36 VecOwn<ram::Expression> values;
40 if (
auto atom =
dynamic_cast<ast::Atom*
>(lit)) {
46 for (
size_t i = 0;
i < neg->getAtom()->getArguments().
size() - auxiliaryArity; ++
i) {
47 auto arg = neg->getAtom()->getArguments()[
i];
50 for (
size_t i = 0;
i < auxiliaryArity; ++
i) {
51 values.push_back(mk<ram::SignedConstant>(-1));
53 }
else if (
auto neg =
dynamic_cast<ast::Negation*
>(lit)) {
54 for (ast::Argument* arg : neg->getAtom()->getArguments()) {
57 }
else if (
auto con =
dynamic_cast<ast::BinaryConstraint*
>(lit)) {
63 return mk<ram::SubroutineReturn>(std::move(values));
constexpr auto size(const C &c) -> decltype(c.size())
AstToRamTranslator & translator
Own< ram::Condition > createCondition(const ast::Clause &originalClause) override
An abstract class for arguments.
size_t getEvaluationArity(const ast::Atom *atom) const
determine the auxiliary for relations
Own< ram::Operation > createOperation(const ast::Clause &clause) override
Subclass of Literal that represents a negated atom, * e.g., !parent(x,y).
Defines an abstract class for literals in a horn clause.
Own< ram::Expression > translateValue(const ast::Argument *arg, const ValueIndex &index)
translate an AST argument to a RAM value
Own< ValueIndex > valueIndex