public static void printOneVariableSubstitution(OutputStream stream, Stella_Object var, Stella_Object value) {
    if (((Keyword)(Logic.$EXPLANATION_FORMAT$.get())) == Logic.KWD_ASCII) {
      Logic.prettyPrintLogicalForm(var, stream);
      if (Stella_Object.eqlP(Logic.valueOf(var), var)) {
        stream.nativeStream.print("/");
        if ((value != null) &&
            Stella_Object.isaP(value, Logic.SGT_LOGIC_ALTERNATIVE_BINDINGS_SET)) {
          stream.nativeStream.print("{");
          { Stella_Object binding = null;
            ListIterator iter000 = ((ListIterator)(((AlternativeBindingsSet)(value)).bindings.allocateIterator()));

            while (iter000.nextP()) {
              binding = iter000.value;
              Logic.prettyPrintLogicalForm(binding, stream);
              stream.nativeStream.print(", ");
            }
          }
          stream.nativeStream.print("...}");
        }
        else {
          Logic.prettyPrintLogicalForm(value, stream);
        }
      }
    }
    else if (((Keyword)(Logic.$EXPLANATION_FORMAT$.get())) == Logic.KWD_HTML) {
      { OutputStringStream stringStream = OutputStringStream.newOutputStringStream();
        boolean quotehtmlP = true;

        if (Logic.$CYC_KLUDGES_ENABLEDp$) {
          if (((Keyword)(Logic.$LOGIC_DIALECT$.get())) == Logic.KWD_CYC_NL) {
            quotehtmlP = false;
          }
        }
        if ((((Keyword)(Logic.$LOGIC_DIALECT$.get())) == Logic.KWD_KIF_ONTOSAURUS) ||
            (((Keyword)(Logic.$LOGIC_DIALECT$.get())) == Logic.KWD_JAVA_GUI_HTML)) {
          quotehtmlP = false;
        }
        Logic.prettyPrintLogicalForm(var, stringStream);
        if (Stella_Object.eqlP(Logic.valueOf(var), var)) {
          stringStream.nativeStream.print("/");
          if ((value != null) &&
              Stella_Object.isaP(value, Logic.SGT_LOGIC_ALTERNATIVE_BINDINGS_SET)) {
            stringStream.nativeStream.print("{one of ");
            { Stella_Object binding = null;
              ListIterator iter001 = ((ListIterator)(((AlternativeBindingsSet)(value)).bindings.allocateIterator()));

              while (iter001.nextP()) {
                binding = iter001.value;
                Logic.prettyPrintLogicalForm(binding, stringStream);
                stringStream.nativeStream.print(", ");
              }
            }
            stringStream.nativeStream.print("etc.}");
          }
          else {
            Logic.prettyPrintLogicalForm(value, stringStream);
          }
        }
        if (quotehtmlP) {
          Stella.writeHtmlQuotingSpecialCharacters(stream.nativeStream, stringStream.theStringReader());
        }
        else {
          stream.nativeStream.print(stringStream.theStringReader());
        }
      }
    }
    else if (((Keyword)(Logic.$EXPLANATION_FORMAT$.get())) == Logic.KWD_XML) {
      { OutputStringStream stringStream = OutputStringStream.newOutputStringStream();

        {
          stream.nativeStream.print("<binding>");
          Logic.prettyPrintLogicalForm(var, stringStream);
          {
            stream.nativeStream.print("<variable>");
            Stella.writeHtmlQuotingSpecialCharacters(stream.nativeStream, stringStream.theStringReader());
            stream.nativeStream.println("</variable>");
          }
          if (Stella_Object.eqlP(Logic.valueOf(var), var)) {
            stringStream = OutputStringStream.newOutputStringStream();
            Logic.prettyPrintLogicalForm(value, stringStream);
            {
              stream.nativeStream.print("<value>");
              Stella.writeHtmlQuotingSpecialCharacters(stream.nativeStream, stringStream.theStringReader());
              stream.nativeStream.print("</value>");
            }
          }
          stream.nativeStream.println("</binding>");
        }
      }
    }
    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()));
      }
    }
  }