9.2. Element Relation Types

Relations can be defined between the element containing the relation on one side and all other elements of the same or other models on the other side. In the following table, showing the supported element relations, the defining element D is the element on which the relation is defined, and EL is the list of related elements E 1 ... E n .

Note

Users can use their own custom relation types, which are ignored during evaluation. Some of the supported and thus evaluated relation types exist only since a specific release version of pure::variants. In previous versions they are treated as customer relations and are not evaluated at all. So, using models containing such relations in previous versions of pure::variants, which does not support them yet, can lead to invalid variant configurations. To avoid this source of error, the user is responsible to ensure that these models are not used in previous versions. One possibility for that is to add a pvSCL version guard constraint in each feature or family model, which uses such a new relation. See the section called “pv:PVVersion()” for that.

Table 9.2. Supported relations between elements (I)

RelationDescriptionLogical equivalent
ps:requires(EL) At least one element in EL has to be selected if the defining element is selected. D implies ( E 1 or ... or E n )
ps:requiresAll(EL) All elements in EL have to be selected if the defining element is selected. D implies ( E 1 and ... and E n )
ps:requiredFor(EL) If at least one element in EL is selected, then the defining element has to be selected. ( E 1 or ... or E n ) implies D
ps:requiredForAll(EL) If all elements in EL are selected, then the defining element has to be selected. ( E 1 and ... and E n ) implies D
ps:conditionalRequires(EL) Similar to ps:requires , but the relation is considered only for elements whose parent element is selected. D implies ((parentSel( E 1 ) implies E 1 ) or ... or (parentSel( E n ) implies E n )) , where parentSel( root ) = true
ps:recommends(EL) Like ps:requires , but not treated as error if not complied. D implies ( E 1 or ... or E n )
ps:recommendsAll(EL) Like ps:requiresAll , but not treated as error if not complied. D implies ( E 1 and ... and E n )
ps:recommendedFor(EL) Like ps:requiredFor , but not treated as error if not complied. ( E 1 or ... or E n ) implies D
ps:recommendedForAll(EL) Like ps:requiredForAll , but not treated as error if not complied. ( E 1 and ... and E n ) implies D
ps:equalsAny(EL)

(available since pure::variants 4.0.7)

If the defining element is selected, at least one element in EL has to be selected. If the defining element is not selected, none of the elements in EL may be selected. D equals ( E 1 or ... or E n )
ps:equalsAll(EL)

(available since pure::variants 4.0.7)

If the defining element is selected, all elements in EL have to be selected. If the defining element is not selected, not all of the elements in EL may be selected. D equals ( E 1 and ... and E n )
ps:conflicts(EL) If all element in EL are selected, then the defining element must not be selected. ( E 1 and ... and E n ) implies not( D )
ps:conflictsAny(EL) If any element in EL is selected, then the defining element must not be selected. ( E 1 or ... or E n ) implies not( D )
ps:discourages(EL) Like ps:conflicts , but not treated as error if not complied. ( E 1 and ... and E n ) implies not( D )
ps:discouragesAny(EL) Like ps:conflictsAny , but not treated as error if not complied. ( E 1 or ... or E n ) implies not( D )
ps:influences(EL) The elements in EL are influenced in some way by the selection of the defining element. The interpretation of the influence is up to the user.  
ps:provides(EL) The "inverse" relation to ps:requires . For all selected elements in EL at least one defining element has to be selected. E implies ( D 1 or ... or D n )
ps:supports(EL) Like ps:provides , but not treated as error if not complied. E implies ( D 1 or ... or D n )

Table 9.3. Supported Relations between Elements (II)

RelationDescriptionUse forPartner relation
ps:exclusiveProvider(id) In a valid configuration at most one exclusiveProvider or one set of sharedProvider for a given id is allowed. Thus, the relation defines a mutual exclusion relation between elements. Concurrent implementations for an abstract concept. ps:requestsProvider
ps:sharedProvider(id) In a valid configuration at most one exclusiveProvider or one set of sharedProvider for a given id is allowed. Thus, the relation defines a mutual exclusion relation between elements. Shared implementations for an abstract concept. ps:requestsProvider
ps:requestsProvider(id) In a valid configuration for each requestsProvider with the given id there must be an exclusiveProvider or any number of sharedProvider with the same id. There may be any number of requestsProvider relations for the same id. Request existence of an abstract concept. ps:exclusiveProvider
ps:expansionProvider(id) In a valid configuration at most one expansionProvider for a given id is allowed. Thus, the relation defines a mutual exclusion relation between elements. Provides mechanism for implementing variation points with default solution. ps:defaultProvider
ps:defaultProvider(id) If an element marked as expansionProvider is additionally marked as defaultProvider for the same given id and there is more than one possible element claiming to be an expansionProvider for this id, then all defaultProvider are excluded. If there are more than one defaultProvider selected and no non- defaultProvide r selected, one defaultProvider must be chosen manually. Provides mechanism for implementing variation points with default solution. ps:expansionProvider