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

Missing validation for TransitionBranch.targetToken #2814

Open
joeseibel opened this issue Jun 1, 2022 · 0 comments
Open

Missing validation for TransitionBranch.targetToken #2814

joeseibel opened this issue Jun 1, 2022 · 0 comments

Comments

@joeseibel
Copy link
Contributor

When a transition branch refers to a target state and specifies error types in curly braces, the validator should check that there is only one type token specified. The meta-model and grammar allow a type set with multiple types, but only one type or type product should be permitted. This is checked for ErrorBehaviorTransition.targetToken and ErrorPath.targetToken, but not TransitionBranch.targetToken. The following model should have errors:

package missing_validation
public
  system s
  end s;

  system implementation s.i
    annex EMV2 {**
      use types ErrorLibrary;
      use behavior missing_validation::machine1;

      component error behavior
        events
          event1: error event;
        transitions
          state1 -[event1]-> (
            state2 {ServiceError, ItemTimingError} with 0.4,
            state3 {CommonErrors} with 0.6
          );
      end component;
    **};
  end s.i;

  annex EMV2 {**
    error behavior machine1
      use types ErrorLibrary;
        states
          state1: initial state;
          state2: state {CommonErrors};
          state3: state {CommonErrors};
    end behavior;
  **};
end missing_validation;

There should be an error for the branch to state2 because it lists multiple types and there should be an error for the branch to state3 because CommonErrors is a type set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant