Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[TS] Normalize negative indices in Array.fill

Đang mở
#437 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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
72/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
kotlin, node.js, typescript
Lĩnh vực
devtools, testing-qa

Hướng nghiên cứu

Start at the Fill negative-index TODO in usvm-ts/src/main/kotlin/org/usvm/machine/expr/CallApproximations.kt, lines 495-520, and run the minimal TypeScript example against concrete Node.js behavior. Trace how symbolic indices are represented and how approximation results are classified. Done means a focused symbolic test covers the supported case without claiming exact semantics, while unsupported operands or environments remain explicit.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Problem

The Array.fill approximation explicitly leaves negative start and end indices unsupported.

Minimal TypeScript example

export function fill(): number[] {
  return [1, 2, 3].fill(9, -2);
}

Expected behavior

fill() returns [1, 9, 9]. Normalize negative indices relative to length and clamp to the valid interval, including symbolic indices in the supported domain.

Current source evidence

Fill negative-index TODO.

Checked against USVM main 53dce8f3bca2713642c783ba8308a6a360a9e516. This exact snippet is a proposed regression from source audit; it has not yet been run as a new end-to-end test. #368 audits the existing call approximations but does not implement these individual fixes.

Acceptance criteria

  • A focused test checks the symbolic outcome without reporting an approximation as exact semantics.
  • The supported case agrees with concrete TypeScript/Node.js replay.
  • Unsupported operand or environment cases remain explicit.
Ngôn ngữ chính
Kotlin
Star
33
Fork
27
Merge trung bình
2 ngày 22 giờ
Pull request đã merge (30 ngày)
15

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của UnitTestBot/usvm

Tất cả issue của UnitTestBot/usvm

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.