As depicted in Figure 6.4(a), a product configuration of an SPL is obtained by binding all variability, i.e., by either selecting, or deselecting each provided feature according to customer-specific product requirements. The constraints imposed by a feature model restrict the number of valid configurations of the SPL to a subset of valid configuration states, thereby forming a state space of configurations.
Configuration Apply FM Product Configuration Active Product Configuration Valid State Space
(a) SPL Configuration State Space
Reconfiguration Configuration
Apply FM
(b) DSPL (Re-)Configuration
Figure 6.4:(Re-)Configuration in an SPL and DSPL
Figure6.4(b)depicts the extension of an SPL to become a DSPL. A DSPL allows a product to be not only configured once at design time, but rather by supporting flexible reconfigurations at runtime [BSBG08] within the state space of configura- tions. In that manner, a reconfiguration from a current configuration to a subse- quent configuration corresponds to a transition from a source configuration state s to a target configuration state s’ executed at runtime. By enriching the state space with reconfiguration-transitions, the state space becomes a transition system.
Transition systems [HMP92,Kel76] are used to specify the behavior of a system on the basis of state-transition graphs. The actual runtime properties of interest are associated with state labels rather than transition labels of paths of subsequent state-transitions. A DSPL describes the operation configuration states of a device, i.e., which features are (in-)active in combination. Therefore, a state is labeled with the interpretation of the features of a DSPL to denote a valid configuration (c.f. Definition 4.8). The possible reconfiguration behavior between the configu- ration states of a DSPL, i.e., the entering and leaving of states, is defined by the (unlabeled) transitions of such a transition system.
Bruns et al. propose to use a Kripke Structure (KS) [BG99] to specify a transi- tion system. Every state s ∈ S of such a KS corresponds to some valid Boolean configuration interpretation γ ∈ Γfmof feature variablesF. Additionally, the set of
statesS contains an error state s In this regard, every state of aKS corresponds
R esour ce C onstraint R untime A d apt a tion
A reconfiguration is expressed via a transition relation s1−→s2 between two
states in {s1, s2} ∈ S. Thus, the interpretation of feature variables assigned to a
state s ∈S fully specify an operational configuration state of the device and the transitions are capable to express the concept of a DSPL reconfiguration.
Definition 6.1 (Kripke Structure (KS) [BG99]). A Kripke Structure KS is a tuple (S, −→), where
• S = ˆΓfm∪{s} is a finite set of configuration states, and
• −→ ⊆ S × S is a transition relation.
This KS as specified above is capable to be non-deterministic, i.e., a state may have more than one outgoing transition. Note that a reconfiguration based on such a transition system is discussed in detail later in this thesis in Section6.4.
Each state is defined by its Boolean interpretation of features and denotes a configuration γ ∈ ˆΓfm of feature variables w.r.t. a feature model formula fm. The device has to be able to deal with possible failures, such as non-resolvable conflicts of contextual requirements or erroneous features, e.g., a defect in the WLAN chip. Therefore, an additional error state is added to the set of states S. Such an error state is denoted by s∈S as part of the KS, with s6∈ ˆΓfm.
As SAS continuously adapt themselves, it is further safe to assume that aKS has no terminating state by requiring the transition system to be fully path-connected, i.e., every state s ∈ S has to the possibility to reach every other state eventually via some path. Note that this assumption does not restrict the expressiveness of a KS. A terminating state, e.g., an error state s, in which the device got
stuck, is expressible with a self-transition to denote a continuous loop in such a terminating state.
The KS may also be fully connected, i.e., every state is able to reach every other state in S with one transition, as proposed by [Hel12]. If there are no additional external constraints, a state has a transition to every state in the transition sys- tem, including itself, i.e., a self-transition, which results in 6666 transitions for the Nexus DSPL. However, the amount of transitions are restrictable by specify- ing constraints over the reconfigurations. For instance, a device may not directly switch from a source configuration, in which Cellular Call is currently used, to a target configuration, in which VoIP is used, to execute a phone call without interrupting the call. Instead, this reconfiguration has to be executed via an inter- mediate configuration state, in whichCellular CallandVoIP are both active, to initiate a handover of the currently ongoing call. Note that such restrictions are of no further concern for the Nexus DSPL running example.
A KS is the basis to (i) dynamically reconfigure a DSPL and (ii) to satisfy the continuously changing contextual requirements. If a reconfiguration is triggered, the state space S has to be searched to find an appropriate configuration state of the device that satisfies the requirements imposed by the emerged contextual situation. If no such state exists, the imposed requirements are not satisfiable w.r.t. the specification of the DSPL.
R esour ce C onstraint R untime A d apt a tion
A reconfiguration transition s → s implies a change in the interpretation of a set of features. Therefore, not only the interpretation of one feature may have to be adapted but the interpretation of multiple features. Assuming that the features NavigationandGPSare inactive in the currently active source state s, a transition to a target state s’ whereNavigationandGPSare reconfigured, i.e., changed from being inactive to active, is executed as soon as the navigation system is activated, e.g., if the smartphone is put into the docking station of a car.
The next section discusses potential effects of a context-aware DSPL on the state space and the respective reconfiguration transition system as a KS. Further, the next section elaborates how a transition is triggered by a change of a contextual situation.