osate / osate2

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

property binding on model instantiation #510

Closed SebastienGardoll closed 9 years ago

SebastienGardoll commented 9 years ago

Hi,

I report a strange behavior when I instantiate the following AADL model, on the model instance:

_ the properties "Stack_Size" and "DispatchProtocol" are missing. the property "Priority" binded to the thread "sender" is also binded to the feature instance "portA". _ the property "Data_Representation" comes along with the feature instance "portA" but Data_Representation cannot be applied to other than data.

package reloc public

with Base_Types; with Data_Model;

thread sender features portA: out event data port Base_Types::Integer; properties Dispatch_Protocol => Periodic; Period => 1000 ms; Priority => 1; Data_Size => 40000 Bytes; Stack_Size => 40 Bytes; Code_Size => 40 Bytes; end sender;

thread implementation sender.impl end sender.impl;

end reloc ;

screenshot of the model instance:

reloc_instance

lwrage commented 9 years ago

fixed

SebastienGardoll commented 9 years ago

I am sorry but there are still bugs in the model instantiation. It seems that the properties (like data_size in the example below) defined in the port's type are associated to the port itself, after instantiation.

package reloc public

with Base_Types; with Data_Model;

data Integer properties Data_Size => 16 Bytes; Data_Model::Data_Representation => Integer; end Integer ;

thread sender features portA: out event data port Integer; end sender;

thread implementation sender.impl end sender.impl;

end reloc ;

Screenshot of the model instance:

reloc_instance

lwrage commented 9 years ago

This is OK. Property Data_Size applies to event data ports, so its value is taken from the referenced classifier Integer. This is 11.3 (12), the 5th bullet, 3rd sentence in the standard: "If not present in the model element, it is determined by the model element's classifier reference according to the respective classifier rules ..."