public static Stella_Object evaluateTerm(Stella_Object self) {
    { Surrogate testValue000 = Stella_Object.safePrimaryType(self);

      if (Surrogate.subtypeOfP(testValue000, Logic.SGT_STELLA_LITERAL_WRAPPER)) {
        { LiteralWrapper self000 = ((LiteralWrapper)(self));

          return (Logic.evaluateLiteralWrapperTerm(self000));
        }
      }
      else if (Surrogate.subtypeOfSurrogateP(testValue000)) {
        { Surrogate self000 = ((Surrogate)(self));

          return (Logic.evaluateSurrogateTerm(self000));
        }
      }
      else if (Surrogate.subtypeOfSymbolP(testValue000)) {
        { Symbol self000 = ((Symbol)(self));

          return (Logic.evaluateSymbolTerm(self000));
        }
      }
      else if (testValue000 == Logic.SGT_STELLA_CONS) {
        { Cons self000 = ((Cons)(self));

          { GeneralizedSymbol testValue001 = ((GeneralizedSymbol)(self000.value));

            if ((testValue001 == Logic.SYM_LOGIC_SETOFALL) ||
                ((testValue001 == Logic.SYM_LOGIC_THE_ONLY) ||
                 (testValue001 == Logic.SYM_LOGIC_KAPPA))) {
              return (LogicObject.evaluateLogicObjectTerm(Logic.evaluateDescriptionTerm(self000, true)));
            }
            else if (testValue001 == Logic.SYM_LOGIC_CREATE) {
              return (Logic.evaluateCreateTerm(self000));
            }
            else {
              return (Logic.evaluateFunctionTerm(self000));
            }
          }
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_LOGIC_OBJECT)) {
        { LogicObject self000 = ((LogicObject)(self));

          return (LogicObject.evaluateLogicObjectTerm(self000));
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_PROPOSITION)) {
        { Proposition self000 = ((Proposition)(self));

          return (self000);
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_STELLA_THING)) {
        { Thing self000 = ((Thing)(self));

          return (self000);
        }
      }
      else if (Surrogate.subtypeOfKeywordP(testValue000)) {
        { Keyword self000 = ((Keyword)(self));

          return (self000);
        }
      }
      else {
        { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

          stream000.nativeStream.print("Can't evaluate the term `" + self + "'");
          throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
        }
      }
    }
  }