Open lwrage opened 4 years ago
As discussed in Toulouse, editorial, please propose an update to the grammar.
The current rule is
flow_feature_identifier ::=
feature_identifier
| feature_group_identifier
| feature_group_identifier . feature_identifier
| feature_group_identifier . feature_group_identifier
| subprogram_access_identifier . parameter_identifier
There's a comment in Peter's document version that the parameter identifier should be optional, and for #29 it needs to be changed, too:
flow_feature_identifier ::=
{ feature_group_identifier . }* feature_identifier
| { feature_group_identifier . }* feature_group_identifier
| subprogram_access_identifier [ . parameter_identifier ]
On each level there can be (one dimensional) arrays of features. To reach into an array we need to be able to optionally specify an array index.
flow_feature_identifier ::=
{ feature_group_identifier [ array_dimension ] . }*
( feature_identifier | feature_group_identifier) [ array_dimension ]
| subprogram_access_identifier [ array_dimension ]
[ . parameter_identifier [ array_dimension ] ]
This is different from connections, where array indices are given as property values.
~Making properties Connection_Pattern
and Connection_Set
applicable to flows and using these properties to select the indices does not work because flow implementations cannot have property associations.~ The previous sentence is not relevant as it only necessary to allow array indices in flow specifications.
Proposed resolution
I have completed a prototype implementation.
package P1
public
feature group fgt1
features
fg2: feature group fgt2;
end fgt1;
feature group fgt2
features
f3: in feature;
end fgt2;
system S
end S;
system implementation S.i
subcomponents
p: system producer;
sub: system S1;
c: system consumer;
connections
c1: feature group p.fg1 -> sub.fg1;
c2: feature group p.fg2 -> sub.fg2;
c3: feature p.f3 -> sub.f3;
c4: port sub.fo -> c.fi;
flows
e1: end to end flow p -> c3 -> sub.fp3 -> c4 -> c;
end S.i;
system S1
features
fg1: feature group fgt1;
fg2: feature group fgt2[3];
f3: in feature;
fo: out data port[3];
flows
fp1: flow path f3 -> fo[1];
fp2: flow path fg2[2].f3 -> fo[2];
fp3: flow path fg1.fg2.f3 -> fo[3];
end S1;
system producer
features
fg1: feature group inverse of fgt1;
fg2: feature group inverse of fgt2[3];
f3: out feature;
end producer;
system consumer
features
fi: in data port[3];
end consumer;
end P1;
However, with the proposal above, flow specifications would be the only place in AADL outside of property associations where we use indices directly to refer too array elements. (In OSATE this would require significant changes to the graphical editor.)
For consistency it would be preferable to specify array indices using properties, similar to how it is done for connections. This is possible because it is sufficient to allow array indices for flow specifications in leaf elements and flow specifications can have property associations.
[ ] Document the approach with a property in the standard
Evaluate impact on OSATE and document whether this is supported or not in the flow latency analysis
Such change would break the graphical editor.
Option to use properties has been added to the document by Lutz
The syntax rule
flow_feature_identifier
doesn't allow array indices. There is also no property that would allow declaration of a flow spec pattern (exists for connections only).