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

Non-null state accepted as final state #1130

Closed
treiher opened this issue Aug 4, 2022 · 3 comments · Fixed by #1192
Closed

Non-null state accepted as final state #1130

treiher opened this issue Aug 4, 2022 · 3 comments · Fixed by #1192
Assignees
Labels
bug model Related to model package (e.g., model verification)

Comments

@treiher
Copy link
Collaborator

treiher commented Aug 4, 2022

The following session specification must not be accepted, as the final state is not a null state. A final state is never executed, so it doesn't make sense to define actions or transitions for it.

package Test is

   type T is mod 2 ** 16;

   type Message is
      message
         F : T;
      end message;

   generic
      Input : Channel with Readable;
      Output : Channel with Writable;
   session Validator with
      Initial => Validate,
      Final => Forward
   is
      Message : Test::Message;
   begin
      state Validate
      is
      begin
         Input'Read (Message);
      transition
         goto Forward
            if Message'Valid
         goto Validate
      end Validate;

      state Forward
      is
      begin
         Output'Write (Message);
      transition
         goto Validate
      end Forward;
   end Validator;

end Test;
@treiher treiher added bug model Related to model package (e.g., model verification) labels Aug 4, 2022
@treiher treiher added this to To do in RecordFlux 0.6 via automation Aug 4, 2022
@senier
Copy link
Member

senier commented Aug 4, 2022

This raises the question what we do with sessions that don't end (e.g. a proxy)?

@treiher
Copy link
Collaborator Author

treiher commented Aug 4, 2022

I think we should implement #700 where we decided to remove the need for an explicit definition of a final state.

@senier
Copy link
Member

senier commented Aug 4, 2022

I forgot about #700 - I agree.

@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
@treiher treiher removed this from Medium in RecordFlux Future Sep 19, 2022
@treiher treiher added this to To do in RecordFlux 0.7 via automation Sep 19, 2022
@treiher treiher self-assigned this Sep 19, 2022
@treiher treiher moved this from To do to Implementation in RecordFlux 0.7 Sep 19, 2022
@treiher treiher moved this from Implementation to Review in RecordFlux 0.7 Sep 19, 2022
RecordFlux 0.7 automation moved this from Review to Done Sep 22, 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)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants