osate / osate2

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

resolving references as property values when associated with connections #465

Closed reteprelief closed 8 years ago

reteprelief commented 10 years ago

We can have properties directly associated with connections by declaring them inside {} The reference points to a subcomponent within the component for which the connection is declared, but it now is unresolved. It used to work. The problem is that when we changed the reference resolution we only looked at the subcomponent case. In that case we interpret the applies to and the reference the same way, i.e., we start with the classifier of the subcomponent. That does not make sense for connections. See example https://github.com/osate/examples/blob/master/core-examples/misc/latency.aadl or fanout.aadl. There are a number of other examples that broke because of that as well.

lwrage commented 10 years ago

I agree that this does not make sense for connections, but I would say the examples are wrong and the property association should be in the properties section of the component that contains the connection declaration.

Otherwise we need a rule for the standard that states how exactly this is supposed to work: There are now two cases

  1. Model elements that can contain something, i.e. , subcomponents and feature groups. In this case we resolve both in the subcomponent namespace.
  2. Model elements that don't contain anything, e.g., ports, connections, ... In this case a local property association cannot have an applies to, and reference values are resolved in the namespace of the enclosing component (or feature group for ports).

Did instantiation work correctly with such a property association? I am pretty sure that I never considered such a property association as valid AADL.

reteprelief commented 10 years ago

I started changing some of the examples in GitExamples that are affected to move the binding proeprty from {} to the applies to clause. Just thought to raise it as an issue in case other people run into the same problem. We should have an area where people can find out about this kind of stuff.

lwrage commented 8 years ago

Fixed a while ago