osate / osate2

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

Instanciation exception when using connection datasubcomponent -> call.parameter #220

Closed facad closed 11 years ago

facad commented 11 years ago

Hello, I'm trying to define a connection between a data subcomponent and a subprogram call IN parameter.

The parser says OK, however the model instanciation produces a NullPointerException at org.osate.aadl2.instantiation.CreateConnectionsSwitch.appendSegment(line 439)

FeatureInstance dstFi = toCi.findFeatureInstance(toFeature); // toCi is null

I have defined the following AADL model to test this exception. If there is no solution, I can replace parameter features by data access and it works fine.

Maybe I'm not using correctly AADL constructions ? Thanks.

package test public with Base_Types; with Data_Model;

subprogram job features param : in parameter Base_Types::Integer; end job;

thread th end th; thread implementation th.impl subcomponents constantValue: data Base_Types::Integer { Data_Model::Initial_Value => ("3"); }; calls seq: { call1: subprogram job; }; connections parameter constantValue -> call1.param; end th.impl;

process proc end proc;

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

system root end root; system implementation root.impl subcomponents proc: process proc.impl; end root.impl;

end test;

juli1 commented 11 years ago

Hello,

This is definitely an issue in OSATE, looking forward to fix it.

facad commented 11 years ago

In fact, there is the same problem if I replace parameter "param" by a data access and changing the connection by an access connection.

juli1 commented 11 years ago

Should be fixed in the latest commit, updated version would be available in the testing release tomorrow.