public static Keyword subsetOfSpecialist(ControlFrame frame, Keyword lastmove) {
    { Proposition proposition = frame.proposition;
      Stella_Object subcollectionarg = (proposition.arguments.theArray)[0];
      Stella_Object supercollectionarg = (proposition.arguments.theArray)[1];
      Stella_Object subcollection = Logic.equivalentValueOf(Logic.argumentBoundTo(subcollectionarg));
      Stella_Object supercollection = Logic.equivalentValueOf(Logic.argumentBoundTo(supercollectionarg));
      Iterator iterator = ((Iterator)(KeyValueList.dynamicSlotValue(frame.dynamicSlots, Logic.SYM_STELLA_ITERATOR, null)));

      lastmove = lastmove;
      if (iterator == null) {
        if ((subcollection != null) &&
            (supercollection != null)) {
          if (LogicObject.collectionImpliesCollectionP(((LogicObject)(subcollection)), ((LogicObject)(supercollection)))) {
            return (Logic.selectTestResult(true, true, frame));
          }
          else if (Logic.testDisjointTermsP(subcollection, supercollection)) {
            return (Logic.selectTestResult(false, true, frame));
          }
          else {
            return (Logic.KWD_FAILURE);
          }
        }
        else if (subcollection != null) {
          { Surrogate testValue000 = Stella_Object.safePrimaryType(subcollection);

            if (Surrogate.subtypeOfP(testValue000, Logic.SGT_LOGIC_LOGIC_OBJECT)) {
              { LogicObject subcollection000 = ((LogicObject)(subcollection));

                iterator = Cons.cons(subcollection000, Stella.NIL).allocateIterator().concatenate(LogicObject.allSupercollections(subcollection000), Stella.NIL);
              }
            }
            else if (Surrogate.subtypeOfP(testValue000, Logic.SGT_STELLA_COLLECTION)) {
              { Collection subcollection000 = ((Collection)(subcollection));

                return (Logic.KWD_FAILURE);
              }
            }
            else {
              { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

                stream000.nativeStream.print("`" + testValue000 + "' is not a valid case option");
                throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
              }
            }
          }
        }
        else if (supercollection != null) {
          { Surrogate testValue001 = Stella_Object.safePrimaryType(supercollection);

            if (Surrogate.subtypeOfP(testValue001, Logic.SGT_LOGIC_LOGIC_OBJECT)) {
              { LogicObject supercollection000 = ((LogicObject)(supercollection));

                iterator = Cons.cons(supercollection000, Stella.NIL).allocateIterator().concatenate(LogicObject.allSubcollections(supercollection000), Stella.NIL);
              }
            }
            else if (Surrogate.subtypeOfP(testValue001, Logic.SGT_STELLA_COLLECTION)) {
              { Collection supercollection000 = ((Collection)(supercollection));

                return (Logic.KWD_FAILURE);
              }
            }
            else {
              { OutputStringStream stream001 = OutputStringStream.newOutputStringStream();

                stream001.nativeStream.print("`" + testValue001 + "' is not a valid case option");
                throw ((StellaException)(StellaException.newStellaException(stream001.theStringReader()).fillInStackTrace()));
              }
            }
          }
        }
        else {
          {
            System.out.println();
            System.out.println(" Found 'subset-of' goal with two unbound arguments.");
            System.out.println("   Possibly the query needs rewriting.");
            System.out.println();
          }
;
          return (Logic.KWD_FAILURE);
        }
        KeyValueList.setDynamicSlotValue(frame.dynamicSlots, Logic.SYM_STELLA_ITERATOR, iterator, null);
      }
      while (iterator.nextP()) {
        { Stella_Object value = Logic.valueOf(iterator.value);

          if (true &&
              (((subcollection != null) ? PatternVariable.bindVariableToValueP(((PatternVariable)(supercollectionarg)), value, true) : PatternVariable.bindVariableToValueP(((PatternVariable)(subcollectionarg)), value, true)))) {
            return (Logic.KWD_CONTINUING_SUCCESS);
          }
        }
      }
      return (Logic.KWD_FAILURE);
    }
  }