Closed philip-alldredge closed 7 years ago
The feature group stuff is complicated enough that I have a proposal to get rid of the inverse of between feature group types. I believe that being able to declare the feature group as the inverse of a feature group type is sufficient (we did not have that in V1).
I think there is a legality rule in V2.1 that does not allow you to extend another FGT that itself is an inverse. Let me take a closer look and then I’ll adapt your fix.
I agree it's complicated. It makes things like determining which direction a feature inside of a nested feature group even more complicated than it would be with just the inverse of on the feature groups themselves.
I don't think I have a copy of the finalized V2.1 standard(I've been working off one of the drafts). Unless it changed in a later version, section 8.2, L3 and L5 seem to allow it.
Fixed, commit refers to #227
I believe there is an unhandled corner case in FeatureGroupTypeImpl::getAllFeatures(). I believe it returns the incorrect features when called on a feature group type that: -Does not define its own features -Extends another feature group type that is the inverse of a feature group type and explicitly defined features(which are the complement of the other feature group type's features). -Is declared as the inverse of another feature group type
AADL Example:
If getAllFeatures() is called on TestInvExtendedFeatureGroup, the feature "in1" is returned. I would expect "out1" to be returned. Below is code that implements an alternative version of getAllFeatures() that behaves according to my expectations. I currently have not intregrated into the class itself, but it could be easily adapted if the behavior of getAllFeatures is decided to be incorrect.