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 noerror on events #2817

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

Missing validation for noerror on events #2817

joeseibel opened this issue Jun 7, 2022 · 0 comments

Comments

@joeseibel
Copy link
Contributor

When a transition condition uses the keyword noerror, the standard's syntax definition shows that noerror should only be used with propagations and not with events. In section E.8, the standard has the error_condition_trigger grammar rule:

error_condition_trigger ::=
  error_behavior_event_identifier [ error_type_set ]
  | [ in ] incoming_error_propagation_point [ error_type_set_or_noerror ]
  | subcomponent_identifier . outgoing_error_propagation_point [ error_type_set_or_noerror ]

Note that the rule error_type_set_or_noerror only appears after an incoming propagation or an outgoing propagation in a subcomponent. It does not appear after an event, which instead uses the rule error_type_set.

However, the EMV2 grammar within OSATE permits noerror after an event. We should leave the grammar and meta-model as is and instead check this in the validator. The validator should mark an error in the following model:

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

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

      component error behavior
        events
          error1: error event {CommonErrors};
          error2: error event {CommonErrors};
        transitions
          --Valid
          transition1: state1 -[f1 {ServiceError} and f2 {noerror}]-> state2;
          --Not valid
          transition2: state1 -[error1 {ServiceError} and error2 {noerror}]-> state2;
      end component;
    **};
  end s;

  annex EMV2 {**
    error behavior machine1
      states
        state1: initial state;
        state2: state;
    end behavior;
  **};
end missing_validation;
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