public static Cons topLevelExistentialVariables(Description self) {
    { List quantifiedvariables = List.newList();
      List beenthere = List.newList();
      List collection = List.newList();

      { PatternVariable v = null;
        Vector vector000 = self.ioVariables;
        int index000 = 0;
        int length000 = vector000.length();

        for (;index000 < length000; index000 = index000 + 1) {
          v = ((PatternVariable)((vector000.theArray)[index000]));
          quantifiedvariables.insert(v);
        }
      }
      if (((Vector)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_EXTERNAL_VARIABLES, null))) != null) {
        { PatternVariable v = null;
          Vector vector001 = ((Vector)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_EXTERNAL_VARIABLES, null)));
          int index001 = 0;
          int length001 = vector001.length();

          for (;index001 < length001; index001 = index001 + 1) {
            v = ((PatternVariable)((vector001.theArray)[index001]));
            quantifiedvariables.insert(v);
          }
        }
      }
      if (self.proposition == null) {
        return (quantifiedvariables.theConsList);
      }
      Logic.collectFreeVariables(self.proposition, collection, quantifiedvariables, beenthere);
      quantifiedvariables.free();
      beenthere.free();
      return (collection.theConsList);
    }
  }