* @param dialect
   * @param stream
   */
  public static void printLogicalFormInDialect(Stella_Object self, Keyword dialect, OutputStream stream) {
    if (self == null) {
      return;
    }
    if (dialect == null) {
      dialect = ((Keyword)(Logic.$LOGIC_DIALECT$.get()));
    }
    if (dialect == Logic.KWD_KIF) {
      Logic.printAsKif(self, stream);
    }
    else if ((dialect == Logic.KWD_STELLA) ||
        (dialect == Logic.KWD_PREFIX_STELLA)) {
      Logic.printAsKif(self, stream);
    }
    else if (dialect == Logic.KWD_SQL) {
    }
    else {
      { FunctionCodeWrapper fn = ((FunctionCodeWrapper)(Logic.$LOGIC_DIALECT_PRINT_FUNCTIONS$.lookup(dialect)));

        if (fn != null) {
          edu.isi.stella.javalib.Native.funcall(fn.wrapperValue, null, new java.lang.Object [] {self, stream});
        }
        else {
          { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

            stream000.nativeStream.print("Unknown dialect for printing logic forms: `" + dialect + "'");
            throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
          }
        }
      }
    }
  }