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

Use size of static types in expressions #384

Closed
senier opened this issue Aug 3, 2020 · 0 comments · Fixed by #475
Closed

Use size of static types in expressions #384

senier opened this issue Aug 3, 2020 · 0 comments · Fixed by #475
Assignees
Labels
model Related to model package (e.g., model verification) specification Related to specification package (e.g., specification parsing)

Comments

@senier
Copy link
Member

senier commented Aug 3, 2020

To avoid redundancies it may be helpful to refer to the bit size of a static type in an expression, e.g. to check the size field in ARP:

   type IPv4 is
      message
         Hrd : Hardware_Address_Space
            then Pro if Hrd = Hrd_Ethernet;
         Pro : Ethernet.Ether_Type;
         HLn : Address_Length
            then PLn if 8 * HLn = Ethernet.Address'Size; -- need to add a constant 48 here now
         PLn : Address_Length
            then Op if 8 * PLn = IPv4.Address'Size; -- need to add a constant 32 here now
         Op  : Opcode;
         SHA : Ethernet.Address;
         SPA : IPv4.Address;
         THA : Ethernet.Address;
         TPA : IPv4.Address;
      end message;
@senier senier created this issue from a note in RecordFlux 0.5 (To do) Aug 3, 2020
@senier senier added the model Related to model package (e.g., model verification) label Aug 24, 2020
@treiher treiher added the specification Related to specification package (e.g., specification parsing) label Sep 28, 2020
@treiher treiher self-assigned this Oct 22, 2020
@treiher treiher moved this from To do to In progress in RecordFlux 0.5 Oct 22, 2020
@treiher treiher moved this from In progress to Done in RecordFlux 0.5 Oct 23, 2020
@treiher treiher moved this from Done to In progress in RecordFlux 0.5 Oct 23, 2020
treiher added a commit that referenced this issue Oct 23, 2020
@treiher treiher moved this from In progress to Done in RecordFlux 0.5 Oct 23, 2020
RecordFlux 0.5 automation moved this from Done to Merged Oct 26, 2020
treiher added a commit that referenced this issue Oct 26, 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) specification Related to specification package (e.g., specification parsing)
Projects
No open projects
RecordFlux 0.5
  
Merged
2 participants