osate / osate2

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

Missing property association on mode transition instance #1096

Closed Etienne13 closed 5 years ago

Etienne13 commented 6 years ago

This issue is a follow up on issue #1092

The instantiation of the following AADL model succeeds after a workaround for the bug identified in issue #1092 (i.e. required modes in threads and references to these modes have been commented).

However, the instance model is not complete: in component instance “proc", the property association stating that mode transition m1 to m2 is an emergency mode transition is absent.

Detail: there is a warning stating that feature i of proc is not connected even though it is virtually connected in a mode transition. I believe the warning is excessive in this case. I tried to connect the port to see if it would enable the definition of the property association for the mode transition but it did not work.

Here is the model:

    package modes_instantiation_2
    public

    system main
    end main;

    system implementation main.impl
    subcomponents
            cpu: processor cpu;        
            proc: process proc.impl;
    connections
            c_mode: port cpu.o -> proc.i;        
   -- properties
   --         Period => 1000 ms in modes (m1), 200 ms in modes (m2) applies to proc.t;        
    end main.impl;

    processor cpu
            features
                    o: out event port;
    end cpu;

    process proc
            features
                    i: in event port;
            modes
                    m1: initial mode;
                    m2: mode;
                    m1TOm2: m1 -[i]-> m2;
            properties
                    Mode_Transition_Response => Emergency applies to m1Tom2;
    end proc;

    process implementation proc.impl
            subcomponents
                    t: thread t;        
    end proc.impl;

    thread t
           -- requires modes
           --         m1: initial mode;
           --         m2: mode;
    end t;

    end modes_instantiation_2;
Etienne13 commented 6 years ago

Note: the issue seem to be specific to the use of the "applies to" clause. Indeed, if the property association is directly attached to the mode transition, the instantiation preserves it.

Here is the modification in the previous model to have a correct instance mode:

    m1TOm2: m1 -[i]-> m2 {Mode_Transition_Response => Emergency;};