osate / osate2

Open Source AADL2 Tool Environment
http://osate.org
Eclipse Public License 2.0
35 stars 8 forks source link

Flow instantiation silently fails when subcomponents have connections but not flow implementations #2872

Open smithdtyler opened 1 year ago

smithdtyler commented 1 year ago

Summary When instantiating a system implementation with an end to end flow, the flow does not get generated in the .aaxl2 file if a subcomponent of one of the flow elements has an implementation with connections but not flow implementations.

Expected behavior OSATE should either generate the end to end flow, or should report an error in the instantiation results dialog.

Actual behavior Instantiation reports no issues, but the end to end flow is absent from the instance file.

Steps To Reproduce

The model below fails to generate an end to end flow instantiation. Uncomment the flow implementations and the flow appears.

package flowdemo
public

    system integration

    end integration;

    system implementation integration.impl
        subcomponents
            a : system example.impl;
            b : system example.impl;
        connections
            ab : feature a.outy -> b.inny;
        flows
            fab : end to end flow a.fouty -> ab -> b.finny;
    end integration.impl;

    system example
        features 
            outy: feature group;
            inny: feature group;
        flows
            fouty: flow source outy;
            finny: flow sink inny;
    end example;

    system implementation example.impl
        subcomponents
            a : process ex_proc.impl;
            b : process ex_proc.impl;       

        connections
            couty: feature a.outy <-> outy;
            cinny: feature inny -> b.inny;

--      flows
--          fouty: flow source a.fouty-> couty -> outy;
--          finny: flow sink inny -> cinny -> b.finny;
    end example.impl;

    process ex_proc
        features
            outy: feature group;
            inny: feature group;
        flows
            fouty: flow source outy;
            finny: flow sink inny;
    end ex_proc;

    process implementation ex_proc.impl
    end ex_proc.impl;

end flowdemo;

Desktop (please complete the following information):

lwrage commented 2 weeks ago

Unfortunately, it is surprisingly difficult to add an error message for this case. The flow instantiation code is rather convoluted and should really be rewritten.

lwrage commented 2 weeks ago

see #2438