-
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
Verification of size aspects with Message'Last
#627
Projects
Comments
That is not related to the shortcut syntax. The semantically equivalent specification is also accepted: package Test is
type Kind is mod 2**16;
type Frame is
message
Kind : Kind
then Payload
with Size => Message'Last - Kind'Last
if Kind = 1
then Kind2
if Kind = 2;
Kind2 : Kind
then Payload
with Size => Message'Last - Kind'Last;
Payload : Opaque;
end message;
end Test; |
Message'Last
This specification should also not be accepted: package Test is
type Kind is mod 2**16;
type Frame is
message
Kind : Kind
then Payload
with Size => Message'Last - Kind'Last
if Kind = 1
then Kind2
if Kind = 2;
Kind2 : Kind
then Payload
with Size => Message'Last + 128;
Payload : Opaque;
end message;
end Test; |
This will be obsolete once #736 is implemented. |
treiher
added a commit
that referenced
this issue
Dec 14, 2021
treiher
added a commit
that referenced
this issue
Dec 16, 2021
treiher
added a commit
that referenced
this issue
Dec 17, 2021
treiher
added a commit
that referenced
this issue
Dec 20, 2021
treiher
added a commit
that referenced
this issue
Dec 21, 2021
treiher
added a commit
that referenced
this issue
Dec 21, 2021
treiher
added a commit
that referenced
this issue
Jan 3, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I checked the flexibility of the shortcut syntax for size aspects and noticed that it is possible to create messages with overlapping fields:
In this case
Payload
always ranges fromKind
to the end of the message. IfKind = 2
thenKind2
will be overwritten by payload. This spec is not rejected.The text was updated successfully, but these errors were encountered: