Skip to content

Model instantiation fails when flow latencies are assigned in properties #289

@nvcyc

Description

@nvcyc

OCARINA VERSION:

root@549e23822d46:~/opt/ocarina-build# ocarina --version
Ocarina v2017.1-510-gf2c500f (Working Copy from rf2c500fe)
Copyright (c) 2003-2009 Telecom ParisTech, 2010-2019 ESA & ISAE , 2019-2021 OpenAADL
Build date: Feb 22 2021 22:32:18

HOST MACHINE and OPERATING SYSTEM:

root@549e23822d46:~/opt/ocarina-build# uname -a
Linux 549e23822d46 5.4.0-60-generic #67~18.04.1-Ubuntu SMP Tue Jan 5 22:01:05 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

COMPILER VERSION

root@549e23822d46:~/opt/ocarina-build# gnatls -v

GNATLS 7.5.0
Copyright (C) 1997-2017, Free Software Foundation, Inc.

Source Search Path:
   <Current_Directory>
   /usr/lib/gcc/x86_64-linux-gnu/7/adainclude


Object Search Path:
   <Current_Directory>
   /usr/lib/gcc/x86_64-linux-gnu/7/adalib


Project Search Path:
   <Current_Directory>
   /usr/x86_64-linux-gnu/lib/gnat
   /usr/x86_64-linux-gnu/share/gpr
   /usr/share/gpr
   /usr/lib/gnat
root@549e23822d46:~/opt/ocarina-build# gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

DESCRIPTION:

When latency is assigned to a flow in properties, the model instantiation would fail with the following error:

TestLatency.aadl:48:13: latency cannot be properly instantiated

REPEAT BY:

With using the following test AADL model (named test_latency.aadl):

package TestLatency
public

    data d1
    end d1;


    -- deployment
    system deployment

    end deployment;

    system implementation deployment.impl
        subcomponents
            p1: process p1.impl;

    end deployment.impl;


    -- p1
    process p1

    end p1;

    process implementation p1.impl
        subcomponents
            t1: thread t1.impl;
            t2: thread t2.impl;
        connections
            conn: port t1.out_port -> t2.in_port;
        flows
            flow_t1_t2: end to end flow t1.flow_out_port -> conn -> t2.flow_in_port;
        properties
            latency => 2ms .. 4ms applies to flow_t1_t2;
    end p1.impl;


    -- t1
    thread t1
        features
            out_port: out data port d1;
        flows
            flow_out_port: flow source out_port;
    end t1;

    thread implementation t1.impl
        properties
            latency => 1ms .. 2ms applies to flow_out_port;
    end t1.impl;


    -- t2
    thread t2
        features
            in_port: in data port d1;
        flows
            flow_in_port: flow sink in_port;
    end t2;

    thread implementation t2.impl
        properties
            latency => 1ms .. 2ms applies to flow_in_port;
    end t2.impl;

end TestLatency;

and running Ocarina with the following command

ocarina -aadlv2 -r TestLatency::deployment.impl test_latency.aadl -i

will lead to the following error messages:

TestLatency.aadl:48:13: latency cannot be properly instantiated
Cannot instantiate full model, exit now

SAMPLE FIX/WORKAROUND:

Note that there will not be errors if the latency assignments are embedded in the flow declarations.
That is, using assignment style like flow_out_port: flow source out_port {latency => 1ms .. 2ms;}; will not yield an error.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions