public static void printWhynotJustification(Justification justification, OutputStream stream, int maxdepth, Keyword style, boolean summaryP) {
    { Object old$ExplanationStyle$000 = Logic.$EXPLANATION_STYLE$.get();

      try {
        Native.setSpecial(Logic.$EXPLANATION_STYLE$, ((style != null) ? style : Logic.KWD_BRIEF));
        if (justification == null) {
          if (Logic.$MOST_RECENT_QUERY$ != null) {
            Logic.prettyPrintLogicalForm(Logic.$MOST_RECENT_QUERY$.currentPatternRecord.description.proposition, stream);
            {
              stream.nativeStream.println();
              stream.nativeStream.println("  " + Logic.lookupExplanationPhrase(Logic.KWD_NOT_ASSERTED, Stella.NIL, null) + " and ");
              stream.nativeStream.println("  " + Logic.lookupExplanationPhrase(Logic.KWD_NO_RULES, Stella.NIL, null) + ".");
            }
;
          }
        }
        else if (summaryP) {
          { List failures = List.newList();

            Justification.collectFailedGoals(justification, failures);
            stream.nativeStream.println("The query failed, because");
            { Justification failure = null;
              Cons iter000 = failures.theConsList;
              int i = Stella.NULL_INTEGER;
              int iter001 = 1;

              for (;!(iter000 == Stella.NIL); iter000 = iter000.rest, iter001 = iter001 + 1) {
                failure = ((Justification)(iter000.value));
                i = iter001;
                if (i == 1) {
                  stream.nativeStream.print("    ");
                }
                else {
                  stream.nativeStream.print("and ");
                }
                Justification.printJustificationProposition(failure, stream, 4);
                stream.nativeStream.println();
              }
            }
            {
              stream.nativeStream.println("failed.");
              stream.nativeStream.println();
            }
;
          }
        }
        else {
          Justification.printExplanation(justification, stream, ((KeyValueList)(Logic.$MOST_RECENT_EXPLANATION_MAPPING$.get())), maxdepth, ((Keyword)(Logic.$EXPLANATION_AUDIENCE$.get())));
        }

      } finally {
        Logic.$EXPLANATION_STYLE$.set(old$ExplanationStyle$000);
      }
    }
  }