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

Boolean literals not correctly expanded for message types #388

Closed
senier opened this issue Aug 6, 2020 · 3 comments · Fixed by #391
Closed

Boolean literals not correctly expanded for message types #388

senier opened this issue Aug 6, 2020 · 3 comments · Fixed by #391
Assignees
Labels
bug model Related to model package (e.g., model verification)

Comments

@senier
Copy link
Member

senier commented Aug 6, 2020

package Test is
   type M1
      is message
         X : Boolean
            then null
               if X = True;
      end message;

   type M2
      is message
         Y : M1;
      end message;
end Test;
$ rflx check test.rflx 
Parsing test.rflx
Processing Test
model: error: undefined variable "Test.True" referenced
@senier senier created this issue from a note in RecordFlux 0.5 (To do) Aug 6, 2020
@treiher treiher added bug specification Related to specification package (e.g., specification parsing) labels Aug 7, 2020
@treiher treiher self-assigned this Aug 7, 2020
@treiher treiher moved this from To do to In progress in RecordFlux 0.5 Aug 7, 2020
@treiher
Copy link
Collaborator

treiher commented Aug 7, 2020

Interpreting True and False as real boolean literals in the model leads to problems during code generation, as the expressions are not type-checked (#87). A workaround would be to interpret them as numbers 1 and 0.

@senier
Copy link
Member Author

senier commented Aug 10, 2020

Then we should do that (and mark it as workaround0 until we have type checking.

@treiher
Copy link
Collaborator

treiher commented Aug 10, 2020

The issue is much simpler than I thought on Friday. No workaround is needed.

treiher added a commit that referenced this issue Aug 10, 2020
@treiher treiher moved this from In progress to Ready in RecordFlux 0.5 Aug 10, 2020
RecordFlux 0.5 automation moved this from Ready to Merged Aug 10, 2020
treiher added a commit that referenced this issue Aug 10, 2020
@treiher treiher added model Related to model package (e.g., model verification) and removed specification Related to specification package (e.g., specification parsing) labels Aug 10, 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.

2 participants