osate / osate2

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

Mode Transition Regression #331

Closed philip-alldredge closed 10 years ago

philip-alldredge commented 10 years ago

Hello, The recent meta-model changes have causes issues with mode transitions that have a trigger that is inside of a subcomponent or feature group. See below for more details and example.

Description Resource    Path    Location    Type
Couldn't resolve reference to Context 'test_fg'.    mode_transition_bug.aadl    /Dev/packages   line: 12 /Dev/packages/mode_transition_bug.aadl Xtext Check (fast)
Couldn't resolve reference to TriggerPort 'in_event'.   mode_transition_bug.aadl    /Dev/packages   line: 12 /Dev/packages/mode_transition_bug.aadl Xtext Check (fast)
package mode_transition_bug
public
    abstract test
features
    ine : in event port;
    test_fg : feature group test_feature_group;
modes
    m1 : mode;
    m2 : mode;
    m3 : mode;
    new_transition : m1 -[ ine ]-> m2;
    new_transition2 : m2 -[ test_fg.in_event ]-> m3; -- Causes error
end test;

    feature group test_feature_group
features
    in_event : in event port;
end test_feature_group;

    abstract implementation test.Impl
subcomponents
    sc : abstract test;
modes
    new_transition3 : m2 -[ sc.ine ]-> m1;  -- Causes error as well.
end test.Impl;
end mode_transition_bug;
reteprelief commented 10 years ago

Philip, just talked to Lutz. He tried to simplify the Meta model now that we have explicit declaration of internal features. In that context he had flipped the role of the TriggerPort class and the ModeTransitionTrigger class. See https://wiki.sei.cmu.edu/aadl/index.php/Metamodel_updates#Mode_Transition_Triggers

I get a compilation error in your code trying to retrieve the port from TriggerPort - now to be retrieved from ModeTransitionTrigger. You must have already fixed that.

Similarly, the name resolver needs to retrieve the context from ModeTransitionTrigger, the context being the subcomponent. I will fix that this evening and push out the change.

reteprelief commented 10 years ago

closed. I also made the changes to your source code I mentioned above. They were changing to ModeTransitionTrigger and the method from getPort to getTriggerPort.

philip-alldredge commented 10 years ago

The changes solves the issue. Thank you!