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

Incorrect inverse by EMV2 validator #1735

Closed
joeseibel opened this issue Mar 11, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@joeseibel
Copy link
Contributor

commented Mar 11, 2019

When a propagation refers to a feature in a feature group type and the type has an inverse of statement, but the feature is not in the inverted feature group type, the EMV2 validator incorrectly inverts the feature.

The following model is valid, but an error is reported for the propagation fg1.out_port1. The propagation fg2.in_port2 is included as an example of the validator correctly inverting a feature. The difference is that in_port2 is in an inverted feature group type while out_port1 is in a feature group type that is not inverted, but is an inverse of another feature group type.

package inverse_bug
public
  feature group a
    features
      in_port1: in data port;
  end a;

  feature group b
    features
      out_port1: out data port;
    inverse of a
  end b;

  feature group c
    features
      in_port2: in data port;
  end c;

  feature group d
    inverse of c
  end d;

  system s
    features
      fg1: feature group b;
      fg2: feature group d;
    annex EMV2 {**
      error propagations
        -- Error message: Propagation 'fg1.out_port1' direction does not match feature direction.
        fg1.out_port1: out propagation {ErrorLibrary::AboveRange};
        fg2.in_port2: out propagation {ErrorLibrary::AboveRange};
      end propagations;
    **};
  end s;
end inverse_bug;

The problem is in EMV2Util.getErrorPropagationFeatureDirection(ErrorPropagation).

@lwrage lwrage added the backlog label Mar 15, 2019

@lwrage lwrage added next and removed backlog labels Mar 21, 2019

@lwrage lwrage added this to the 2.5.0 milestone Mar 27, 2019

@ghost ghost added in progress and removed next labels Apr 3, 2019

@ghost ghost added review and removed in progress labels Apr 3, 2019

@lwrage lwrage closed this in #1768 Apr 18, 2019

@ghost ghost removed the review label Apr 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.