public static void printExplanationHeader(Justification self, OutputStream stream, KeyValueList mapping) {
    { ExplanationInfo info = Justification.explanationInfo(self, mapping);
      String label = info.label;
      int indent = label.length() + 1;

      if ((((Keyword)(Logic.$EXPLANATION_FORMAT$.get())) == Logic.KWD_XML) ||
          (((Keyword)(Logic.$EXPLANATION_FORMAT$.get())) == Logic.KWD_ASCII)) {
        Logic.printExplanationLabel(stream, label, true);
      }
      else if (((Keyword)(Logic.$EXPLANATION_FORMAT$.get())) == Logic.KWD_HTML) {
        {
          stream.nativeStream.print("<TD align=left valign=top>");
          Logic.printExplanationLabel(stream, label, true);
          stream.nativeStream.println("</TD>");
        }
      }
      else {
        { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

          stream000.nativeStream.print("`" + ((Keyword)(Logic.$EXPLANATION_FORMAT$.get())) + "' is not a valid case option");
          throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
        }
      }
      if (label.length() > Logic.$MAX_INLINE_LABEL_LENGTH$) {
        {
          stream.nativeStream.println();
          stream.nativeStream.print(Logic.$EXPLANATION_TAB_STRING$);
        }
;
        indent = Logic.$EXPLANATION_TAB_STRING$.length();
      }
      else {
        stream.nativeStream.print(" ");
      }
      if ((((Keyword)(Logic.$EXPLANATION_FORMAT$.get())) == Logic.KWD_XML) ||
          (((Keyword)(Logic.$EXPLANATION_FORMAT$.get())) == Logic.KWD_ASCII)) {
      }
      else if (((Keyword)(Logic.$EXPLANATION_FORMAT$.get())) == Logic.KWD_HTML) {
        stream.nativeStream.print("<TD align=left valign=top>");
      }
      else {
        { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

          stream001.nativeStream.print("`" + ((Keyword)(Logic.$EXPLANATION_FORMAT$.get())) + "' is not a valid case option");
          throw ((StellaException)(StellaException.newStellaException(stream001.theStringReader()).fillInStackTrace()));
        }
      }
      Justification.printJustificationPropositionForFormat(self, stream, indent);
      stream.nativeStream.println();
      info.explainedP = true;
    }
  }