Skip to content
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

Appending independently created messages to array #514

Closed
treiher opened this issue Dec 1, 2020 · 1 comment · Fixed by #519
Closed

Appending independently created messages to array #514

treiher opened this issue Dec 1, 2020 · 1 comment · Fixed by #519
Assignees
Labels
model Related to model package (e.g., model verification)

Comments

@treiher
Copy link
Collaborator

treiher commented Dec 1, 2020

The generated SPARK code does not allow appending independently created messages to an array. This is heavily used in our current TLS session specification:

         Post_Handshake_Auth_Extension : TLS_Handshake::CH_Extension;
      begin
         Post_Handshake_Auth_Extension := TLS_Handshake::CH_Extension'(Tag => TLS_Handshake::EXTENSION_POST_HANDSHAKE_AUTH, Data_Length => 0, Data => []);
         Extensions_List'Append (Post_Handshake_Auth_Extension);

But I couldn't find any instance where it is strictly necessary and could not be replaced by:

      begin
         Extensions_List'Append (TLS_Handshake::CH_Extension'(Tag => TLS_Handshake::EXTENSION_POST_HANDSHAKE_AUTH, Data_Length => 0, Data => []));

Either we have to prohibit appending independently created messages to an array in the session model or extend the code generator. The former solution is easy to implement and sufficient for now, while the latter provides more flexibility in the long-term.

@treiher treiher added generator Related to generator package (SPARK code generation) model Related to model package (e.g., model verification) labels Dec 1, 2020
@treiher treiher added this to To do in RecordFlux 0.5 via automation Dec 1, 2020
@treiher treiher removed the generator Related to generator package (SPARK code generation) label Dec 3, 2020
@treiher
Copy link
Collaborator Author

treiher commented Dec 3, 2020

In a separate discussion we decided to prohibit appending independently created messages to an array for now.

@treiher treiher self-assigned this Dec 4, 2020
@treiher treiher moved this from To do to In progress in RecordFlux 0.5 Dec 4, 2020
treiher added a commit that referenced this issue Dec 4, 2020
@treiher treiher moved this from In progress to Done in RecordFlux 0.5 Dec 4, 2020
treiher added a commit that referenced this issue Dec 4, 2020
RecordFlux 0.5 automation moved this from Done to Merged Dec 7, 2020
treiher added a commit that referenced this issue Dec 7, 2020
@treiher treiher mentioned this issue Aug 4, 2021
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
model Related to model package (e.g., model verification)
Projects
No open projects
RecordFlux 0.5
  
Merged
Development

Successfully merging a pull request may close this issue.

1 participant