saeaadl / aadlv2.2

SAE AADL core language, version 2.2
1 stars 0 forks source link

Is a subcomponent flow identifier required to have .path or not? #13

Open stevevestal opened 7 years ago

stevevestal commented 7 years ago

For a subcomponent in the middle of a flow, e.g. src -> c1 -> subc -> c2 -> snk, the grammar and some paragraphs allow either subc or subc.path. For example:

"(N3) The subcomponent flow identifier of a flow implementation must name a subcomponent and optionally a flow specification in the component type of the named subcomponent, or it must name a data component in the form of a data subcomponent, provides data access, or requires data access."

"(4) A flow implementation may refer to subcomponents without identifying a flow specification in the subcomponent. In this case, (a) an unnamed flow specification is assumed to exist from the destination port of the preceding connection to the source port of the succeeding connection if no flow specification is declared for the subcomponent, (b) it represents a separate flow for each of the flow specifications of the subcomponent."

"(3) An end-to-end flow may refer to subcomponents without identifying a flow specification. In this case, the flow specification (a) refers to an unnamed flow specification from the destination port of the preceding connection and the source port of the succeeding connection if the subcomponent has no declared flow specification, or (b) represents a separate end-to-end flow for each of the flow specifications of the subcomponent."

However, there is also the rule

"(N6) In all other cases the subcomponent flow identifier must refer to a flow path or a data component."

and OSATE 2.2.2 issues an error message (even when subc has no flow path declared in its type).

N6 seems to conflict with the other three. (The "other cases" either refer narrowly to N5 and N4 having to do with source and sink, or more broadly including N3 which which it seems to conflict.)

joeseibel commented 7 years ago

Steve, I think you probably stumbled upon the fix for osate/osate2-core#345. Look at the error message that OSATE produces. Does it complain about a connection continuing inside a subcomponent?

stevevestal commented 7 years ago
Yes, seeing that error message from OSATE is what triggered this
  escapade.  But while chasing down that problem I looked at the
  standard, and I thought N6 was still somewhat confusing and
  contradictory.  Hence a note to the standards errata but not an
  OSATE issue report.
jjhugues commented 3 years ago

After discussion with Lutz, the following has been captured in 10.2

(N4) In case of a flow source implementation the flow identifier of the first subcomponent must refer to a flow source, a data component , or a subprogram component. (N5) In case of a flow sink implementation the flow identifier of the last subcomponent must refer to a flow sink, a data component, or a subprogram component. (N6) In all other cases the subcomponent flow identifier must refer to a subcomponent, a flow path, a data component , or subprogram component

(see other issue #39 )