HeadVariablesOutsideNonNegatedLiterals
A AbstractClauseVisitor that collects the Vars occurring in a clause's head which do not also occur in one of its non-negated body literals — i.e. the offending variables that would make it.unibo.tuprolog.datalog.allHeadVariablesInNonNegatedLiterals false. Variables inside negated body literals (ClauseVisitor's negated-literal visit path) are deliberately ignored when collecting "positive" variables, since a negated goal does not bind anything.
clause.accept(HeadVariablesOutsideNonNegatedLiterals) returns the empty set for a well-formed clause, and the set of unsafe head variables otherwise.
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.