public static String stringifiedSurrogate(Surrogate operator) {
    { NamedDescription description = Logic.getDescription(operator);
      String string = null;
      boolean visibleP = operator == Surrogate.lookupSurrogateInModule(operator.symbolName, ((Module)(Stella.$MODULE$.get())), false);

      if (description != null) {
        string = Logic.internalStellaOperatorToKif(Surrogate.surrogateToSymbol(operator)).symbolName;
      }
      else {
        string = operator.symbolName;
      }
      if ((((Boolean)(Stella.$PRINTREADABLYp$.get())).booleanValue() ||
          (!visibleP)) &&
          ((description == null) ||
           (!(string.charAt(0) == '(')))) {
        { Keyword testValue000 = Stella.computeSymbolEscapeCode(string, ((Module)(Stella.$MODULE$.get())).caseSensitiveP);

          if (testValue000 == Logic.KWD_UNESCAPED) {
            if (visibleP) {
              string = Logic.maybeDowncase(string);
            }
          }
          else if (testValue000 == Logic.KWD_ESCAPED) {
            string = "|" + string + "|";
          }
          else if (testValue000 == Logic.KWD_COMPLEX_ESCAPED) {
            string = Stella.replaceSubstrings(string, "\\\\", "\\");
            string = Stella.replaceSubstrings(string, "\\|", "|");
            string = "|" + string + "|";
          }
          else {
            { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

              stream000.nativeStream.print("`" + testValue000 + "' is not a valid case option");
              throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
            }
          }
        }
      }
      if (visibleP) {
        return (string);
      }
      else {
        return (Stella.computeFullName(string, ((Module)(operator.homeContext))));
      }
    }
  }