public static Symbol kifVariableToStellaVariable(Stella_Object variable) {
    if (Surrogate.subtypeOfSymbolP(Stella_Object.safePrimaryType(variable))) {
      { Symbol variable000 = ((Symbol)(variable));

        if (!Logic.questionMarkSymbolP(variable000)) {
          { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

            { Object old$PrintreadablyP$000 = Stella.$PRINTREADABLYp$.get();

              try {
                Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                stream000.nativeStream.println("PARSING ERROR: Missing question mark on KIF variable: `" + variable000 + "'.");
                Logic.helpSignalPropositionError(stream000, Logic.KWD_ERROR);

              } finally {
                Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
              }
            }
            throw ((ParsingError)(ParsingError.newParsingError(stream000.theStringReader()).fillInStackTrace()));
          }
        }
        return (((Symbol)(Logic.kifSymbolToStellaSymbol(variable000))));
      }
    }
    else {
      { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

        { Object old$PrintreadablyP$001 = Stella.$PRINTREADABLYp$.get();

          try {
            Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
            stream001.nativeStream.println("PARSING ERROR: Illegal value in KIF expression where symbol expected `" + variable + "'.");
            Logic.helpSignalPropositionError(stream001, Logic.KWD_ERROR);

          } finally {
            Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$001);
          }
        }
        throw ((ParsingError)(ParsingError.newParsingError(stream001.theStringReader()).fillInStackTrace()));
      }
    }
  }