public static void printProposition(Proposition self, OutputStream stream, boolean toplevelP) {
    { String prefix = null;

      if (self.deletedP()) {
        stream.nativeStream.print("|dElEtEd-proposition|");
        return;
      }
      if (toplevelP &&
          (!((Boolean)(Stella.$PRINTREADABLYp$.get())).booleanValue())) {
        if (Proposition.defaultTrueP(self) ||
            Proposition.defaultFalseP(self)) {
          prefix = (((BooleanWrapper)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_DESCRIPTIVEp, Stella.FALSE_WRAPPER))).wrapperValue ? "|pd|" : "|p|");
        }
        else if (((!self.deletedP()) &&
            ((((Boolean)(Logic.$REVERSEPOLARITYp$.get())).booleanValue() ? Proposition.falseP(self) : (Proposition.trueP(self) ||
            Proposition.functionWithDefinedValueP(self))))) ||
            Proposition.falseP(self)) {
          prefix = (((BooleanWrapper)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_DESCRIPTIVEp, Stella.FALSE_WRAPPER))).wrapperValue ? "|Pd|" : "|P|");
        }
        else if (Proposition.inconsistentP(self)) {
          prefix = (((BooleanWrapper)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_DESCRIPTIVEp, Stella.FALSE_WRAPPER))).wrapperValue ? "|Pd#|" : "|P#|");
        }
        else {
          prefix = (((BooleanWrapper)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_DESCRIPTIVEp, Stella.FALSE_WRAPPER))).wrapperValue ? "|Pd?|" : "|P?|");
        }
      }
      if (BooleanWrapper.coerceWrappedBooleanToBoolean(self.unfastenedP())) {
        prefix = (((BooleanWrapper)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_DESCRIPTIVEp, Stella.FALSE_WRAPPER))).wrapperValue ? "|uPd|" : "|uP|");
      }
      if ((((Surrogate)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_STELLA_SURROGATE_VALUE_INVERSE, null))) != null) &&
          (!(((Surrogate)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_STELLA_SURROGATE_VALUE_INVERSE, null))).surrogateValue == self))) {
        prefix = "|BAD surrogate|";
      }
      if (prefix != null) {
        stream.nativeStream.print(prefix);
      }
    }
    Logic.printLogicalForm(self, stream);
  }