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 CompositeState.typedToken #2858

Open
joeseibel opened this issue Dec 12, 2022 · 0 comments
Open

Missing validation for CompositeState.typedToken #2858

joeseibel opened this issue Dec 12, 2022 · 0 comments

Comments

@joeseibel
Copy link
Contributor

When a composite state 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 product should be permitted. The following model should have errors:

package missing_validation
public
  system s
    features
      f1: in feature;
      f2: in feature;
    annex EMV2 {**
      use types ErrorLibrary;
      use behavior missing_validation::machine1;

      error propagations
        f1: in propagation {CommonErrors};
        f2: in propagation {CommonErrors};
      end propagations;

      composite error behavior
        states
          composite1: [in f1]-> state1 {ServiceError, ItemTimingError};
          composite2: [in f2]-> state2 {CommonErrors};
      end composite;
    **};
  end s;

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

There should be an error on composite1 because it lists multiple types and there should be an error on composite2 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