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

Detection of always True conditions #662

Closed
treiher opened this issue May 11, 2021 · 1 comment · Fixed by #1258
Closed

Detection of always True conditions #662

treiher opened this issue May 11, 2021 · 1 comment · Fixed by #1258
Assignees
Labels
model Related to model package (e.g., model verification) small Effort of one person-day or less

Comments

@treiher
Copy link
Collaborator

treiher commented May 11, 2021

Show an error for always True conditions in message links and refinements.

Example

package Test is

   type Protocol is (PROTO_X) with Size => 8;

   type M is
      message
         Protocol : Protocol;
         Data : Opaque
            with Size => 0;
      end message;

   type X is null message;

   for M use (Data => X)
      if Protocol = PROTO_X;

end Test;

It should be detected that Protocol = PROTO_X is always True, as Protocol has only one value.

@treiher treiher added the model Related to model package (e.g., model verification) label May 11, 2021
@treiher treiher added this to To do in RecordFlux 0.7 via automation May 11, 2021
@senier senier removed this from To do in RecordFlux 0.7 Aug 23, 2022
@senier senier added this to To do in RecordFlux Future via automation Aug 23, 2022
@senier senier added the small Effort of one person-day or less label Aug 25, 2022
@senier senier removed this from Medium in RecordFlux Future Aug 30, 2022
@senier senier added this to To do in RecordFlux 0.7 via automation Aug 30, 2022
@senier senier removed this from To do in RecordFlux 0.7 Sep 29, 2022
@senier senier added this to Medium in RecordFlux Future via automation Sep 29, 2022
@senier senier removed this from Medium in RecordFlux Future Oct 4, 2022
@senier senier added this to To do in RecordFlux 0.7.1 via automation Oct 4, 2022
@senier senier removed this from To do in RecordFlux 0.7.1 Nov 1, 2022
@senier senier added this to To do in RecordFlux 0.8 via automation Nov 1, 2022
@jklmnn
Copy link
Member

jklmnn commented Nov 14, 2022

Clarification: Always true conditions should be detected in all cases (not just on refinements). If detected they should throw an error. If we notice at some point that an error is too restrictive, we may replace it with a warning.

@jklmnn jklmnn self-assigned this Nov 14, 2022
@jklmnn jklmnn moved this from To do to Implementation in RecordFlux 0.8 Nov 14, 2022
jklmnn added a commit that referenced this issue Nov 14, 2022
jklmnn added a commit that referenced this issue Nov 15, 2022
jklmnn added a commit that referenced this issue Nov 15, 2022
jklmnn added a commit that referenced this issue Nov 22, 2022
jklmnn added a commit that referenced this issue Nov 22, 2022
jklmnn added a commit that referenced this issue Nov 24, 2022
jklmnn added a commit that referenced this issue Nov 24, 2022
jklmnn added a commit that referenced this issue Nov 24, 2022
RecordFlux 0.8 automation moved this from Implementation to Done Nov 24, 2022
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) small Effort of one person-day or less
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants