public static BooleanVector argumentsVectorToBooleanVector(Vector argumentsvector) {
    { BooleanVectorIndexNode node = Logic.$BOOLEAN_VECTOR_INDEX$;
      BooleanVectorIndexNode nextnode = null;
      boolean boundP = false;

      { Stella_Object arg = null;
        Vector vector000 = argumentsvector;
        int index000 = 0;
        int length000 = vector000.length();

        for (;index000 < length000; index000 = index000 + 1) {
          arg = (vector000.theArray)[index000];
          boundP = true;
          if (Surrogate.subtypeOfP(Stella_Object.safePrimaryType(arg), Logic.SGT_LOGIC_PATTERN_VARIABLE)) {
            { PatternVariable arg000 = ((PatternVariable)(arg));

              boundP = (((QueryIterator)(Logic.$QUERYITERATOR$.get())).currentPatternRecord.variableBindings.theArray)[(arg000.boundToOffset)] != null;
            }
          }
          else {
          }
          if (boundP) {
            {
              nextnode = node.trueLink;
              if (nextnode == null) {
                nextnode = BooleanVectorIndexNode.createBooleanVectorIndexNode(node, true);
              }
            }
          }
          else {
            {
              nextnode = node.falseLink;
              if (nextnode == null) {
                nextnode = BooleanVectorIndexNode.createBooleanVectorIndexNode(node, false);
              }
            }
          }
          node = nextnode;
        }
      }
      return (node.theVector);
    }
  }