Soundness: short-circuit RHS assignments are treated as executed
Maintainer thường phản hồi trong vòng 2 ngày
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Start at RefinementTypeChecker.visitCtBinaryOperator and reproduce the false && and true || cases from the issue. Compare current main with the conservative fix in PR #257, then verify both operators, nested writes, and branches where the RHS runs or is skipped. Done means the invalid refinement is rejected without rejecting valid executed-RHS cases.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
A write in the right operand of Java && or || is applied to LiquidJava's variable context even when Java short-circuits and does not execute that operand. The verifier can then prove a refinement about a value the program never assigned.
Minimal reproducer
import liquidjava.specification.Refinement;
public class Repro {
public static void main(String[] args) {
int x = 0;
boolean ignored = false && ((x = 1) == 1);
@Refinement("_ == 1") int y = x; // should be a Refinement Error
assert y == 1; // fails: y is 0
}
}
Expected: Reject the refinement on y. Java skips the RHS of &&, so x remains 0.
Actual: Correct! Passed Verification. on main at dd02e996. Compiling and running the program with assertions enabled throws AssertionError. The analogous true || RHS path has the same conditional-execution rule.
Cause and scope
RefinementTypeChecker.visitCtBinaryOperator scans both operands before applying the binary operation refinement. A RHS assignment updates the context during that scan; the later operator check does not distinguish a definitely executed write from a conditionally executed one.
The closed PR #257 contains a reproducer and a conservative fix. The fix should be ported and reviewed against current main, including both operators, nested writes, and branches where the RHS runs or is skipped. Example tests now use // Expect: Refinement Error after #293.
- Ngôn ngữ chính
- Java
- Star
- 67
- Fork
- 36
- Merge trung bình
- 3 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 9
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 liquid-java/liquidjava
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
liquid-java/liquidjava#321 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Soundness: a field of another class or object is read as this class's field with the same nameĐang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
liquid-java/liquidjava#322 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Fields with the same name in different classes collideCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 52/100
liquid-java/liquidjava#318 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Nested classes wipe the outer class's field refinementsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
liquid-java/liquidjava#317 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Reading a field of a class declared later in the file loses its refinementCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 62/100
liquid-java/liquidjava#316 ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của liquid-java/liquidjava
Issue tương tự
-
[destination-snowflake] Custom domains rejected unlike source connectionsCó thể đã có người làm @kuza55 đã nhận hôm nay. Đang mởautoteam community connectors/destination/snowflake team/use
Độ khó 2/5 1-3 giờ 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
-
area-dashboard
Độ khó 2/5 1-3 giờ 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
-
component/operate kind/feature-request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Forge coverage prompts carry text the agent cannot act onCó thể đã có người làm @graalvmbot đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
oracle/graalvm-reachability-metadata#10572 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[CI] Core CI doesn't run for changes to amoro-format-lance (and amoro-web)Có thể đã có người làm @MarkAlex1234 đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 2 ngày