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

Contradiction check too strict #277

Closed
treiher opened this issue Jun 5, 2020 · 0 comments · Fixed by #278
Closed

Contradiction check too strict #277

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

Comments

@treiher
Copy link
Collaborator

treiher commented Jun 5, 2020

The check for contradicting conditions seems to be too strict. I see no reason why the model shown below should not be accepted.

package Test is

   type F0 is (A, B, C, D) with Size => 8;
   type Value is mod 2**16;

   type Message is
      message
         F0    : F0
            then F1
               if F0 = A,
            then F2
               if F0 = B;
         F1 : Value
            then F3;
         F2 : Value;
         F3 : Value
            then F4
               if F0 = A,
            then F5
               if F0 = B;
         F4 : Value
            then null;
         F5 : Value;
       end message;

end Test;

Test_Message

rflx: model error: contradicting condition 0 from field "F3" to "F4" on path [F0 -> F2 -> F3] in "Test.Message" (B = 1
   ∧ A = 0
   ∧ F0 = B
   ∧ F0 = A)
@treiher treiher added model Related to model package (e.g., model verification) bug labels Jun 5, 2020
@treiher treiher added this to To do in RecordFlux 0.5 Jun 6, 2020
senier pushed a commit that referenced this issue Jun 6, 2020
senier pushed a commit that referenced this issue Jun 6, 2020
@senier senier added this to In progress in RecordFlux 0.4.1 Jun 6, 2020
@senier senier removed this from To do in RecordFlux 0.5 Jun 6, 2020
@senier senier self-assigned this Jun 6, 2020
senier pushed a commit that referenced this issue Jun 6, 2020
RecordFlux 0.4.1 automation moved this from In progress to Done Jun 8, 2020
senier pushed a commit that referenced this issue Jun 8, 2020
senier pushed a commit that referenced this issue Jun 24, 2020
The fix for #277 was actually not proper, as any contradiction would
be flagged as an error. However, as long as there is at least one
non-contradictory path, we cannot treat a field condition as
contradictory.

This problem occurred in the test, but was not discovered as the test
was missing a error.propagate() call after message construction. This
was noticed when making Message constructors raise exceptions again in
the discussion of #285.

Ref. #248
@senier senier mentioned this issue Jun 24, 2020
senier pushed a commit that referenced this issue Jun 25, 2020
The fix for #277 was actually not proper, as any contradiction would
be flagged as an error. However, as long as there is at least one
non-contradictory path, we cannot treat a field condition as
contradictory.

This problem occurred in the test, but was not discovered as the test
was missing a error.propagate() call after message construction. This
was noticed when making Message constructors raise exceptions again in
the discussion of #285.

Ref. #248
senier pushed a commit that referenced this issue Jun 25, 2020
The fix for #277 was actually not proper, as any contradiction would
be flagged as an error. However, as long as there is at least one
non-contradictory path, we cannot treat a field condition as
contradictory.

This problem occurred in the test, but was not discovered as the test
was missing a error.propagate() call after message construction. This
was noticed when making Message constructors raise exceptions again in
the discussion of #285.

Ref. #248
@treiher treiher mentioned this issue Jul 14, 2020
4 tasks
treiher pushed a commit that referenced this issue Jul 23, 2020
treiher pushed a commit that referenced this issue Jul 23, 2020
The fix for #277 was actually not proper, as any contradiction would
be flagged as an error. However, as long as there is at least one
non-contradictory path, we cannot treat a field condition as
contradictory.

This problem occurred in the test, but was not discovered as the test
was missing a error.propagate() call after message construction. This
was noticed when making Message constructors raise exceptions again in
the discussion of #285.

Ref. #248
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