In-source return refinement `_ == true --> s(this)` binds `this` to the return value (Argument Mismatch)
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ó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- java
- Lĩnh vực
- backend, testing-qa
Hướng nghiên cứu
Start with the in-source verifier path for @Refinement return clauses and compare how it binds this with the external-spec path. Run the one-file reproducer from the issue and confirm the boolean versus Edit argument mismatch; use the stated external refinement example as a comparison. Done when the in-source example verifies and the external example continues to verify.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A boolean method that reveals a state when it returns true, @Refinement("_ == true --> b(this)"), fails when the class is annotated in its own source. The same form verifies in an @ExternalRefinementsFor spec.
Reproducer (one file; run the verifier on it):
import liquidjava.specification.Refinement;
import liquidjava.specification.StateRefinement;
import liquidjava.specification.StateSet;
@StateSet({"a", "b"})
class Edit {
@StateRefinement(to = "a(this)")
public Edit() {}
@StateRefinement(to = "b(this)")
public void finish() {}
@Refinement("_ == true --> b(this)")
public boolean isDone() { return true; }
@StateRefinement(from = "b(this)")
public void needsB() {}
}
public class Main {
static void use(Edit e) {
if (e.isDone()) e.needsB(); // a true answer says b
}
public static void main(String[] args) { Edit e = new Edit(); e.finish(); use(e); }
}
Found on main @ f7f366c (also on 1a506fe):
Argument Mismatch Error: Argument '#ret_6' and its respective parameter of ghost 'Edit.state1' types are incompatible: expected Edit, got boolean
19 | public boolean isDone() { return true; }
this in the return refinement seems to be bound to the return value (#ret_6) instead of the receiver.
Expected: the program verifies, as it does when the same refinements are written in an external spec. For example, this one verifies:
@ExternalRefinementsFor("javax.swing.undo.AbstractUndoableEdit")
@StateSet({"done", "undone"})
public interface EditRefinements {
@StateRefinement(to = "done(this)") void AbstractUndoableEdit();
@Refinement("_ == true --> done(this)") boolean canUndo();
@StateRefinement(from = "done(this)", to = "undone(this)") void undo();
}
// client: static void use(AbstractUndoableEdit e) { if (e.canUndo()) e.undo(); }
Found while cataloguing spec forms for co-specification; the reproducers are probes V11 (in-source) and V21 (external) there. Low priority: external specs, the main use, work.
- 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
-
A ternary between arrays crashes: Sorts (Array Int Int) and Bool are incompatibleCó thể đã có người làm @CatarinaGamboa đã nhận 4 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
liquid-java/liquidjava#558 ·
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
Tất cả issue của liquid-java/liquidjava
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
quelea-projection/Quelea#749 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
free_port can hand one port to two callers, so the fixed-port http tests fail in parallel runsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
erkamyaman/rust-anything#963 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
api-diagnostics bug jdbc
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
ClickHouse/clickhouse-java#3464 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 76/100
-
Deferred
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Sanne/incus-spawn#2768 ·
Maintainer thường phản hồi trong vòng 1 ngày