The reduction of a feature model has to be correct in such a regard that only selected and deselected features are removed and the remaining variability con- straints are preserved accordingly. Otherwise, a reduced feature model may lead to new runtime configurations that are not intended by the original specification of the DSPL.
According to Definition 4.19, a context-feature model cfm is a propositional formula over context variables C and feature variables F. A configuration of a cfm corresponds to an interpretation of every variable by assigning a value from the domain of three-valued logicsB⊥. Note that context and feature variables are
treated equally in the following and I do not distinguish between them explicitly. Therefore, I denote a feature or context variable as cf ∈C ∪ F in the following for short.
For a reduction of a feature model, a three-valued configuration interpretation of context/feature variables cf ∈C ∪ F denotes the following.
• t= cf is configured to be selected,
• ⊥R= cf is reconfigurable at runtime and
• f= cf is configured to be deselected.
Note that an explicit configuration of a context/feature as reconfigurable ⊥R corre-
sponds to the unconfigured notation ⊥ in a three-valued logic, c.f., Notation4.3. Features are specified as reconfigurable at design time of the DSPL to express that a configuration decision for that feature still has to be made. A feature is
R esour ce C onstraint R untime A d apt a tion
configured as reconfigurable if the developer intends a further configuration re- finement at a later stage in the software life-cycle, e.g., a refinement by another developer. Additionally, if a feature is still specified as reconfigurable at the de- ployment of the DSPL, it is considered to be dynamically (de-)activatable at run- time. Thus, if a DSPL is deployed, a context/feature that has to be reconfigurable at runtime has to be specified as reconfigurable at design time.
Definition 5.1(Reconfigurable Contexts and Features). Given a partial configuration γ ∈ ˇΓcfm for a context-feature model. A context c ∈ C and feature f ∈ F may be dynamically (de-)activated if γ(c) = ⊥R and γ(f) = ⊥R holds at design time to
denote a reconfigurability of c and f at runtime.
An explicit configuration of a feature as reconfigurable is only necessary for the extended satisfiability check to uncover transitive or direct contradictions between a reconfigurable feature configuration and a dependent selected or deselected feature.
Example 5.2 (Reconfigurable Features).
A partial configuration contains features that are to be configured at a later point, either at design time as (de-)selected or at runtime as (de-)activated. For example, the Connectivityfeatures are specified as reconfigurable by an devel- oper in order to dynamically reconfigure betweenAd HocandInfrastructure- based communication at runtime. Therefore, such reconfigurable features are part of the DSPL that is deployed on the device, although they are neither selected nor deselected. A specification ofInfrastructureas selected andAd Hocas re- configurable contradicts the feature model constraints specified for the Nexus DSPL (c.f. Figure 2.12). In this case, either Ad Hoc has to be deselected or Infrastructurehas also to be reconfigurable.
For a feature model reduction it is important that the reduction is executed cor- rectly. In this regard, the set of valid configurations ˆΓcfm0 of a reduced context-fea-
ture model cfm’ has to be a subset of the original set of configurations ˆΓcfm0 ⊂ ˆΓcfm
specified by the context-feature model cfm.
According to Definition 4.15a substitution cfm[σγ] of the variables cf ∈ C ∪ F
in a context-feature model formula cfm with the interpretation of a configuration γ ∈ ˆΓC∪F replaces every variable in cfm with the respective interpreted value provided by γ, i.e., cfm’ = cfm[σγ]. In this case cfm’ is derived from cfm by
replacing all occurrences of context and feature variables f ∈C ∪ F in cfm by • 1iff γ(cf) = t,
• cf iff γ(cf) = ⊥R, i.e., the variable is not replaced, and
• 0iff γ(cf) = f.
As a reduction criterion, I use a partial configuration. With a substitution func- tion σ, a reduced context-feature model cfm’ of the original context-feature model
R esour ce C onstraint R untime A d apt a tion
cfm is derivable, based on such a reduction criterion. With this set of all partial configurations ˇΓcfm as a possible reduction criterion, a reduced feature model is
describable as follows.
A reduced feature model has to provide the option to derive a valid config- uration. Thus, a reduced context-feature model cfm’ is not reconfigurable if all variables have been substituted by constants according to the reduction criterion γ ∈ ˇΓcfm. In this regard, the set of valid configurations for cfm’ becomes empty Γcfm0 =∅ because all variables have been substituted by constants (c.f. properties
(1) and (2) of Definition5.2).
Furthermore, a reduced feature model cfm’ is correct, if the third property (3) of Definition 5.2holds. This property states that the set of valid configurations ˆΓcfm’
of the reduced cfm’ also satisfies the original cfm over a reduced set of variables C0∪F0. The restriction of a configuration γ
C0∪F0 corresponds to a valid config-
uration γ ∈ ˆΓcfm, in which the set of interpreted context variables C and feature
variables F of cfm is reduced to a subset C0 and F0 of contexts and features, re- spectively. For example, the configuration of the features marked as reconfigurable in Figure5.1corresponds to a valid configuration of the Nexus DSPL, e.g., such as depicted in Figure2.13, in which the features marked as selected and deselected are excluded from the interpretation. In this regard, every configuration that satisfies the reduced cfm’ also satisfies the original context feature model cfm.
Definition 5.2 (Reduced Feature Model). Let cfm ⊆ FMC∪F be a context-feature model. Further, let γ ∈ ˇΓcfm be a partial configuration of cfm as reduction criterion.
A context-feature model cfm0 ⊆FMC0∪F0, withC0 ⊆C ∪ F0 ⊆F , is a reduction of
cfm w.r.t. the reduction criterion γ if the following properties hold
(1) there is at least one feature variable reconfigurable, i.e., ∃f ∈F : γ(f) = ⊥R,
or
(2) there is at least one context variable reconfigurable, i.e., ∃c ∈C : γ(c) = ⊥R,
and
(3) the set of complete configurations ˆΓcfm0 that satisfies cfm’ over the reduced
sets of context variables C0 and feature variables F0 also has to satisfy the original cfm, i.e., ˆΓcfm0 ⊆{γC0∪F0}, with γ ∈ ˆΓcfm.
To derive a DSPL that is specific for a device, the context-feature model specifi- cation has to be reduced accordingly. This process of reducing a feature model is discussed in the next section.