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

      if (testValue000 == Logic.SGT_STELLA_CONS) {
        { Cons self000 = ((Cons)(self));

          { Cons result = Stella.NIL;

            { Stella_Object elt = null;
              Cons iter000 = self000;
              Cons collect000 = null;

              for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
                elt = iter000.value;
                if (collect000 == null) {
                  {
                    collect000 = Cons.cons(Logic.deobjectifyTree(elt), Stella.NIL);
                    if (result == Stella.NIL) {
                      result = collect000;
                    }
                    else {
                      Cons.addConsToEndOfConsList(result, collect000);
                    }
                  }
                }
                else {
                  {
                    collect000.rest = Cons.cons(Logic.deobjectifyTree(elt), Stella.NIL);
                    collect000 = collect000.rest;
                  }
                }
              }
            }
            return (result);
          }
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_PROPOSITION)) {
        { Proposition self000 = ((Proposition)(self));

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

          return (Logic.generateTerm(self000));
        }
      }
      else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_STELLA_COLLECTION)) {
        { Collection self000 = ((Collection)(self));

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

          return (Logic.generateTerm(self000));
        }
      }
      else {
        return (self);
      }
    }
  }