public static void saveObject(Stella_Object renamed_Object, Stella_Object store) {
    { Surrogate testValue000 = Stella_Object.safePrimaryType(renamed_Object);

      if (Surrogate.subtypeOfP(testValue000, Logic.SGT_STELLA_RELATION)) {
        { Relation object000 = ((Relation)(renamed_Object));

          { Surrogate testValue001 = Stella_Object.safePrimaryType(store);

            if (Surrogate.subtypeOfP(testValue001, Logic.SGT_STELLA_OUTPUT_STREAM)) {
              { OutputStream store000 = ((OutputStream)(store));

                Logic.prettyPrintRelationDefinition(object000, store000);
              }
            }
            else if (Surrogate.subtypeOfP(testValue001, Logic.SGT_LOGIC_OBJECT_STORE)) {
              { ObjectStore store000 = ((ObjectStore)(store));

                store000.storeNativeRelation(object000);
              }
            }
            else {
              { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

                stream000.nativeStream.print("`" + testValue001 + "' is not a valid case option");
                throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
              }
            }
          }
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_NAMED_DESCRIPTION)) {
        { NamedDescription object000 = ((NamedDescription)(renamed_Object));

          if (((BooleanWrapper)(KeyValueList.dynamicSlotValue(object000.dynamicSlots, Logic.SYM_LOGIC_UNDECLAREDp, Stella.FALSE_WRAPPER))).wrapperValue) {
            return;
          }
          { Surrogate testValue002 = Stella_Object.safePrimaryType(store);

            if (Surrogate.subtypeOfP(testValue002, Logic.SGT_STELLA_OUTPUT_STREAM)) {
              { OutputStream store000 = ((OutputStream)(store));

                NamedDescription.prettyPrintNamedDescription(object000, store000);
              }
            }
            else if (Surrogate.subtypeOfP(testValue002, Logic.SGT_LOGIC_OBJECT_STORE)) {
              { ObjectStore store000 = ((ObjectStore)(store));

                store000.storeRelation(object000);
              }
            }
            else {
              { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

                stream001.nativeStream.print("`" + testValue002 + "' is not a valid case option");
                throw ((StellaException)(StellaException.newStellaException(stream001.theStringReader()).fillInStackTrace()));
              }
            }
          }
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_PROPOSITION)) {
        { Proposition object000 = ((Proposition)(renamed_Object));

          { Surrogate testValue003 = Stella_Object.safePrimaryType(store);

            if (Surrogate.subtypeOfP(testValue003, Logic.SGT_STELLA_OUTPUT_STREAM)) {
              { OutputStream store000 = ((OutputStream)(store));

                Proposition.prettyPrintAssertion(object000, store000);
              }
            }
            else if (Surrogate.subtypeOfP(testValue003, Logic.SGT_LOGIC_OBJECT_STORE)) {
              { ObjectStore store000 = ((ObjectStore)(store));

                store000.storeAssertion(object000);
              }
            }
            else {
              { OutputStringStream stream002 = OutputStringStream.newOutputStringStream();

                stream002.nativeStream.print("`" + testValue003 + "' is not a valid case option");
                throw ((StellaException)(StellaException.newStellaException(stream002.theStringReader()).fillInStackTrace()));
              }
            }
          }
        }
      }
      else {
        { OutputStringStream stream003 = OutputStringStream.newOutputStringStream();

          stream003.nativeStream.print("save-object: Don't know how to save `" + renamed_Object + "' to `" + store + "'");
          throw ((StellaException)(StellaException.newStellaException(stream003.theStringReader()).fillInStackTrace()));
        }
      }
    }
  }