public static void printKifProposition(Proposition self) {
    if (self == null) {
      return;
    }
    { boolean toplevelP = ((Boolean)(Logic.$TOPLEVELPRINTKIFPROPOSITIONp$.get())).booleanValue();
      OutputStream stream = ((OutputStream)(Logic.$PRINTLOGICALFORMSTREAM$.get()));
      boolean printexplicitnegationP = toplevelP &&
          ((Proposition.falseP(self) ||
          Proposition.defaultFalseP(self)) &&
           (!(self.operator == Logic.SGT_STELLA_FALSE)));

      { Object old$ToplevelprintkifpropositionP$000 = Logic.$TOPLEVELPRINTKIFPROPOSITIONp$.get();

        try {
          Native.setBooleanSpecial(Logic.$TOPLEVELPRINTKIFPROPOSITIONp$, false);
          if (printexplicitnegationP) {
            stream.nativeStream.print("(" + Logic.stringifiedSurrogate(Logic.SGT_PL_KERNEL_KB_NOT) + " ");
            Logic.increaseIndent(5);
          }
          if (((((Keyword)(Logic.$PRINTMODE$.get())) == Logic.KWD_REALISTIC) ||
              (((Keyword)(Logic.$PRINTMODE$.get())) == Logic.KWD_ORIGINAL)) &&
              (toplevelP &&
               Proposition.topLevelExistsPropositionP(self))) {
            Proposition.printKifTopLevelExistsProposition(self);
          }
          else {
            Proposition.helpPrintKifProposition(self);
          }
          if (printexplicitnegationP) {
            stream.nativeStream.print(")");
            Logic.decreaseIndent(5);
          }

        } finally {
          Logic.$TOPLEVELPRINTKIFPROPOSITIONp$.set(old$ToplevelprintkifpropositionP$000);
        }
      }
    }
  }