public static SequenceIndex selectRulePropositions(Cons pattern) {
    { Cons arguments = pattern.rest.rest;
      Stella_Object posrelation = arguments.value;
      Stella_Object negrelation = arguments.rest.value;
      Description description = null;
      ObjectStore store = null;

      if (posrelation != null) {
        if (Surrogate.subtypeOfP(Stella_Object.safePrimaryType(posrelation), Logic.SGT_LOGIC_DESCRIPTION)) {
          { Description posrelation000 = ((Description)(posrelation));

            description = posrelation000;
          }
        }
        else {
          description = Logic.getDescription(posrelation);
        }
        negrelation = null;
      }
      if (negrelation != null) {
        if (Surrogate.subtypeOfP(Stella_Object.safePrimaryType(negrelation), Logic.SGT_LOGIC_DESCRIPTION)) {
          { Description negrelation000 = ((Description)(negrelation));

            description = negrelation000;
          }
        }
        else {
          description = Logic.getDescription(negrelation);
        }
      }
      if (description != null) {
        Description.deriveDeferredSatelliteRules(description);
        store = Logic.homeObjectStore(description);
      }
      if (store != null) {
        return (Logic.createSequenceIndex(store, pattern));
      }
      else {
        if (description != null) {
          return (Logic.selectRelationPropositions(Logic.makeRelationPattern2(Logic.SGT_PL_KERNEL_KB_SUBSET_OF, negrelation, posrelation)));
        }
        else {
          return (Logic.NIL_NON_PAGING_INDEX);
        }
      }
    }
  }