osate / osate2

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

Missing prototype parameter is allowed (low priority) #315

Closed stevevestal closed 9 years ago

stevevestal commented 10 years ago

The following package is accepted by OSATE with no errors reported. In system implementation foo.bar, c1 does not seem well-defined since there is no actual for the prototype parameter cableType. In the generated system instance for foo.bar, neither c1 nor c2 seem to have either a type or implementation associated with them.

package Ethernet public

bus Cable
end Cable;

bus implementation Cable.MBS100
end Cable.MBS100;

bus implementation Cable.MBS1000
end Cable.MBS1000;

device Controller
prototypes
    cableType: bus Cable;
features
    p0: requires bus access cableType;
    p1: requires bus access cableType;      
end Controller;

device implementation Controller.Imp
end Controller.Imp;

system foo
end foo;

system implementation foo.bar
subcomponents
    c1: device Controller.Imp;  
    c2: device Controller.Imp (cableType => bus Cable.MBS100);
end foo.bar;

end Ethernet;

lwrage commented 9 years ago

This model is valid as a declarative AADL model because the system implementation can be extended in another package. The extension can refine c1 and add a prototype actual. There is also no error during instantiation because classifiers referenced by features are not instantiated.