@NotNull
  private static DfIntType getLength(@NotNull DfaValueFactory factory, @NotNull DfaMemoryState state, @NotNull DfaValue dfaValue, @Nullable String constValue) {
    if (constValue != null) {
      return intValue(constValue.length());
    }
    DfType lengthType;
    if (dfaValue.getDfType() instanceof DfIntegralType) {
      DfType decimalString = CustomMethodHandlers.numberAsDecimalString(state, dfaValue);
      lengthType = SpecialField.STRING_LENGTH.getFromQualifier(decimalString);
    } else if (dfaValue.getDfType() instanceof DfBooleanType) {
      lengthType = intRange(LongRangeSet.range(4, 5)); // "true" or "false"
    } else if (dfaValue.getDfType() instanceof DfFloatingPointType) {
      lengthType = intRange(LongRangeSet.range(3, 26));
    } else {
      DfaValue lengthValue = SpecialField.STRING_LENGTH.createValue(factory, dfaValue);
      lengthType = state.getDfType(lengthValue);
    }
    if (lengthType instanceof DfIntType intType) return intType;
    return (DfIntType)intRange(LongRangeSet.range(0, Integer.MAX_VALUE));
  }
@NotNull
  private static DfIntType getLength(@NotNull DfaValueFactory factory, @NotNull DfaMemoryState state, @NotNull DfaValue dfaValue, @Nullable String constValue)