saeaadl / aadlv2.2

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

Impossible to specify flow implementation through certain subprogram calls #60

Open lwrage opened 3 years ago

lwrage commented 3 years ago

In the model below it is possible to specify the call using just a subprogram type, but it is impossible to define a flow implementation that goes through this subprogram via the call.

(The flow can be defined if the call is to a subprogram subcomponent. In that case the subprogram subcomponent must be referenced in the flow implementation.)

package P
public

    thread T
        features
            i: in data port;
            o: out data port;
        flows
            fl: flow path i -> o;
    end T;

    thread implementation T.i
        calls
            seq: {
                cl: subprogram SP;
            };
        connections
            pc1: parameter i -> cl.pi;
            pc2: parameter cl.po -> o;
        flows
            -- cannot specify flow through called subprogram
            -- both of the following are not allowed
            fl: flow path i -> pc1 -> cl -> pc2 -> o;
            fl: flow path i -> pc1 -> cl.fp -> pc2 -> o;
    end T.i;

    subprogram SP
        features
            pi: in parameter;
            po: out parameter;
        flows
            fp: flow path pi -> po;
    end SP;
end P;
jjhugues commented 3 years ago

Indeed. Call sequences are breaking regular abstractions in the AADL component model, it was suggested to remove them for v3. Similarly, subprograms referenced through entrypoints could obviously not be part of a flow. Therefore, you cannot build a flow to evaluate e.g. the latency for a recovery situation (through a Recover_Entrypoint).

Is there a suggested correction here? This limit exists since AADLv1, so I am curious on how critical this issue is

jjhugues commented 3 years ago

Work around is to use subprogram subcomponent. Note also that OSATE does not instantiate call sequences, so flow analysis tools would not process this part either.