osate / osate2

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

Instance Model Creation Crashes on Modal Properties on Threads included in a Thread Group #1616

Closed dblouin closed 5 years ago

dblouin commented 5 years ago

There is an error when creating the instance model of the system implementation in Main_System.zip

the attached AADL file. The error is: image

An instance model is still created but the Compute_Execution_Time properties are not set on the thread subcomponent.

OSATE version: 2.3.4.vfinal -- Build id: 2018-07-11

Windows OS

lwrage commented 5 years ago

@dblouin You can embed (short) aadl code directly in an issue. That makes it easier for us to cut and paste.

package Main_System
public

    system main
    end main;

    system implementation main.impl
        subcomponents
            proc: process proc1.impl;
    end main.impl;

    process proc1
        modes
            LO: initial mode;
            HI: mode;
    end proc1;

    process implementation proc1.impl
        subcomponents
            group1: thread group group1.impl in modes (LO=>LO,HI=>HI);
    end proc1.impl;

    thread group group1
        requires modes
            LO: initial mode;
            HI: mode;
    end group1;

    thread group implementation group1.impl
        subcomponents
            thread1: thread thread1.impl {
                Compute_Execution_Time => 200 ms .. 200 ms in modes (LO), 300 ms .. 300 ms in modes (HI);
            } in modes (LO=>LO, HI=>HI);
    end group1.impl;

    thread thread1
        requires modes
            LO: initial mode;
            HI: mode;
    end thread1;

    thread implementation thread1.impl
    end thread1.impl;

end Main_System;
lwrage commented 5 years ago

The problem is that the model has more than one level of requires modes. This is currently not supported in the instantiation. The generated SOMs in the example contain only two mode references instead of three. The mode references to the thread modes are missing.