boolean (@Nullable DfIntegralType appliedRange, @NotNull DfaBinOpValue binOp) { if (appliedRange == null) return true; DfaVariableValue left = binOp.getLeft(); DfaValue right = binOp.getRight(); DfIntegralType leftDfType = ObjectUtils.tryCast(getDfType(left), DfIntegralType.class); DfIntegralType rightDfType = ObjectUtils.tryCast(getDfType(right), DfIntegralType.class); if(leftDfType == null || rightDfType == null) return true; DfType result = getBinOpRange(binOp); DfType targetRange = result.meet(appliedRange); if (targetRange == DfType.BOTTOM) return false; DfType leftConstraint = binOp.getDfType(); DfType rightConstraint = binOp.getDfType(); switch (binOp.getOperation()) { case PLUS -> { leftConstraint = appliedRange.eval(rightDfType, LongRangeBinOp.MINUS); rightConstraint = appliedRange.eval(leftDfType, LongRangeBinOp.MINUS); } case MINUS -> { leftConstraint = rightDfType.eval(appliedRange, LongRangeBinOp.PLUS); rightConstraint = leftDfType.eval(appliedRange, LongRangeBinOp.MINUS); } case MOD -> { Long value = rightDfType.getRange().getConstantValue(); if (value != null) { leftConstraint = leftDfType.meetRange(LongRangeSet.fromRemainder(value, extractRange(targetRange))); } } } return meetDfType(left, leftDfType.meet(leftConstraint)) && meetDfType(right, rightDfType.meet(rightConstraint)); }