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

Missing check for naming conflicts between field names and literals #309

Closed
treiher opened this issue Jun 29, 2020 · 2 comments · Fixed by #323
Closed

Missing check for naming conflicts between field names and literals #309

treiher opened this issue Jun 29, 2020 · 2 comments · Fixed by #323
Assignees
Labels
bug model Related to model package (e.g., model verification)

Comments

@treiher
Copy link
Collaborator

treiher commented Jun 29, 2020

package Test is

   type C is (A => 206, B => 183) with Size => 54, Always_Valid => True;
   type D is range 48 .. 54 with Size => 6;
   type E is
      message
         A : C;
         B : D;
      end message;

end Test;
model: error: contradicting condition in "Test.E"
tmp/test.rflx:3:4: model: info: unsatisfied "B = 183"
tmp/test.rflx:4:4: model: info: unsatisfied "B <= 54"
model: error: contradicting condition in "Test.E"
tmp/test.rflx:7:10: model: info: on path: "A"
tmp/test.rflx:3:4: model: info: unsatisfied "B = 183"
tmp/test.rflx:4:4: model: info: unsatisfied "B <= 54"
model: error: contradicting condition in "Test.E"
tmp/test.rflx:7:10: model: info: on path: "A"
tmp/test.rflx:8:10: model: info: on path: "B"
tmp/test.rflx:3:4: model: info: unsatisfied "B = 183"
tmp/test.rflx:4:4: model: info: unsatisfied "B <= 54"
@treiher treiher added this to To do in RecordFlux 0.4.1 via automation Jun 29, 2020
@treiher treiher added model Related to model package (e.g., model verification) bug labels Jun 29, 2020
@senier
Copy link
Member

senier commented Jun 29, 2020

I don't think this is just an unclear error message. Rather we seem not to detect the conflict between field name and literal at all. The error just happens to be detected by coincidence - if e.g. type D had a range of 183..183 bad things will happen further down the road.

@treiher treiher changed the title Unclear error message for naming conflicts between field names and literals Missing check for naming conflicts between field names and literals Jun 29, 2020
@treiher
Copy link
Collaborator Author

treiher commented Jun 29, 2020

You are right. I have changed the issue title.

@treiher treiher mentioned this issue Jul 1, 2020
26 tasks
@treiher treiher self-assigned this Jul 3, 2020
@treiher treiher moved this from To do to In progress in RecordFlux 0.4.1 Jul 3, 2020
RecordFlux 0.4.1 automation moved this from In progress to Done Jul 7, 2020
@treiher treiher mentioned this issue Jul 14, 2020
4 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
Development

Successfully merging a pull request may close this issue.

2 participants