CompoundFinder
A AbstractClauseVisitor that detects whether a clause contains any compound term (a Struct with Struct.arity > 0) as an argument, anywhere in its head or body literals — the check backing it.unibo.tuprolog.datalog.hasNoCompound. Any non-Struct argument (a number, a variable, ...) is ignored (defaultValue).
clause.accept(CompoundFinder) is true as soon as any argument, at any nesting depth, is itself a Struct with one or more arguments — e.g. p(f(X)) is flagged because of f(X), while p(a, X) is not.
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.