/**
  * Returns {@code true} if the specified {@link Term} represents a question or directive, else
  * {@code false}.
  *
  * <p>A {@link Term} is judged to represent a question if it is a structure a single argument and
  * with a functor {@link #QUESTION_PREDICATE_NAME} or {@link #IMPLICATION_PREDICATE_NAME}.
  */
 public static boolean isQuestionOrDirectiveFunctionCall(Term t) {
   return t.getType() == TermType.STRUCTURE
       && t.getNumberOfArguments() == 1
       && (QUESTION_PREDICATE_NAME.equals(t.getName())
           || IMPLICATION_PREDICATE_NAME.equals(t.getName()));
 }
 /**
  * Returns {@code true} if the specified {@link Term} represent a {@code dynamic} function call,
  * else {@code false}.
  *
  * <p>A {@link Term} is judged to represent a dynamic function call (i.e. a request to mark a user
  * defined predicate as "dynamic") if it is a structure with a functor of {@code dynamic} and a
  * single argument.
  */
 public static boolean isDynamicFunctionCall(Term t) {
   return "dynamic".equals(t.getName()) && t.getNumberOfArguments() == 1;
 }