* @return Surrogate
   */
  public static Surrogate objectSurrogate(Stella_Object self) {
    { Surrogate testValue000 = Stella_Object.safePrimaryType(self);

      if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_LOGIC_OBJECT)) {
        { LogicObject self000 = ((LogicObject)(self));

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

          return (((Surrogate)(KeyValueList.dynamicSlotValue(self000.dynamicSlots, Logic.SYM_STELLA_SURROGATE_VALUE_INVERSE, null))));
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_STELLA_THING)) {
        { Thing self000 = ((Thing)(self));

          return (self000.surrogateValueInverse);
        }
      }
      else if (Surrogate.subtypeOfClassP(testValue000)) {
        { Stella_Class self000 = ((Stella_Class)(self));

          return (self000.classType);
        }
      }
      else {
        return (null);
      }
    }
  }