public static BooleanVector getIndexingVector(NamedDescription self) {
    if (self.arity() == 2) {
      return (NamedDescription.getBinaryIndexingVector(self));
    }
    { BooleanVector cachedvector = ((BooleanVector)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_INDEXING_VECTOR, null)));

      if (cachedvector != null) {
        return (cachedvector);
      }
      { List zeroonelist = List.newList();

        { Surrogate type = null;
          Cons iter000 = self.ioVariableTypes.theConsList;
          Cons collect000 = null;

          for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
            type = ((Surrogate)(iter000.value));
            if (collect000 == null) {
              {
                collect000 = Cons.cons((Logic.typeHasBacklinksP(Logic.ensureDeferredDescription(type)) ? Stella.ONE_WRAPPER : Stella.ZERO_WRAPPER), Stella.NIL);
                if (zeroonelist.theConsList == Stella.NIL) {
                  zeroonelist.theConsList = collect000;
                }
                else {
                  Cons.addConsToEndOfConsList(zeroonelist.theConsList, collect000);
                }
              }
            }
            else {
              {
                collect000.rest = Cons.cons((Logic.typeHasBacklinksP(Logic.ensureDeferredDescription(type)) ? Stella.ONE_WRAPPER : Stella.ZERO_WRAPPER), Stella.NIL);
                collect000 = collect000.rest;
              }
            }
          }
        }
        KeyValueList.setDynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_INDEXING_VECTOR, Logic.zeroOneListToBooleanVector(zeroonelist), null);
        zeroonelist.free();
        return (((BooleanVector)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Logic.SYM_LOGIC_INDEXING_VECTOR, null))));
      }
    }
  }