A ternary between arrays crashes: Sorts (Array Int Int) and Bool are incompatible
Maintainer thường phản hồi trong vòng 1 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
- 15/100
Hướng nghiên cứu
Start from the Tern reproducer in the issue, which uses a ternary over int[] branches checked against a length(a) == 1 refinement, and reproduce both the Sorts (Array Int Int) and Bool are incompatible error and the args not-found variant. The verifier code that handles conditional expressions is not named in the payload, so locate it by searching for the ternary handling. Work is already under way in linked pull request #561, so check that before starting. Done means the reproducer passes with each branch's facts holding under its condition.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
A conditional expression (c ? x : y) whose branches are arrays crashes the verifier when the result is checked against a length refinement.
Minimal reproducer
import liquidjava.specification.Refinement;
public class Tern {
static void one(@Refinement("length(a) == 1") int[] a) {}
static void pick(boolean b) {
int[] a = b ? new int[1] : new int[1];
one(a); // should pass
}
}
Result on main:
Error: Sorts (Array Int Int) and Bool are incompatible
If the condition mentions args (boolean b = args.length > 0; inside main), the same program instead fails with Not Found Error: Variable 'args' could not be found, which also only happens with the array ternary.
Expected
The program passes: both branches have length 1. A branch array's facts should hold for the result under that branch's condition. Found while reviewing #540.
- Ngôn ngữ chính
- Java
- Star
- 73
- Fork
- 38
- Merge trung bình
- 12 giờ 32 phút
- Pull request đã merge (30 ngày)
- 45
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
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
liquid-java/liquidjava#562 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
A float ghost crashes the verifier: "Ghost not implemented for type float"Có thể đã có người làm @MohammedZaid1740 đã nhận 7 ngày trước. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
liquid-java/liquidjava#443 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug real-world-finding
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
liquid-java/liquidjava#395 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
new T[a][b] gets length b instead of a (unsound)Có thể đã có người làm @CatarinaGamboa đã nhận 4 ngày trước. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 30/100
liquid-java/liquidjava#557 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Invariant inference: mark inferred facts in diagnostics, and a hint to state a loop invariantCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởenhancement error messages
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
liquid-java/liquidjava#554 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của liquid-java/liquidjava
Issue tương tự
-
missing Git commit for 10.5-RC1Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
avaje/avaje-metrics#139 ·
-
documentation good first issue help wanted
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Attachment upload accepts a file part with no file chosen and stores an empty comp_attachmentCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
eclipse-sw360/sw360#4849 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
exoego/keycloak-fuhito#888 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Skip cross-field checkpointing validation rules when checkpointing is disabledCó thể đã có người làm @hutiefang76 đã nhận hôm nay. Đang mởaccepted bug good first issue java
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Sekelenao/Flinkboot#473 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày