You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a feature group is used as the end point of a flow specification we allow a flow implementation of that spec to replace the feature group with a specific sub-feature of that feature group. Two things
I don't see in the AADL Specification where there is explicitly allowed.
When we do this, the direction of that sub-feature is not checked to be make sure it is compatible with the direction of the flow.
Expected and Current Behavior
I expect an error message on the flow feature specification indicating that the direction of the feature is wrong. This error is currently produced for non-feature group features in flow specifications. (The feature group is checked to see that contains at least one feature in the correct direction in the flow specification). There is no similar check in the flow implementation for the feature group features.
Steps to Reproduce
Consider the package TEST below:
package TEST
public
thread T1
features
outPort: out event port;
inPort: in event port;
flows
fsrc1: flow source outPort;
fsrc2: flow source inPort; -- WRONG
fsnk1: flow sink outPort; -- WRONG
fsnk2: flow sink inPort;
fpath1: flow path inPort -> outPort;
fpath2: flow path outPort -> inPort; -- WRONG
end T1;
feature group FG
features
outPort: out event port;
inPort: in event port;
end FG;
feature group FG_inverse inverse of FG
end FG_inverse;
thread T2
features
fg: feature group FG;
fg_inv: feature group FG_inverse;
flows
fsrc1a: flow source fg.outPort;
fsrc1b: flow source fg.inPort; -- WRONG
fsrc2a: flow source fg_outPort; -- WRONG
fsrc2b: flow source fg_inv.inPort;
fsnk1a: flow sink fg.outPort; -- WRONG
fsnk1b: flow sink fg.inPort;
fsnk2a: flow sink fg_inv.outPort;
fsnk2b: flow sink fg_inv.inPort; -- WRONG
fpath1a: flow path fg.inPort -> fg_inv.inPort;
fpath1b: flow path fg.outPort -> fg_inv.outPort; -- WRONG
fpath2a: flow path fg_inv.inPort -> fg.inPort; -- WRONG
fpath2b: flow path fg_inv.outPort -> fg.outPort;
end T2;
thread T3
features
fg: feature group FG;
fg_inv: feature group FG_inverse;
flows
fsrc1: flow source fg;
fsrc2: flow source fg_inv;
fsnk1: flow sink fg;
fsnk2: flow sink fg_inv;
fpath1: flow path fg -> fg_inv;
fpath2: flow path fg_inv -> fg;
end T3;
thread implementation T3.rightWay
flows
-- ALL OF THESE ARE CORRECT
fsrc1: flow source fg.outPort;
fsrc2: flow source fg_inv.inPort;
fsnk1: flow sink fg.inPort;
fsnk2: flow sink fg_inv.outPort;
fpath1: flow path fg.inPort -> fg_inv.inPort;
fpath2: flow path fg_inv.outPort -> fg.outPort;
end T3.rightWay;
thread implementation T3.wrongWay
flows
-- ALL OF THESE ARE WRONG
fsrc1: flow source fg.inPort;
fsrc2: flow source fg_inv.outPort;
fsnk1: flow sink fg.outPort;
fsnk2: flow sink fg_inv.inPort;
fpath1: flow path fg.outPort -> fg_inv.outPort;
fpath2: flow path fg_inv.inPort -> fg.inPort;
end T3.wrongWay;
end TEST;
Currently, there are error messages on
fsrc2, fsnk2, and fpath2 in thread T1. These is expected because they name features that have the wrong direction. These are errors on flow specifications.
fsrc1b, fsrc2a, fsnk1a, fsnk2b, fpath1b, and fpath2a In thread T2 because they name feature group sub-features that have the wrong direction. These are errors on flow specifications.
I expect, but do not have, errors on all the flow implementations in T3.wrongWay.
The text was updated successfully, but these errors were encountered:
I am a bit confused why the flow path fpath1b in thread T2 is wrong but the flow path fpath1 in T3.rightway is supposed to be correct, when they appear to be the same.
Edit: fixed "Steps to Reproduce" to correct this issue
Summary
When a feature group is used as the end point of a flow specification we allow a flow implementation of that spec to replace the feature group with a specific sub-feature of that feature group. Two things
Expected and Current Behavior
I expect an error message on the flow feature specification indicating that the direction of the feature is wrong. This error is currently produced for non-feature group features in flow specifications. (The feature group is checked to see that contains at least one feature in the correct direction in the flow specification). There is no similar check in the flow implementation for the feature group features.
Steps to Reproduce
Consider the package
TEST
below:Currently, there are error messages on
fsrc2
,fsnk2
, andfpath2
in threadT1
. These is expected because they name features that have the wrong direction. These are errors on flow specifications.fsrc1b
,fsrc2a
,fsnk1a
,fsnk2b
,fpath1b
, andfpath2a
In threadT2
because they name feature group sub-features that have the wrong direction. These are errors on flow specifications.I expect, but do not have, errors on all the flow implementations in
T3.wrongWay
.The text was updated successfully, but these errors were encountered: