public static PLObjectUnion makePlObjectUnion(Stella_Object renamed_Object) {
    { PLObjectUnion result = PLObjectUnion.new_PLObjectUnion();

      result.LiteralValue = "";
      result.Type = "";
      if (renamed_Object == null) {
        result.LiteralValue = "";
        result.Type = "STRING";
        return (result);
      }
      if (Logic.skolemP(renamed_Object) &&
          (((Stella_Object)(Stella_Object.accessInContext(((Skolem)(renamed_Object)).variableValue, ((Skolem)(renamed_Object)).homeContext, false))) != null)) {
        renamed_Object = ((Stella_Object)(Stella_Object.accessInContext(((Skolem)(renamed_Object)).variableValue, ((Skolem)(renamed_Object)).homeContext, false)));
      }
      { Surrogate testValue000 = Stella_Object.safePrimaryType(renamed_Object);

        if (Surrogate.subtypeOfIntegerP(testValue000)) {
          { IntegerWrapper object000 = ((IntegerWrapper)(renamed_Object));

            result.LiteralValue = Native.stringify(IntegerWrapper.wrapInteger(object000.wrapperValue));
            result.Type = "INTEGER";
          }
        }
        else if (Surrogate.subtypeOfFloatP(testValue000)) {
          { FloatWrapper object000 = ((FloatWrapper)(renamed_Object));

            result.LiteralValue = Native.stringify(FloatWrapper.wrapFloat(object000.wrapperValue));
            result.Type = "FLOAT";
          }
        }
        else if (Surrogate.subtypeOfStringP(testValue000)) {
          { StringWrapper object000 = ((StringWrapper)(renamed_Object));

            result.LiteralValue = object000.wrapperValue;
            result.Type = "STRING";
          }
        }
        else if (Surrogate.subtypeOfP(testValue000, GuiServer.SGT_LOGIC_TRUTH_VALUE)) {
          { TruthValue object000 = ((TruthValue)(renamed_Object));

            result.LiteralValue = GuiServer.getTruthValueString(object000);
            result.Type = "TRUTH-VALUE";
          }
        }
        else if (Surrogate.subtypeOfP(testValue000, GuiServer.SGT_LOGIC_NAMED_DESCRIPTION)) {
          { NamedDescription object000 = ((NamedDescription)(renamed_Object));

            result.PLSurrogate = GuiServer.makeLogicSurrogate(object000);
            if (Logic.classP(object000)) {
              result.Type = "CONCEPT";
            }
            else {
              result.Type = "RELATION";
            }
          }
        }
        else if (Surrogate.subtypeOfP(testValue000, GuiServer.SGT_LOGIC_SKOLEM)) {
          { Skolem object000 = ((Skolem)(renamed_Object));

            result.PLSurrogate = GuiServer.makeLogicSurrogate(object000);
            result.Type = "INSTANCE";
          }
        }
        else if (Surrogate.subtypeOfP(testValue000, GuiServer.SGT_LOGIC_LOGIC_OBJECT)) {
          { LogicObject object000 = ((LogicObject)(renamed_Object));

            result.PLSurrogate = GuiServer.makeLogicSurrogate(object000);
            result.Type = "INSTANCE";
          }
        }
        else {
          System.out.println("This object has unknown type: " + renamed_Object + " (type = )");
          if (renamed_Object == null) {
            System.out.println("make-pl-object-union: object is NOT defined");
          }
          else {
            result = GuiServer.makePlObjectUnion(StringWrapper.wrapString(Native.stringify(renamed_Object)));
          }
        }
      }
      return (result);
    }
  }