public static void pprintProposition(Proposition self, org.powerloom.PrintableStringWriter stream) {
    if (((java.lang.reflect.Method)(OntosaurusUtil.$PPRINT_BEFORE_PROPOSITION_FUNCTION$.get())) != null) {
      edu.isi.stella.javalib.Native.funcall(((java.lang.reflect.Method)(OntosaurusUtil.$PPRINT_BEFORE_PROPOSITION_FUNCTION$.get())), null, new java.lang.Object [] {self, stream});
    }
    { Keyword testValue000 = self.kind;

      if ((testValue000 == OntosaurusUtil.KWD_PREDICATE) ||
          (testValue000 == OntosaurusUtil.KWD_ISA)) {
        OntosaurusUtil.pprintRelationProposition(self, stream);
      }
      else if (testValue000 == OntosaurusUtil.KWD_FUNCTION) {
        if (((Boolean)(Logic.$PRINTFUNCTIONSASRELATIONSp$.get())).booleanValue()) {
          OntosaurusUtil.pprintRelationProposition(self, stream);
        }
        else {
          OntosaurusUtil.pprintFunctionProposition(self, stream);
        }
      }
      else if (testValue000 == OntosaurusUtil.KWD_AND) {
        stream.print("(");
        OntosaurusUtil.pprintObject(self.operator, stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() + 5);
        stream.print(" ");
        OntosaurusUtil.pprintArguments(self.arguments, true, false, stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() - 5);
        stream.print(")");
      }
      else if (testValue000 == OntosaurusUtil.KWD_OR) {
        stream.print("(");
        OntosaurusUtil.pprintObject(self.operator, stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() + 4);
        stream.print(" ");
        OntosaurusUtil.pprintArguments(self.arguments, true, false, stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() - 4);
        stream.print(")");
      }
      else if (testValue000 == OntosaurusUtil.KWD_NOT) {
        stream.print("(");
        OntosaurusUtil.pprintObject(self.operator, stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() + 5);
        stream.print(" ");
        OntosaurusUtil.pprintObject((self.arguments.theArray)[0], stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() - 5);
        stream.print(")");
      }
      else if (testValue000 == OntosaurusUtil.KWD_EQUIVALENT) {
        stream.print("(=");
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() + 3);
        stream.print(" ");
        OntosaurusUtil.pprintArguments(self.arguments, false, false, stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() - 3);
        stream.print(")");
      }
      else if (testValue000 == OntosaurusUtil.KWD_FAIL) {
        stream.print("(");
        OntosaurusUtil.pprintObject(self.operator, stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() + 6);
        stream.print(" ");
        OntosaurusUtil.pprintProposition(((Proposition)((self.arguments.theArray)[0])), stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() - 6);
        stream.print(")");
      }
      else if (testValue000 == OntosaurusUtil.KWD_CONSTANT) {
        OntosaurusUtil.pprintObject(Proposition.generateOperator(self), stream);
      }
      else if (testValue000 == OntosaurusUtil.KWD_EXISTS) {
        stream.print("(");
        OntosaurusUtil.pprintObject(self.operator, stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() + 8);
        stream.print(" ");
        OntosaurusUtil.pprintQuantifiedVariables(((Vector)(KeyValueList.dynamicSlotValue(self.dynamicSlots, OntosaurusUtil.SYM_LOGIC_IO_VARIABLES, null))), false, stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() - 5);
        OntosaurusUtil.pprintNewline(stream);
        OntosaurusUtil.pprintProposition(((Proposition)((self.arguments.theArray)[0])), stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() - 3);
        stream.print(")");
      }
      else if (testValue000 == OntosaurusUtil.KWD_FORALL) {
        stream.print("(");
        OntosaurusUtil.pprintObject(self.operator, stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() + 8);
        stream.print(" ");
        OntosaurusUtil.pprintQuantifiedVariables(((Vector)(KeyValueList.dynamicSlotValue(self.dynamicSlots, OntosaurusUtil.SYM_LOGIC_IO_VARIABLES, null))), false, stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() - 5);
        OntosaurusUtil.pprintNewline(stream);
        stream.print("(=> ");
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() + 4);
        OntosaurusUtil.pprintProposition(((Proposition)((self.arguments.theArray)[0])), stream);
        OntosaurusUtil.pprintNewline(stream);
        OntosaurusUtil.pprintProposition(((Proposition)((self.arguments.theArray)[1])), stream);
        Native.setIntSpecial(OntosaurusUtil.$PPRINT_INDENT$, ((Integer)(OntosaurusUtil.$PPRINT_INDENT$.get())).intValue() - 7);
        stream.print(")");
      }
      else if (testValue000 == OntosaurusUtil.KWD_IMPLIES) {
        OntosaurusUtil.pprintImpliesProposition(self, stream);
      }
      else {
        { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

          stream000.nativeStream.print("`" + testValue000 + "' is not a valid case option");
          throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
        }
      }
    }
    if (((java.lang.reflect.Method)(OntosaurusUtil.$PPRINT_AFTER_PROPOSITION_FUNCTION$.get())) != null) {
      edu.isi.stella.javalib.Native.funcall(((java.lang.reflect.Method)(OntosaurusUtil.$PPRINT_AFTER_PROPOSITION_FUNCTION$.get())), null, new java.lang.Object [] {self, stream});
    }
  }