public static Stella_Object evaluateSymbolTerm(Symbol self) {
    { Stella_Object value = Logic.lookupLogicVariableBinding(self);

      if (value != null) {
        return (value);
      }
      else if (self == Logic.ANONYMOUS_VARIABLE_NAME) {
        return (Logic.createVariable(null, Logic.ANONYMOUS_VARIABLE_NAME, false));
      }
      else if (Logic.questionMarkSymbolP(self)) {
        { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

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

            try {
              Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
              stream000.nativeStream.println("ERROR: Reference to undeclared variable: `" + self + "'.");
              Logic.helpSignalPropositionError(stream000, Logic.KWD_ERROR);

            } finally {
              Stella.$PRINTREADABLYp$.set(old$PrintreadablyP$000);
            }
          }
          throw ((PropositionError)(PropositionError.newPropositionError(stream000.theStringReader()).fillInStackTrace()));
        }
      }
      else if (Logic.automaticInstanceSymbolP(self)) {
        return (Logic.evaluateAutomaticInstance(self));
      }
      else {
        value = Symbol.symbolToSurrogate(self).surrogateValue;
        if (value != null) {
          return (value);
        }
        else {
          { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

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

              try {
                Native.setBooleanSpecial(Stella.$PRINTREADABLYp$, true);
                stream001.nativeStream.println("ERROR: Reference to undeclared symbol: `" + self + "'.");
                Logic.helpSignalPropositionError(stream001, Logic.KWD_ERROR);

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