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

Size attribute is ambiguous #480

Closed
treiher opened this issue Oct 27, 2020 · 0 comments · Fixed by #481
Closed

Size attribute is ambiguous #480

treiher opened this issue Oct 27, 2020 · 0 comments · Fixed by #481
Assignees
Labels
bug model Related to model package (e.g., model verification)

Comments

@treiher
Copy link
Collaborator

treiher commented Oct 27, 2020

The 'Size attribute can be used to refer to the size of a composite field as well as to the size of a message field (since #384). As field and type names are not necessarily unique, this can lead to conflicts:

package Test is

   type T is mod 2**8;

   type M is
      message
         A : T;
         T : Opaque
            with Size => 16;
      end message;

end Test;
model: error: contradicting condition in "Test::M"
test.rflx:7:10: model: info: on path: "A"
test.rflx:8:10: model: info: on path: "T"
test.rflx:9:26: model: info: unsatisfied "T'Size = 16"
model: info: unsatisfied "T'Size = 8"

Changes

  1. Only allow using fully-qualified type names to prevent such conflicts (e.g., Test::T).
  2. Allow using 'Size attribute for all message fields regardless of field type.
@treiher treiher added bug model Related to model package (e.g., model verification) labels Oct 27, 2020
@treiher treiher added this to To do in RecordFlux 0.5 via automation Oct 27, 2020
@treiher treiher moved this from To do to In progress in RecordFlux 0.5 Oct 28, 2020
@treiher treiher self-assigned this Oct 28, 2020
@treiher treiher moved this from In progress to Done in RecordFlux 0.5 Oct 28, 2020
treiher added a commit that referenced this issue Oct 28, 2020
RecordFlux 0.5 automation moved this from Done to Merged Oct 28, 2020
treiher added a commit that referenced this issue Oct 28, 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
bug 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