AbstractClauseVisitor
Base ClauseVisitor that implements the head/body and negated/non-negated dispatching itself, so subclasses only need to fold per-literal results together (via reduce) and, typically, override the leaf-level visitX methods inherited from ExhaustiveTermVisitor to inspect the literals' arguments.
visitClause walks a Clause's head (if any) and every body item — each normalised to a literal via it.unibo.tuprolog.datalog.asLiteral — dispatching negated body literals (see isNegated) to ClauseVisitor.visitNegatedLiteral with the literal inside the not(...)/\+(...) wrapper, and everything else to ClauseVisitor.visitNonNegatedLiteral/ClauseVisitor.visitHead; visitLiteral then recurses into each of that literal's arguments and folds the per-argument results with reduce. CompoundFinder and HeadVariablesOutsideNonNegatedLiterals are the two concrete visitors built on top of this class.
Inheritors
Functions
Visits any literal (head or body) of a Clause, regardless of whether it is negated.
Visits a body literal known to be negated, receiving the literal inside the not(...)/\+(...) wrapper (not the wrapper itself). Falls back to visitLiteral.
Visits a body literal known not to be negated. Falls back to visitLiteral.