REPL result formatting ambiguously renders scalars and sequences with square brackets
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Go
- Stelle
- 47
- Fork
- 13
- Merge medio
- 15h 52m
- PR unite (30g)
- 906
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Open-MBEE/OpenSysML
-
Definition of requirementsApertaquestion
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Open-MBEE/OpenSysML#1359 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Open-MBEE/OpenSysML#1628 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
spec compliance
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
Open-MBEE/OpenSysML#1576 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Review branding assetsAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Open-MBEE/OpenSysML
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
agent-butler-finding bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jordansmall/spindrift#6161 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
open-telemetry/opentelemetry-go-compile-instrumentation#1635 ·
I maintainer di solito rispondono entro 2 giorni
-
C-bug O-community X-blathers-untriaged
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
cockroachdb/cockroach#176210 · 1 commento ·
-
VLAgent `spec.k8sCollector.includePodLabels: false` has no effectForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
VictoriaMetrics/operator#2772 ·
I maintainer di solito rispondono entro 1 giorno