* @param original
   * @return Stella_Object
   */
  public static Stella_Object coerceToInstanceOrLiteral(Stella_Object self, Stella_Object original) {
    if (original == null) {
      if (self != null) {
        original = self;
      }
      else {
        return (null);
      }
    }
    if (self == null) {
      if (Stella_Object.wrapperP(original)) {
        return (original);
      }
      else {
        System.out.println("Can't find a logic object `" + original + "'.");
        return (null);
      }
    }
    { Surrogate testValue000 = Stella_Object.safePrimaryType(self);

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

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

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

          return (Logic.coerceToInstanceOrLiteral(self000.surrogateValue, original));
        }
      }
      else if (Surrogate.subtypeOfSymbolP(testValue000)) {
        { Symbol self000 = ((Symbol)(self));

          return (Logic.coerceToInstanceOrLiteral(Symbol.symbolToSurrogate(self000), original));
        }
      }
      else if (Surrogate.subtypeOfKeywordP(testValue000)) {
        { Keyword self000 = ((Keyword)(self));

          return (Logic.coerceToInstanceOrLiteral(Surrogate.lookupSurrogate(self000.symbolName), original));
        }
      }
      else if (Surrogate.subtypeOfStringP(testValue000)) {
        { StringWrapper self000 = ((StringWrapper)(self));

          return (Logic.coerceToInstanceOrLiteral(Surrogate.lookupSurrogate(self000.wrapperValue), original));
        }
      }
      else {
        return (Logic.coerceToInstanceOrLiteral(null, original));
      }
    }
  }