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

Exception transition rejected on message assignment #1144

Closed
jklmnn opened this issue Aug 19, 2022 · 0 comments · Fixed by #1253
Closed

Exception transition rejected on message assignment #1144

jklmnn opened this issue Aug 19, 2022 · 0 comments · Fixed by #1253
Assignees
Labels
bug model Related to model package (e.g., model verification) small Effort of one person-day or less

Comments

@jklmnn
Copy link
Member

jklmnn commented Aug 19, 2022

The state Start in the following spec assigns the return value of a function call to a message variable. This message can be invalid yet the model checker complains that there is an unneeded exception transition:

package Test is

   type Data is range 0 .. 255 with Size => 8;

   type Message is
      message
         D : Data
            then null
               if D = 42;
      end message;

   generic
      with function Get_Message return Message;
   session Session with
      Initial => Start,
      Final => Terminated
   is
   begin
      state Start
      is
         Msg : Message;
      begin
         Msg := Get_Message;
      transition
         goto Process
            if Msg.D = 0
         goto Terminated
      exception
         goto Error
      end Start;

      state Process
      is
      begin
      transition
         goto Terminated
      end Process;

      state Error
      is
      begin
      transition
         goto Terminated
      end Error;

      state Terminated is null state;
   end Session;

end Test;
Parsing test.rflx
Processing Test
test.rflx:29:10: model: error: unnecessary exception transition in state "Start"
@jklmnn jklmnn added bug model Related to model package (e.g., model verification) labels Aug 19, 2022
@jklmnn jklmnn added this to To do in RecordFlux 0.6 via automation Aug 19, 2022
@senier senier removed this from To do in RecordFlux 0.6 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 30, 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 To do in RecordFlux 0.7.1 via automation Sep 29, 2022
@senier senier removed this from To do in RecordFlux 0.7.1 Oct 4, 2022
@senier senier added this to Medium in RecordFlux Future via automation 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 Medium in RecordFlux Future 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 jklmnn moved this from To do to Implementation in RecordFlux 0.8 Nov 10, 2022
@jklmnn jklmnn self-assigned this Nov 10, 2022
jklmnn added a commit that referenced this issue Nov 10, 2022
@treiher treiher moved this from Implementation to Review in RecordFlux 0.8 Nov 10, 2022
RecordFlux 0.8 automation moved this from Review to Done Nov 10, 2022
jklmnn added a commit that referenced this issue Nov 10, 2022
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) small Effort of one person-day or less
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants