REPL result formatting ambiguously renders scalars and sequences with square brackets
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
- 48/100
Hướng nghiên cứu
Start by locating the REPL/Jupyter result-formatting entry point; the issue does not name a source file or test. Compare how add(2, 2), 2+2, and (1, 2) are rendered, then check whether existing tests cover scalar and sequence results. Done means the output distinguishes the explicitly scalar result from the sequence, or documents the display notation and explains the difference described in the issue.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
The REPL/Jupyter output uses square brackets for both a scalar calculation call and a sequence result. This makes the displayed values ambiguous as SysML values: a scalar Integer calculation appears as [4], while a sequence written with parenthesized comma syntax appears as [1, 2]. By contrast, ordinary arithmetic is displayed as an unbracketed scalar (4).
Reproduction
Observed with OpenSysML 0.11.0 using the SysML v2 (OpenSysML 0.11 experiment) Jupyter kernel:
private import ScalarValues::*;
calc add { in x : Integer; in y : Integer; return : Integer; x + y }
add(2, 2)
The call evaluates to:
✓ add(2, 2)
= [4]
The declaration explicitly types both inputs and the return value as Integer. For comparison, 2+2 displays as = 4, while (2 + 2) also displays as = 4.
A sequence expression:
(1, 2)
is displayed as:
✓ (1, 2)
= [1, 2]
Why this is confusing
In KerML textual syntax, (1, 2) is a sequence expression, whereas square brackets are used for distinct source constructs (including multiplicity ranges and the bracket expression form). Seeing [4] for an explicitly scalar return value suggests it may be a collection, and seeing [1, 2] does not preserve the source notation or distinguish the runtime sequence from other bracket constructs.
The question is about REPL result presentation, not a claim that the evaluated scalar or sequence has the wrong value. Could the output distinguish scalar values from sequence values, or document the brackets as a separate display notation? If the scalar call is intentionally returned as a one-item sequence, it would be helpful to explain why that differs from evaluating the same arithmetic directly.
- Ngôn ngữ chính
- Go
- Star
- 47
- Fork
- 13
- Merge trung bình
- 15 giờ 13 phút
- Pull request đã merge (30 ngày)
- 928
Chuẩn bị môi trường
- Có Dockerfile hoặc 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 Open-MBEE/OpenSysML
-
Definition of requirementsĐang mởquestion
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Open-MBEE/OpenSysML#1359 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Requirement evaluation ignores assume constraints (assumption false is reported as violated)Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Open-MBEE/OpenSysML#1628 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
spec compliance
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Open-MBEE/OpenSysML#1576 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Review branding assetsĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Open-MBEE/OpenSysML
Issue tương tự
-
automation doc-healer documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/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 90/100
tsukumogami/tsuku#2804 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Anthropic /v1/messages: only the last thinking block of an assistant message is keptCó thể đã có người làm @Shayan12456 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
ollama/ollama#19415 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
raised-by:verifier
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
medici-finance/assay#5039 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
metax CheckHealth reads Status.Capacity, so unhealthy Metax-GPU nodes are never cleaned upCó thể đã có người làm @barbierajput378-pixel đã nhận hôm nay. Đang mởkind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Project-HAMi/HAMi#3343 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày