public static Proposition computeSubqueryOptions(ControlFrame frame, Object [] MV_returnarray) {
    { Vector arguments = frame.proposition.arguments;
      Stella_Object arg = null;
      Proposition proparg = null;
      int lastoptionargindex = arguments.length() - 1;
      int cursor = 1;
      Stella_Object key = null;
      Stella_Object value = null;
      PropertyList subqueryoptions = PropertyList.newPropertyList();
      PropertyList parentoptions = ((QueryIterator)(Logic.$QUERYITERATOR$.get())).options;

      if (lastoptionargindex < 0) {
        { Proposition _return_temp = null;

          MV_returnarray[0] = null;
          return (_return_temp);
        }
      }
      arg = Logic.argumentBoundTo((arguments.theArray)[0]);
      if ((arg != null) &&
          Stella_Object.isaP(arg, Logic.SGT_LOGIC_PROPOSITION)) {
        proparg = ((Proposition)(arg));
      }
      else if (lastoptionargindex >= 1) {
        cursor = 0;
        key = Logic.KWD_HOW_MANY;
        value = arg;
        arg = Logic.argumentBoundTo((arguments.theArray)[1]);
        if ((arg != null) &&
            Stella_Object.isaP(arg, Logic.SGT_LOGIC_PROPOSITION)) {
          proparg = ((Proposition)(arg));
        }
        else {
          { Proposition _return_temp = null;

            MV_returnarray[0] = null;
            return (_return_temp);
          }
        }
      }
      else {
        { Proposition _return_temp = null;

          MV_returnarray[0] = null;
          return (_return_temp);
        }
      }
      if ((((lastoptionargindex - cursor) % 2) == 0)) {
        lastoptionargindex = lastoptionargindex - 1;
      }
      while (cursor < lastoptionargindex) {
        if (cursor == 0) {
        }
        else {
          key = Logic.generateTerm(Logic.argumentBoundTo((arguments.theArray)[cursor]));
          value = Logic.generateTerm(Logic.argumentBoundTo((arguments.theArray)[(cursor + 1)]));
        }
        cursor = cursor + 2;
        if ((key == null) ||
            (value == null)) {
          { Proposition _return_temp = null;

            MV_returnarray[0] = null;
            return (_return_temp);
          }
        }
        if (key == Logic.KWD_INHERIT) {
          if ((value == Logic.KWD_ALL) ||
              (value == Logic.KWD_CURRENT)) {
            { Stella_Object pkey = null;
              Stella_Object pvalue = null;
              Cons iter000 = parentoptions.thePlist;

              for (;!(iter000 == Stella.NIL); iter000 = iter000.rest.rest) {
                pkey = iter000.value;
                pvalue = iter000.rest.value;
                subqueryoptions.insertAt(pkey, pvalue);
              }
            }
          }
        }
        else if ((value == Logic.KWD_INHERIT) ||
            (value == Logic.KWD_CURRENT)) {
          if (Logic.lookupQueryOption(parentoptions, ((Keyword)(key))) != null) {
            subqueryoptions.insertAt(key, Logic.lookupQueryOption(parentoptions, ((Keyword)(key))));
          }
        }
        else {
          subqueryoptions.insertAt(key, value);
        }
      }
      { Proposition _return_temp = proparg;

        MV_returnarray[0] = subqueryoptions;
        return (_return_temp);
      }
    }
  }