-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Naming of arrays / sequences #528
Labels
architectural decision
Discussion of design decision
generator
Related to generator package (SPARK code generation)
model
Related to model package (e.g., model verification)
specification
Related to specification package (e.g., specification parsing)
Projects
Comments
O2 seems to me to be the best option. |
I agree that |
treiher
added a commit
that referenced
this issue
May 10, 2021
treiher
added a commit
that referenced
this issue
May 10, 2021
treiher
added a commit
that referenced
this issue
May 10, 2021
treiher
added a commit
that referenced
this issue
May 10, 2021
treiher
added a commit
that referenced
this issue
May 10, 2021
treiher
added a commit
that referenced
this issue
May 11, 2021
treiher
added a commit
that referenced
this issue
May 11, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
architectural decision
Discussion of design decision
generator
Related to generator package (SPARK code generation)
model
Related to model package (e.g., model verification)
specification
Related to specification package (e.g., specification parsing)
Context and Problem Statement
The current use of the terms
array
andsequence
is inconsistent:Specification:
type T is array of E
Python:
Array
,ArrayType
,ArrayValue
SPARK:
Message_Sequence
,Scalar_Sequence
The mainly used term
array
might not be the most suitable.Considered Options
O1: Consistently use
array
Specification:
type T is array of E
Python:
Array
,ArrayType
,ArrayValue
SPARK:
Message_Array
,Scalar_Array
+ Specification syntax is similar to Ada, although not identical
– Specification uses same term as Ada, although semantics differ: no specification of index type, no direct access to array elements possible
–
array
often refers to collection of fixed-size elements, which is not necessarily the case in our specificationO2: Consistently use
sequence
Specification:
type T is sequence of E
Python:
Sequence
,SequenceType
,SequenceValue
SPARK:
Message_Sequence
,Scalar_Sequence
+ Makes divergent syntax and semantics to Ada arrays clear
+ Similar use in ASN.1
– Name conflict with Python´s
typing.Sequence
O3: Consistently use
list
Specification:
type T is list of E
Python:
List
,ListType
,ListValue
SPARK:
Message_List
,Scalar_List
+ Makes divergent syntax and semantics to Ada arrays clear
–
list
usually refers to collection of heterogeneous elements, which is not the case here– Name conflict with Python´s
typing.List
O4: Use
array
andsequence
interchangeablySpecification:
type T is array of E
Python:
Array
,ArrayType
,ArrayValue
SPARK:
Message_Sequence
,Scalar_Sequence
+ No changes needed
– Inconsistent
Decision Outcome
O2
The text was updated successfully, but these errors were encountered: