EvalOr: x<a || x>a over non-integer types simplifies to true
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 65/100
Hướng nghiên cứu
Start by reading EvalOr.orComparisonTrue and the adjacent notXb1 branch mentioned in the issue. Check how the comparison bounds and allowEquals() are handled for non-integer types, then run the relevant boolean simplifier tests. Done when strict comparisons at an equal bound no longer simplify to true, while the listed integer cases keep their current results.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
`EvalOr.orComparisonTrue` decides `x <= a || x >= b` with the two bounds only. For mathematically integer bounds on integer types that is right, because the strictness is folded into the bound (`k<3` is stored as `k<=2`, `k>3` as `k>=4`). For non-integer bounds, or integer bounds on a non-integer type, it returns `d0 == d1` without looking at `allowEquals`, so two strict comparisons on the same bound pass as a tautology:
- `l<2.5 || l>2.5` (l a double) evaluates to `true`; it is false at l == 2.5
- `l<3.0 || l>3.0` evaluates to `true`
- `k<3 || k>3` (k an int) correctly stays `k<3||k>=4`
- `k<=3 || k>=3` correctly becomes `true`
Found while benchmarking the boolean simplifier (the structural isNegationOf work). Not fixed there, since it changes verdicts: the non-integer branch needs `gt0.allowEquals() || gt1.allowEquals()` when the bounds coincide, and `x<a || x>a` should probably become `x != a` as the `notXb1` branch below it already does for the negated form.
🤖 Generated with Claude Code
- Ngôn ngữ chính
- Java
- Star
- 1
- Fork
- 1
- Merge trung bình
- 1 giờ 55 phút
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CodeLaser/maddi
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
CodeLaser/maddi#166 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
build/ci good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Java printer: a nested type prints by simple name when the unit imports another type of that nameĐang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 57/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của CodeLaser/maddi
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
quarkiverse/quarkus-google-cloud-services#1188 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Component: Frontend Component: Web Component Type: Maintenance
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
it-at-m/refarch-templates#1944 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
priority: p2 type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
googleapis/java-genai#1372 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100