saeaadl / emv2

AADL Error Model V2 annex language
0 stars 0 forks source link

Inconsistent rules about references from propagation paths to propagation points #68

Open joeseibel opened 2 years ago

joeseibel commented 2 years ago

When a propagation path refers to a propagation point, does the reference have to be to a point in a subcomponent or can the reference also be to a point in the same component as the path? Is the following legal?

package StandardIssue
public
  system s
  end s;

  system implementation s.i
    subcomponents
      sub: system sub;
    annex EMV2 {**
      propagation paths
        point1: propagation point;

        path1: point1 -> sub.point2;
      end paths;
    **};
  end s.i;

  system sub
    annex EMV2 {**
      propagation paths
        point2: propagation point;
      end paths;
    **};
  end sub;
end StandardIssue;

Is the reference from path1 to point1 legal? The syntax definition in E.7.3 states that it is not legal and that the reference must include at least one subcomponent. Here is the relevant syntax definition:

propagation_path ::=
    defining_observable_propagation_path_identifier : 
     source_qualified_propagation_point -> 
       target_qualified_propagation_point ;

qualified_propagation_point ::=
    { subcomponent_identifier . }+ propagation_point_identifier

Note the + which requires one or more subcomponent_identifier.

However, Naming Rule (N39) states the opposite and allows a reference to a propagation point on the same level as the path without referencing a subcomponent. (N39) says, "The qualified propagation point reference in a propagation path declaration must exist in the Error Model subclause namespace of the component classifier of the qualifying subcomponent, if present, or in the namespace of the Error Model subclause containing the propagation path declaration." If this statement were true, I would have expected to see a * instead of a + in the syntax rule.

Which rule is correct? The syntax definition or (N39)?

brlarson commented 1 year ago

Change to *