Issue 1450: BocaFeature should redefine the defines relationship (boca-rtf) Source: (, ) Nature: Revision Severity: Summary: Summary: BocaFeature should redefine the defines relationship that it inherits from Feature by adding a constraint stating that the relationship can only be populated by an instance of BocaFeatureOwner. Resolution: Revised Text: Actions taken: June 3, 1998: received issue June 23, 1998: closed issue Discussion: End of Annotations:===== *ISSUE 22* Section 2.2.4 (BOCA Meta-Model in CDL) identifiable BocaType:BocaFeatureOwner,CorbaInterface{ attribute boolean has_identity=FALSE; attribute boolean is_abstract=FALSE; attribute boolean is_singleton = FALSE; [constraint=(is_leaf?!is_abstract:TRUE)] attribute boolean is_leaf=FALSE; attribute ChangeableKind changeable=IS_CHANGEABLE; [constraint=pass_by_value?!has_identity:TRUE] attribute boolean pass_by_value=FALSE; attribute string technology_mapping=null; [MANAGER, is_read_only] relationship base_type Uses BocaType=BaseComponent; [MANAGER, is_read_only] attribute string keyword="type"; }; /* BoaType */ [is_abstract] identifiable BocaFeature: AbstractFeature{ attribute boolean is_read_only=FALSE; attribute ScopeKind target_scope=INSTANCES; attribute VisibilityKind visibility=PUBLIC; attribute EventKind events=TRIGGERED_EVENTS; attribute string event_subject; attribute boolean is_locked=FALSE; [MANAGER,is_read_only] attribute string keyword; attribute boolean export=FALSE; // attribute BocaFeature redefines; relationship redefines References BocaFeature inverse redefined_by; relationship redefined_by References BocaFeature inverse redefines; }; /* Feature */ The corresponding UML diagram (section 2.2.2.1) shows a relationship between BocaFeatureOwner and BocaFeature, which is a redefinition of the relationship between FeatureOwner and Feature. As discussed in issues 18 and 19, the redefinition should be handled by adding constraints rather than narrowing the types in the relationship declaration itself. Recommendation: BocaFeature should redefine the defines relationship that it inherits from Feature by adding a constraint stating that the relationship can only be populated by an instance of BocaFeatureOwner. On the other hand, it is not clear whether BocaFeatureOwner should redefine the has_features relationship that it inherits from FeatureOwner by adding a constraint stating that the relationship can only be populated by BocaFeature instances, because it might be necessary for a BocaFeatureOwner to be composed, at least partially, by instances of Feature that are not instances of BocaFeature.