public static List findUniqueVariableNames(Cons tree, List names) {
    { Stella_Object arg = null;
      Cons iter000 = tree.rest;

      for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
        arg = iter000.value;
        { Surrogate testValue000 = Stella_Object.safePrimaryType(arg);

          if (testValue000 == Logic.SGT_STELLA_CONS) {
            { Cons arg000 = ((Cons)(arg));

              Logic.findUniqueVariableNames(arg000, names);
            }
          }
          else if (Surrogate.subtypeOfSymbolP(testValue000)) {
            { Symbol arg000 = ((Symbol)(arg));

              if (!names.memberP(arg000)) {
                names.push(arg000);
              }
            }
          }
          else {
          }
        }
      }
    }
    return (names);
  }