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

Allow with-clause without then-clause to define field length #343

Closed
treiher opened this issue Jul 16, 2020 · 0 comments · Fixed by #466
Closed

Allow with-clause without then-clause to define field length #343

treiher opened this issue Jul 16, 2020 · 0 comments · Fixed by #466
Assignees
Labels
specification Related to specification package (e.g., specification parsing)

Comments

@treiher
Copy link
Collaborator

treiher commented Jul 16, 2020

Being able to directly define the field length at the specific field could simplify the specification in cases, where the length of the field does not depend on any condition, but multiple paths exist (i.e. multiple incoming edges contain the same length aspect). Such a length specification should be internally translated into length aspects at all incoming edges. No incoming edge should be allowed to have a length aspect in such a case. In #95 we already thought about introducing a similar feature for conditions.

Examples

TLS

         Verify_Data : Opaque
            with Length => Message'Length;

Instead of:

         null
            then Verify_Data
               with Length => Message'Length;
         Verify_Data : Opaque;

IPv4

         [...]
         Destination : Address
            then Payload
               if IHL = 5,
            then Options
               with Length => IHL * 32 - (5 * 32)
               if IHL > 5;
         Options : Options;
         Payload : Opaque
            with Length => Total_Length * 8 - (IHL * 32);

Instead of:

         [...]
         Destination : Address
            then Payload
               with Length => Total_Length * 8 - (IHL * 32)
               if IHL = 5,
            then Options
               with Length => IHL * 32 - (5 * 32)
               if IHL > 5;
         Options : Options
            then Payload
               with Length => Total_Length * 8 - (IHL * 32);
         Payload : Opaque;
@treiher treiher added the specification Related to specification package (e.g., specification parsing) label Jul 16, 2020
@treiher treiher added this to To do in RecordFlux Future via automation Jul 16, 2020
@treiher treiher added this to To do in RecordFlux 0.5 via automation Jul 16, 2020
@treiher treiher removed this from To do in RecordFlux Future Jul 16, 2020
@treiher treiher moved this from To do to In progress in RecordFlux 0.5 Oct 7, 2020
@treiher treiher self-assigned this Oct 7, 2020
@treiher treiher moved this from In progress to Done in RecordFlux 0.5 Oct 7, 2020
treiher added a commit that referenced this issue Oct 14, 2020
treiher added a commit that referenced this issue Oct 14, 2020
treiher added a commit that referenced this issue Oct 19, 2020
treiher added a commit that referenced this issue Oct 19, 2020
treiher added a commit that referenced this issue Oct 19, 2020
treiher added a commit that referenced this issue Oct 19, 2020
RecordFlux 0.5 automation moved this from Done to Merged Oct 19, 2020
treiher added a commit that referenced this issue Oct 19, 2020
treiher added a commit that referenced this issue Oct 19, 2020
treiher added a commit that referenced this issue Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
specification Related to specification package (e.g., specification parsing)
Projects
No open projects
RecordFlux 0.5
  
Merged
Development

Successfully merging a pull request may close this issue.

1 participant